Example #1
0
 public Item CreateLegacyObject(Item item, IUoMService _uomService, IItemTypeService _itemTypeService, IWarehouseItemService _warehouseItemService, IWarehouseService _warehouseService)
 {
     item.Errors = new Dictionary <String, String>();
     if (_validator.ValidCreateLegacyObject(item, _uomService, this, _itemTypeService))
     {
         item = _repository.CreateObject(item);
     }
     return(item);
 }
Example #2
0
 public Item CreateLegacyObject(Item item, IUoMService _uomService, IItemTypeService _itemTypeService, IWarehouseItemService _warehouseItemService, IWarehouseService _warehouseService,
                                IPriceMutationService _priceMutationService, IContactGroupService _contactGroupService)
 {
     item.Errors = new Dictionary <String, String>();
     if (_validator.ValidCreateLegacyObject(item, _uomService, this, _itemTypeService))
     {
         ContactGroup contactGroup = _contactGroupService.GetObjectByIsLegacy(true);
         item = _repository.CreateObject(item);
         PriceMutation priceMutation = _priceMutationService.CreateObject(item, /*contactGroup,*/ item.CreatedAt);
         item.PriceMutationId = priceMutation.Id;
         _repository.UpdateObject(item);
     }
     return(item);
 }