Exemple #1
0
        public async Task <IActionResult> UpdateDepartment(int id, DepartmentModel model)
        {
            var entity = new Department
            {
                Id        = id,
                Code      = model.code,
                FullName  = model.name,
                ShortName = model.shortname,
                ParentId  = model.parentId,
                ManagerId = model.managerId
            };
            await _coreRep.UpdateDepartment(entity, await getCurrentUser());

            return(Ok(new ResponseModel(new
            {
                result = true
            })));
        }