public ActionResult ForgotPassword(LoginViewModel model) { var user = objUser.GetUser().Where(p => p.UserName.ToUpper() == model.UserName.ToUpper()).FirstOrDefault(); if (SettingsManager.Instance.Branding == "SINDHI") { user = objUser.GetUser().Where(p => p.MobileNo.ToUpper() == model.MobileNo.ToUpper()).FirstOrDefault(); } if (user != null) { if (!string.IsNullOrEmpty(user.MailId)) { bool status = false; StringBuilder sb = new StringBuilder(); if (SettingsManager.Instance.Branding == "SINDHI") { sb.Append("Please do login Using below credintials Login Id : ").Append(user.MobileNo).Append(" And Password : "******" and complete your profile, ").Append(SettingsManager.Instance.SindhuRegards); string message = HttpUtility.UrlEncode(sb.ToString()); objUser.SendUserSMS(user.MobileNo, message); status = true; } else { status = objUser.SendMail(user); } if (status) { return(Json(new ResponseModel() { Status = true, ErrorMessage = SettingsManager.Instance.Branding == "SINDHI" ? Resources.SPMOResources.ForgotPassword : "******" }, JsonRequestBehavior.AllowGet)); } else { return(Json(new ResponseModel() { Status = false, ErrorMessage = SettingsManager.Instance.Branding == "SINDHI" ? Resources.SPMOResources.ContactAdmin : "कृपया व्यवस्थापनाशी संपर्क करा." }, JsonRequestBehavior.AllowGet)); } } else { return(Json(new ResponseModel() { Status = false, ErrorMessage = SettingsManager.Instance.Branding == "SINDHI" ? Resources.SPMOResources.ContactAdmin : "कृपया व्यवस्थापनाशी संपर्क करा." }, JsonRequestBehavior.AllowGet)); } } else { return(Json(new ResponseModel() { Status = false, ErrorMessage = SettingsManager.Instance.Branding == "SINDHI" ? Resources.SPMOResources.InvalidUserName : "******" }, JsonRequestBehavior.AllowGet)); } }