public IActionResult PasswordForgot(PasswordForgotDTO passwordForgotDTO) { var password = _studentService.PasswordForgot(passwordForgotDTO); TempData["password"] = password; return(View()); }
public string PasswordForgot(PasswordForgotDTO passwordForgot) { using (GraduateStudentContext context = new GraduateStudentContext()) { var password = context.Students.SingleOrDefault(p => p.SchoolNumber == passwordForgot.SchoolNumber && p.TC == passwordForgot.TC); if (password != null && password.IsGraduate && !(password.Password == "" || password.Password == null)) { return(password.Password); } return(Messages.NotMatchInformation); } }
public async Task <bool> ResetPasswordAsync(PasswordForgotDTO passwordChange) { try { var httpcontent = new StringContent(JsonConvert.SerializeObject(passwordChange), Encoding.UTF8, "application/json"); using (HttpClient client = new HttpClient()) { var respnse = await client.PostAsync(BASEURL + "/api/account/reset-password", httpcontent); var stringResult = await respnse.Content.ReadAsStringAsync(); if (respnse.StatusCode != HttpStatusCode.OK) { return(false); } return(true); } } catch (Exception ex) { return(false); } }
public string PasswordForgot(PasswordForgotDTO passwordForgot) { return(_studentDal.PasswordForgot(passwordForgot)); }