public ActionResult View(int id) { if (string.IsNullOrEmpty(id.ToString())) { TempData["Error"] = "Data has already been deleted by other user!"; return(RedirectToAction("Index")); } ItemModel Model = new ItemModel(); int returnCode = _itemBLL.GetDetail(id, out Model); if (Model == null) { TempData["Error"] = "Data has already been deleted by other user!"; return(RedirectToAction("Index")); } if (!((int)Common.ReturnCode.Succeed == returnCode)) { Model = new ItemModel(); } return(View(Model)); }