Exemple #1
0
        public static void SetUserNav()
        {
            SessionUser sUser = User;

            List <string> perms = new List <string>();

            perms.AddRange(new string[] { "0", "1", "2", "4", "8", "16", "32", "64", "128", "256" });

            string vp = GetVPKey();

            if (vp != null)
            {
                HttpContext.Current.Items[vp] = null;
            }

            sUser.NavCfg = NavCfgMgr.GetUserNavCfg(perms.ToArray());
        }
Exemple #2
0
        private static SessionUser LoginPrivate(User user)
        {
            if (user != null)
            {
                SessionUser sUser = new SessionUser(user.UID, user.ItCode, user.FullName);

                User = sUser;

                List <string> perms = new List <string>();
                perms.AddRange(new string[] { "0", "1", "2", "4", "8", "16", "32", "64", "128", "256" });

                sUser.NavCfg = NavCfgMgr.GetUserNavCfg(perms.ToArray());

                return(sUser);
            }
            else
            {
                return(null);
            }
        }