Exemple #1
0
        public override bool ValidateUser(string username, string password)
        {
            UserBs objBs = new UserBs();
            int    count = objBs.GetAll().Count(x => x.UserEmail.Equals(username) && x.Password.Equals(password));

            return(count != 0);
        }
Exemple #2
0
 internal void CreateUserIfDoesNotExist(string UserEmail, UserBs userBs)
 {
     if (userBs.GetAll().Where(x => x.UserEmail == UserEmail).Count() == 0)
     {
         userBs.Insert(new tbl_User()
         {
             UserEmail = UserEmail, Role = "U", Password = "******", ConfirmPassword = "******"
         });
     }
 }
Exemple #3
0
        public override string[] GetRolesForUser(string username)
        {
            UserBs objBs = new UserBs();

            return(new string[] { objBs.GetAll().Where(x => x.UserEmail.Equals(username)).FirstOrDefault().Role });
        }
Exemple #4
0
 internal void CreateUserIfDoesNotExist(string UserEmail, UserBs userBs)
 {
     if (userBs.GetAll().Where(x => x.UserEmail == UserEmail).Count() == 0)
     {
         userBs.Insert(new tbl_User() { UserEmail = UserEmail, Role = "U", Password = "******", ConfirmPassword = "******" });
     }
 }