示例#1
0
        public void Delete(EmployeeBindingModel model)
        {
            var element = employeeStorage.GetElement(new EmployeeBindingModel {
                Id = model.Id
            });

            if (element == null)
            {
                throw new Exception("Элемент не найден");
            }
            employeeStorage.Delete(model);
        }
示例#2
0
        public void Delete(EmployeeBindingModel model)
        {
            var element = _employeeStorage.GetElement(new EmployeeBindingModel {
                Id = model.Id
            });

            if (element == null)
            {
                throw new Exception("Пользователь не найден");
            }
            _employeeStorage.Delete(model);
        }
示例#3
0
        public void Delete(EmployeeBM model)

        {
            var element = _employeeStorage.GetElement(new EmployeeBM
            {
                Id = model.Id
            });

            if (element == null)
            {
                throw new Exception("Сотрудник не найден");
            }
            _employeeStorage.Delete(model);
        }
 public ActionResult DeleteEmployee(int id)
 {
     _empStore.Delete(id);
     return(RedirectToAction("Employees"));
 }
示例#5
0
 public RedirectToActionResult Delete(int id)
 {
     _storage.Delete(id);
     return(RedirectToAction("List", "Employee"));
 }
示例#6
0
 public void Delete(long id)
 {
     employeeStorage.Delete(id);
 }
 public void Delete(Guid id)
 {
     _storage.Delete(id);
 }