public ActionResult Input(string id = "") { try { if (string.IsNullOrEmpty(id)) { ViewBag.Title = " Create new Shipper"; Shipper newShipper = new Shipper() { ShipperID = 0 }; return(View(newShipper)); } else { ViewBag.Title = "Edit a Shipper"; Shipper editShipper = CataLogBLL.GetShipper(Convert.ToInt32(id)); if (editShipper == null) { return(RedirectToAction("Index")); } return(View(editShipper)); } }catch (Exception ex) { return(Content(ex.Message + "" + ex.StackTrace)); } }