예제 #1
0
        public override bool ValidateUser(string username, string password)
        {
            bool IsValid = UserProvider.ValidateUser(username, password);

            if (IsValid)
            {
                HttpContext.Current.Session[UserIdSessionVariable]    = UserProvider.CurrentItem["Id"].Value;
                HttpContext.Current.Session[UserLoginSessionVariable] = UserProvider.CurrentItem["Login"].Value;
                HttpContext.Current.Session[UserNameSessionVariable]  = UserProvider.CurrentItem["Name"].Value;
                HttpContext.Current.Session[UserObsSessionVariable]   = UserProvider.CurrentItem["Obs"].Value;
                if (GroupProvider.SelectGroup(UserProvider.CurrentItem["Group"].Value.ToString()))
                {
                    HttpContext.Current.Session[GroupIdSessionVariable]      = GroupProvider.CurrentItem["Id"].Value;
                    HttpContext.Current.Session[GroupNameSessionVariable]    = GroupProvider.CurrentItem["Name"].Value;
                    HttpContext.Current.Session[GroupIsAdminSessionVariable] = GroupProvider.CurrentItem["IsAdmin"].Value;
                }
            }
            return(IsValid);
        }
예제 #2
0
 public int DeleteGroup(string GroupID)
 {
     GroupProvider.SelectGroup(GroupID);
     return(GroupProvider.DataProvider.DeleteItem(GroupProvider.CurrentItem));
 }
예제 #3
0
 public LoginGroupItem GetGroupByID(string ID)
 {
     GroupProvider.SelectGroup(ID);
     return(GroupProvider.CurrentItem);
 }