コード例 #1
0
        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"));
            }
        }
コード例 #2
0
 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());
 }
コード例 #3
0
        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"));
            }
        }
コード例 #4
0
 public ActionResult Create()
 {
     ViewData["Department"] = CommonConstant.BindDepartment();
     ViewData["Status"]     = CommonConstant.BindStatus();
     return(View());
 }