public ActionResult CreatePage(LoanViewModel lvm) { GLobalClient cc = new GLobalClient(); if (lvm != null) { string value = lvm.PageModel.PageName; bool val = DataReaders.ValidatePage(value); if (val == true) { TempData["Message"] = "Page Already Exist"; return(RedirectToAction("Page", "index", new { area = "" })); } else if (val == false) { lvm.PageModel.isvisible = 1; lvm.PageModel.pageHeader = 1; cc.CreatePage(lvm.PageModel); TempData["Message"] = "Page Created Succesfully"; return(RedirectToAction("Page", "index", new { area = "" })); } } else { TempData["Message"] = "Error Creating Page"; } return(RedirectToAction("Page", "index", new { area = "" })); }