Пример #1
0
        public async Task <ActionResult> Edit(string id, SysDepartment collection)
        {
            if (!ModelState.IsValid)
            {
                return(View(collection));
            }

            _iDepartmentService.Save(id, collection);

            await _unitOfWork.CommitAsync();

            return(new EditSuccessResult(id));
        }
Пример #2
0
        public ActionResult Edit(Guid?id, SysDepartment collection)
        {
            if (!ModelState.IsValid)
            {
                return(View(collection));
            }

            _sysDepartmentService.Save(id, collection);

            _unitOfWork.Commit();

            return(RedirectToAction("Index"));
        }