コード例 #1
0
 public ActionResult Create(DepartmentModel model)
 {
     if (model != null && Validate(model))
     {
         if (Validate(model))
         {
             DepartmentBO.Create(model.Name, model.UserId, DateTime.Now, DateTime.Now, CurrentUser.Id, CurrentUser.Id);
             return(RedirectToAction("Index"));
         }
     }
     else
     {
         ModelState.AddModelError("", "Create deparment not succeed");
         return(RedirectToAction("Create"));
     }
     return(View(model));
 }