public void ResetPasswords(string value, LoanViewModel lvm) { try { // if (Request.QueryString["value"] != null) if (value != "") { // value = Request.QueryString["value"]; var result = DataReaders.checkValue(value); if (result != null) { DateTime dtCreate = result.DateTim.Value; DateTime dtNow = Classes.Utility.GetCurrentDateTime(); DateTime dtExp = dtCreate.AddMinutes(15); if (dtNow > dtExp) { TempData["message"] = "Password Reset Link Expired"; } else { var user = DataReaders.getUsers(value); users.id = user.id; UpdatePassword(lvm); } } else { var id = DataReaders.getUsers(value); TempData["message"] = "Invalid key please try again."; return; } } else { TempData["message"] = "Invalid Url"; return; } } catch (Exception ex) { Response.Write(ex.Message.ToString()); WebLog.Log(ex.Message.ToString()); } }