using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using EKETEAM.Data;
using EKETEAM.FrameWork;

namespace eFrameWork.Application
{
    public partial class Main : System.Web.UI.MasterPage
    {
        public string AppItem = eParameters.Request("AppItem");
        public eUser user;
        private string _appname = "";
        public string ApplicationName
        {
            get 
            {
                if (_appname.Length == 0)
                {
                    if (AppItem.Length > 0)
                    {
                        DataRow[] rows = eBase.a_eke_sysApplicationItems.Select("ApplicationItemID='" + AppItem + "'");
                        if (rows.Length > 0)
                        {
                            rows = eBase.a_eke_sysApplications.Select("ApplicationID='" + rows[0]["ApplicationID"].ToString() + "'");
                            if (rows.Length > 0) _appname = rows[0]["MC"].ToString() + " - ";
                        }
                    }
                    _appname +=  eConfig.systemName();
                }
                return _appname;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            user = new eUser("Application");
            user.Check();//检测用户是否登录,未登录则跳转到登录页
        }
    }
}