protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack != true)
        {
            spcurdate.InnerText     = DateTime.Now.ToString("dddd, dd MMMM, yyyy");
            Ucmenucontrol1.RoleName = IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.RoleAlias;

            //TODO: This is too much pasing and type casting - Yasir April 2011
            var currentRole = (Roles)IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.GetSystemRoleId;
            Ucwelcomebox1.SetLinks(currentRole);
            ShowPendingAuthorization();
        }
    }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack != true)
            {
                spcurdate.InnerText     = DateTime.Now.ToString("dddd, dd MMMM, yyyy");
                Ucmenucontrol1.RoleName = IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.RoleAlias;
                var currentOrgRole = IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole;


                if (currentOrgRole.CheckRole((long)Roles.Technician) && !this.Request.Url.ToString().Contains("EventCustomerList.aspx"))
                {
                    divleftcontainer.Style.Add(HtmlTextWriterStyle.Display, "block");
                }
                else
                {
                    divleftcontainer.Style.Add(HtmlTextWriterStyle.Display, "none");
                }

                Ucwelcomebox1.SetLinks(Roles.Technician);
                //SetRecentVisited(role.ToString());
            }
        }