public ActionResult Edit(int?id = null) { ViewBag.IsEdit = true; if (id == null) { return(RedirectToAction("Index")); } SPVFakturisBusiness business = new SPVFakturisBusiness(); SPVFakturisViewModel model = business.GetDetail(id.Value); if (model == null) { TempData["AlertMessage"] = new AlertMessage(StaticMessage.ERR_DATA_NOT_FOUND); return(RedirectToAction("Index")); } return(View(model)); }