# The controller method
public ActionResult TermsandConditionsDeclineValidation(string AccountName)
{
try
{
string strLoanNumber = repository.GetLoanNumber(Session["access_token"].ToString());
int LoanID = repository.GetLoanId(TUtil.CheckString(strLoanNumber, string.Empty), Session["AccountName"].ToString());
int? IsTcAccepted = repository.TermsandConditionsDeclineValidation(TUtil.CheckInt(LoanID, 0));
if (IsTcAccepted == 0 || IsTcAccepted == null)
{
return RedirectToAction("EndSessionPage");
}
else
{
return RedirectToAction("GetClients");
}
}
catch (Exception ex)
{
Log.WriteError(TUtil.GetMethodExceptionContext(AccountName), ex);
return View();
}
}