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 }); }
public ActionResult AddEmployeeCategory(EmployeeCategoryModel model) { var result = _employeeCategoryService.AddService.AddCategory(model); return(BoolResult(result)); }