public bool SignUpBO(SignUp su) { lawyer lwr = new lawyer(); if (pladb.lawyers.Where(usr => usr.EMAIL == su.Email).FirstOrDefault() == null) { lwr.First_Name = su.First_Name; lwr.Second_Name = su.Second_Name; lwr.EMAIL = su.Email; lwr.PASSWORD = su.Password; lwr.IS_ACTIVE = false; lwr.VERIFY_CODE = (DateTime.UtcNow.Ticks / 6).ToString(); lwr.Phone_No = "Add Your Contact No #"; lwr.photo = "~/images/logo.png"; lwr.court_Level = "Add your court Level"; lwr.DOB = DateTime.Now; lwr.Experience = "Not Set"; lwr.Area = "Area not set"; lwr.Address = "Address not set"; pladb.lawyers.Add(lwr); pladb.SaveChanges(); return(true); } else { return(false); } }
public bool ForgotPassword(String Email) { pladb = new pladbEntities(); lawyer lr = pladb.lawyers.Where(lwr => lwr.EMAIL == Email).FirstOrDefault(); if (lr != null) { lr.PASSWORD = (DateTime.UtcNow.Ticks / 6).ToString(); pladb.SaveChanges(); SendForGotPasswordEmail(Email, lr.PASSWORD); return(true); } else { return(false); } }