public ActionResult Create(DepartmentDto model)
 {
     try
     {
         // TODO: Add insert logic here
         model.depAddTime = DateTime.Now;
         _appService.Insert(model);
         AjaxModel.Statu = "ok";
     }
     catch (Exception ex)
     {
         AjaxModel.Statu = "err";
         AjaxModel.Msg   = ex.ToString();
     }
     return(Json(AjaxModel));
 }
示例#2
0
 public IActionResult Create(DepartmentDto department)
 {
     _departmentAppService.Insert(department);
     return(RedirectToAction("Index", "Department"));
 }