public ActionResult Edit(Customer customer) { try { string Msg; string showMsg = "Customer Updated Successfully!"; bool response = _customService.UpdateMyCustomer(customer, out Msg); if (response) { if (Msg == "NOERROR") { ViewBag.msgShow = showMsg; return(RedirectToAction("Index")); } } ViewBag.msgShow = Msg; return(View()); } catch { //ViewBag.msgShow = clientErrMsg; return(View()); } }