public ActionResult Create(decimal?id) { ViewData["Employee"] = Employee.ListEmployee(1); ViewData["DocType"] = CommonConstant.BindDocumentType(); ViewData["Status"] = CommonConstant.BindStatus(); if (id != null) { ViewData["CurrEmployee"] = id; } else { ViewData["CurrEmployee"] = string.Empty; } return(View()); }
public ActionResult Edit(decimal id) { ViewData["Employee"] = Employee.ListEmployee(1); ViewData["DocType"] = CommonConstant.BindDocumentType(); ViewData["Status"] = CommonConstant.BindStatus(); EmployeeDocument obj = EmployeeDocument.Find(id); if (obj != null) { return(View(obj)); } else { return(RedirectToAction("Index")); } }