예제 #1
0
        private void Start_Session(string UserName = null, string Password = null)
        {
            UserController us    = new UserController();
            User           model = us.Get_User_By_User_Password(UserName, Password);

            if (model != null)
            {
                SessionHelper.AddUserToSession(model.id.ToString());
                SessionHelper.AddNewSession("NAME_USER", (model.name + " " + model.last_name));
                SessionHelper.AddNewSession("ROL_ID", model.id_rol.ToString());
                SessionHelper.AddNewSession("ROL_USER", model.name_rol);
                SessionHelper.AddNewSession("MENU_PERMISSIONS", Menu_Permissions(model.id_rol));
            }
        }