protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Page.IsPostBack)
            {
                return;
            }
            SystemSetting systemSetting = systemSettingServiceInstance.GetCurrentSystemSetting();

            this.MenuStyle            = 0;
            this.lblLoginMessage.Text = "<b>" + systemSetting.SystemName + "</b><font size='2' color='#999999' face='Verdana, Arial, Helvetica, sans-serif'>版本" + systemSetting.SystemVersion + "<br /></font>";
            if (this.CurrentLoginUser != null)
            {
                this.lblLoginMessage.Text += "当前登录用户:" + this.CurrentLoginUser.UserName;
                if (this.CurrentLoginUser.DepartmentID != null)
                {
                    this.lblLoginMessage.Text += ",所属部门:" + this.CurrentLoginUser.DepartmentID.DepartmentNameCn + "。";
                }
                List <SystemRole> roles =
                    systemUserServiceInstance.GetUserAssignedRoleByUserLoginID(this.CurrentLoginUser.UserLoginID);
                if (roles.Count > 0)
                {
                    this.lblLoginMessage.ToolTip = "当前用户分配角色:";
                    foreach (SystemRole role in roles)
                    {
                        this.lblLoginMessage.ToolTip += role.RoleName + ",";
                    }
                }
            }

            this.lblLisence.Text = systemSetting.SystemLisence;
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Page.IsPostBack)
            {
                return;
            }
            SystemSetting systemSetting = systemSettingServiceInstance.GetCurrentSystemSetting();

            this.Page.Header.Title = systemSetting.SystemName;
            this.Page.Header.Controls.Add(this.ParseControl("<link rel='stylesheet' href='" + this.ResolveUrl("~/css/Site_Css.css") + "' type='text/css' />"));
            this.Page.Header.Controls.Add(this.ParseControl("<script language='javascript' src='" + this.ResolveUrl("~/js/checkform.js") + "/'></script>"));
            this.lblSystemName.Text = " <b>" + systemSetting.SystemName + "</b><br/><font size='2' color='#999999' face='Verdana, Arial, Helvetica, sans-serif'>" + systemSetting.SystemVersion + "</font>	";
            this.lblLisence.Text    = systemSetting.SystemLisence;
        }