public Barring CreateObject(Barring barring, IBarringService _barringService, IUoMService _uomService, IItemService _itemService, IItemTypeService _itemTypeService, IContactService _contactService, IMachineService _machineService, IWarehouseItemService _warehouseItemService, IWarehouseService _warehouseService) { barring.Errors = new Dictionary <String, String>(); if (_validator.ValidCreateObject(barring, _barringService, _uomService, _itemService, _itemTypeService, _contactService, _machineService)) { barring = _repository.CreateObject(barring); } return(barring); }
public Barring CreateObject(Barring barring, IBarringService _barringService, IUoMService _uomService, IItemService _itemService, IItemTypeService _itemTypeService, IContactService _contactService, IMachineService _machineService, IWarehouseItemService _warehouseItemService, IWarehouseService _warehouseService, IPriceMutationService _priceMutationService, IContactGroupService _contactGroupService) { barring.Errors = new Dictionary <String, String>(); if (_validator.ValidCreateObject(barring, _barringService, _uomService, _itemService, _itemTypeService, _contactService, _machineService)) { ContactGroup contactGroup = _contactGroupService.GetObjectByIsLegacy(true); barring = _repository.CreateObject(barring); PriceMutation priceMutation = _priceMutationService.CreateObject(barring, /*contactGroup,*/ barring.CreatedAt); barring.PriceMutationId = priceMutation.Id; barring = _repository.UpdateObject(barring); } return(barring); }