public string ChangePassword(ProfileSecurity ouser) { try { HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(@"http://" + GeneralBLL.Service_Link + "/Services/AccountService.svc/ChangePassword"); httpWebRequest.Method = "POST"; httpWebRequest.ContentType = @"application/json; charset=utf-8"; using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream())) { string json = new JavaScriptSerializer().Serialize(ouser); streamWriter.Write(json); } var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse(); using (var streamReader = new StreamReader(httpResponse.GetResponseStream())) { var result = streamReader.ReadToEnd(); return(result.Replace("\"", "")); } } catch { return(string.Empty); } }
public ActionResult ChangePassword() { ProfileSecurity osec = new ProfileSecurity(); AccountsBLL oAccBLL = new AccountsBLL(); var odetails = oAccBLL.GetUserProfile(Convert.ToString(Session["UserId"])); osec.Profile_Pic = odetails.Media_Id_Img; return(View(osec)); }
public string ChangePassword(ProfileSecurity obj) { try { U_USR_LgnDAL odal = new U_USR_LgnDAL(); return(Convert.ToString(odal.ChangePassword(obj.Usr_Id, obj.New_Password, obj.Old_Password))); } catch { return(""); } }
public ActionResult ResetPassword(string Id) { if (!string.IsNullOrEmpty(Id)) { ProfileSecurity obj = new ProfileSecurity(); obj.Usr_Id = Id; return(View(obj)); } else { return(RedirectToAction("ForgotPassword")); } }
public ActionResult Reset_Password(ProfileSecurity obj) { AccountsBLL oBLL = new AccountsBLL(); var status = oBLL.ResetPassword(obj.Usr_Id, obj.New_Password); if (status == "1") { return(Content("Password Changed Sucessfully", "text/html")); } else { return(Content("Please contact Admin", "text/html")); } }
public ActionResult Change_Password(ProfileSecurity obj) { AccountsBLL oAccBll = new AccountsBLL(); obj.Usr_Id = Convert.ToString(Session["UserId"]); obj.Old_Password = string.IsNullOrEmpty(obj.Old_Password) ? string.Empty : obj.Old_Password; var status = oAccBll.ChangePassword(obj); if (status == "1") { return(Content("Password Changed Sucessfully", "text/html")); } else { return(Content("Please Enter Valid Password", "text/html")); } }