public ActionResult Edit(decimal id) { ViewData["Department"] = CommonConstant.BindDepartment(); ViewData["Status"] = CommonConstant.BindStatus(); Employee obj = Employee.Find(id); if (obj != null) { return(View(obj)); } else { return(RedirectToAction("Index")); } }
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")); } }
public ActionResult Create() { ViewData["Department"] = CommonConstant.BindDepartment(); ViewData["Status"] = CommonConstant.BindStatus(); return(View()); }