public ActionResult Delete(int Id) { ViewBag.Title = "Delete"; InsuranceCompany objCompany = new InsuranceCompanyRepository().GetCompany(Id); return(View("Create", objCompany)); }
public ActionResult Delete(InsuranceCompany model) { Result res = new InsuranceCompanyRepository().Delete(model); if (res.Value) { TempData["Success"] = "Deleted Successfully!"; } else { } return(RedirectToAction("Index")); }
public ActionResult Create(InsuranceCompany model) { if (!ModelState.IsValid) { var allErrors = ModelState.Values.SelectMany(v => v.Errors); return(View(model)); } Result res = new InsuranceCompanyRepository().Insert(model); if (res.Value) { TempData["Success"] = "Saved Successfully!"; } else { } return(RedirectToAction("Index")); }