Beispiel #1
0
        private void SetUserSession(UserVM user)
        {
            Session["UserId"]       = user.UserId;
            Session["UserIp"]       = user.Add_IP;
            Session["UserName"]     = user.UserName;
            Session["LoginId"]      = user.LoginId;
            Session["UserTypeId"]   = user.UserTypeId;
            Session["UserTypeName"] = user.UserTypeName;

            SessionManager.RoleRights = RoleRights.GetRoleRights(user.UserId, SessionManager.UserType);
        }
Beispiel #2
0
        private new void CheckAccess()
        {
            if (Session["UserId"] != null)
            {
                if (SessionManager.RoleRights == null)
                {
                    SessionManager.RoleRights = RoleRights.GetRoleRights(Convert.ToInt32(SessionManager.UserId), SessionManager.UserType);
                }

                if (SessionManager.RoleRights != null && SessionManager.RoleRights.Any())
                {
                    SetTabRights();
                }
            }
        }
        private new void CheckAccess()
        {
            try
            {
                if (SessionManager.UserId != null)
                {
                    if (SessionManager.RoleRights == null)
                    {
                        SessionManager.RoleRights = RoleRights.GetRoleRights(Convert.ToInt32(SessionManager.UserId), SessionManager.UserType);
                    }

                    if (SessionManager.RoleRights != null && SessionManager.RoleRights.Count > 0)
                    {
                        SetViewRights();
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }