コード例 #1
0
 public JsonResult Save([Bind(Include = "Id,Name,Description,IsActive")] EmployeeCategoryModel employeeCategory, bool isInsert)
 {
     if (isInsert)
     {
         employeeCategory.SetCreateProperties(LoginInformation.UserInformation.Id);
         employeeCategory.Id = _employeeCategoryService.Insert(employeeCategory);
     }
     else
     {
         employeeCategory.SetUpdateProperties(LoginInformation.UserInformation.Id);
         _employeeCategoryService.Update(employeeCategory);
     }
     return(new JsonResult {
         Data = employeeCategory
     });
 }
コード例 #2
0
        public ActionResult AddEmployeeCategory(EmployeeCategoryModel model)
        {
            var result = _employeeCategoryService.AddService.AddCategory(model);

            return(BoolResult(result));
        }