public bool SaveUser(tbl_Users user) { try { //For staff default password if (user.Group_Id == 2) { user.Password = "******"; } var result = dbContext.SP_SaveUser(user.User_Id, user.FirstName, user.LastName, (user.Gender.Length > 0 ? user.Gender[0].ToString() : ""), user.Phone, user.Password, user.Email_Id, user.Group_Id, user.IsActive).ToList(); if (result.Any()) { if (result.FirstOrDefault().Result == 1) { return(true); } } return(false); } catch (Exception ex) { throw ex; } }
public bool ValidateUserName(tbl_Users user) { try { return(dbContext.tbl_Users.Any(x => x.User_Name == user.User_Name)); } catch (Exception ex) { throw ex; } }
public bool SaveUser(tbl_Users user) { return(dl.SaveUser(user)); }
public bool ValidateUserName(tbl_Users user) { return(dl.ValidateUserName(user)); }