public CustomPurchaseInvoiceController() { _contactService = new ContactService(new ContactRepository(), new ContactValidator()); _itemService = new ItemService(new ItemRepository(), new ItemValidator()); _itemTypeService = new ItemTypeService(new ItemTypeRepository(), new ItemTypeValidator()); _uoMService = new UoMService(new UoMRepository(), new UoMValidator()); _warehouseItemService = new WarehouseItemService(new WarehouseItemRepository(), new WarehouseItemValidator()); _warehouseService = new WarehouseService(new WarehouseRepository(), new WarehouseValidator()); _stockMutationService = new StockMutationService(new StockMutationRepository(), new StockMutationValidator()); _barringService = new BarringService(new BarringRepository(), new BarringValidator()); _priceMutationService = new PriceMutationService(new PriceMutationRepository(), new PriceMutationValidator()); _contactGroupService = new ContactGroupService(new ContactGroupRepository(), new ContactGroupValidator()); _purchaseOrderDetailService = new PurchaseOrderDetailService(new PurchaseOrderDetailRepository(), new PurchaseOrderDetailValidator()); _salesOrderDetailService = new SalesOrderDetailService(new SalesOrderDetailRepository(), new SalesOrderDetailValidator()); _stockAdjustmentDetailService = new StockAdjustmentDetailService(new StockAdjustmentDetailRepository(), new StockAdjustmentDetailValidator()); _cashBankService = new CashBankService(new CashBankRepository(), new CashBankValidator()); _cashMutationService = new CashMutationService(new CashMutationRepository(), new CashMutationValidator()); _customPurchaseInvoiceService = new CustomPurchaseInvoiceService(new CustomPurchaseInvoiceRepository(), new CustomPurchaseInvoiceValidator()); _customPurchaseInvoiceDetailService = new CustomPurchaseInvoiceDetailService(new CustomPurchaseInvoiceDetailRepository(), new CustomPurchaseInvoiceDetailValidator()); _cashSalesReturnService = new CashSalesReturnService(new CashSalesReturnRepository(), new CashSalesReturnValidator()); _quantityPricingService = new QuantityPricingService(new QuantityPricingRepository(), new QuantityPricingValidator()); _payableService = new PayableService(new PayableRepository(), new PayableValidator()); _paymentVoucherService = new PaymentVoucherService(new PaymentVoucherRepository(), new PaymentVoucherValidator()); _paymentVoucherDetailService = new PaymentVoucherDetailService(new PaymentVoucherDetailRepository(), new PaymentVoucherDetailValidator()); _receivableService = new ReceivableService(new ReceivableRepository(), new ReceivableValidator()); _accountService = new AccountService(new AccountRepository(), new AccountValidator()); _generalLedgerJournalService = new GeneralLedgerJournalService(new GeneralLedgerJournalRepository(), new GeneralLedgerJournalValidator()); _closingService = new ClosingService(new ClosingRepository(), new ClosingValidator()); _validCombService = new ValidCombService(new ValidCombRepository(), new ValidCombValidator()); }
public void TestFixtureSetUp() { try { CodeSharp.Core.Configuration.ConfigWithEmbeddedXml(null , "application_config" , Assembly.GetExecutingAssembly() , "Cooper.Model.Test.ConfigFiles") .RenderProperties() .Castle(o => this.Resolve(o.Container)); //初始化同步锁 DependencyResolver.Resolve<ILockHelper>().Init<Account>(); DependencyResolver.Resolve<ILockHelper>().Init<GoogleConnection>(); DependencyResolver.Resolve<ILockHelper>().Init<GitHubConnection>(); } catch (Exception e) { if (!e.Message.Contains("不可重复初始化配置")) Console.WriteLine(e.Message); } this._log = DependencyResolver.Resolve<ILoggerFactory>().Create(this.GetType()); this._sessionManager = DependencyResolver.Resolve<Castle.Facilities.NHibernateIntegration.ISessionManager>(); this._accountHelper = DependencyResolver.Resolve<IAccountHelper>(); this._accountService = DependencyResolver.Resolve<IAccountService>(); this._accountConnectionService = DependencyResolver.Resolve<IAccountConnectionService>(); this._taskService = DependencyResolver.Resolve<ITaskService>(); this._tasklistService = DependencyResolver.Resolve<ITasklistService>(); this._addressBookService = DependencyResolver.Resolve<IAddressBookService>(); this._contactGroupService = DependencyResolver.Resolve<IContactGroupService>(); this._contactService = DependencyResolver.Resolve<IContactService>(); }
public ContactGroupController(IUnitOfWorkPseezEnt uow, IContactGroupService contactGroupService, IContactListService contactListService) { _uow = uow; _contactGroupService = contactGroupService; _contactListService = contactListService; }
public Item UpdateLegacyObject(Item item, IUoMService _uomService, IItemTypeService _itemTypeService, IWarehouseItemService _warehouseItemService, IWarehouseService _warehouseService, IBarringService _barringService, IContactService _contactService, IMachineService _machineService, IPriceMutationService _priceMutationService, IContactGroupService _contactGroupService) { Barring barring = _barringService.GetObjectById(item.Id); if (barring != null) { _barringService.UpdateObject(barring, _barringService, _uomService, this, _itemTypeService, _contactService, _machineService, _warehouseItemService, _warehouseService, _contactGroupService, _priceMutationService); return(barring); } if (_validator.ValidUpdateLegacyObject(item, _uomService, this, _itemTypeService)) { ContactGroup contactGroup = _contactGroupService.GetObjectByIsLegacy(true); Item olditem = _repository.GetObjectById(item.Id); // Note: olditem might be pointing to the same memory with item (share the same contents) PriceMutation oldpriceMutation = _priceMutationService.GetObjectById(item.PriceMutationId); if (olditem.SellingPrice != item.SellingPrice) { DateTime priceMutationTimeStamp = DateTime.Now; PriceMutation priceMutation = _priceMutationService.CreateObject(item, /*contactGroup,*/ priceMutationTimeStamp); item.PriceMutationId = priceMutation.Id; _priceMutationService.DeactivateObject(oldpriceMutation, priceMutationTimeStamp); } item = _repository.UpdateObject(item); } return(item); }
public ContactGroupSetupModel() { _contactGroupService = HostContainer.GetInstance <IContactGroupService>(); Step = NotificationEnums.NotificationSetupStep.SetupContactGroup; ContactSearchModel = new ContactSearchModel(); }
public NotificationService(IRepository <Notification> notificationRepository, IContactService contactService, IContactGroupService contactGroupService, INotificationTemplateService notificationTemplateService) { _notificationRepository = notificationRepository; _contactGroupService = contactGroupService; _notificationTemplateService = notificationTemplateService; _contactService = contactService; }
public MstContactController() { _contactService = new ContactService(new ContactRepository(), new ContactValidator()); _coreIdentificationService = new CoreIdentificationService(new CoreIdentificationRepository(), new CoreIdentificationValidator()); _barringService = new BarringService(new BarringRepository(), new BarringValidator()); _purchaseOrderService = new PurchaseOrderService(new PurchaseOrderRepository(), new PurchaseOrderValidator()); _salesOrderService = new SalesOrderService(new SalesOrderRepository(), new SalesOrderValidator()); _contactGroupService = new ContactGroupService(new ContactGroupRepository(), new ContactGroupValidator()); }
public Contact VHasContactGroup(Contact contact, IContactGroupService _contactGroupService) { ContactGroup contactGroup = _contactGroupService.GetObjectById(contact.ContactGroupId); if (contactGroup == null) { contact.Errors.Add("ContactGroup", "Tidak ada"); } return(contact); }
public AddToGroupModel() { _contactGroupService = HostContainer.GetInstance <IContactGroupService>(); // Get ids Ids = _contactGroupService.GetActiveContactGroups(); AddToGroupType = ContactGroupEnums.AddToGroupType.New; AddToGroupTypes = EnumUtilities.GetAllItems <ContactGroupEnums.AddToGroupType>(); }
public GroupItemPrice VIsValidGroup(GroupItemPrice groupItemPrice, IContactGroupService _contactGroupService) { ContactGroup contactGroup = _contactGroupService.GetObjectById(groupItemPrice.ContactGroupId); if (contactGroup == null) { groupItemPrice.Errors.Add("ContactGroupId", "Tidak valid"); } return(groupItemPrice); }
public Contact FindOrCreateBaseContact(IContactGroupService _contactGroupService) { Contact contact = GetObjectByName(Core.Constants.Constant.BaseContact); if (contact == null) { contact = CreateObject(Core.Constants.Constant.BaseContact, "BaseAddr", "BaseNo", "BasePic", "BasePicNo", "Base@Email", _contactGroupService); } return(contact); }
public ContactListController(IUnitOfWorkPseezEnt uow, IContactListService contactListService, IIdentityUserService identityUserService, IContactGroupService contactGroupService, IContactService contactService, IUserContactListService userContactListService) { _uow = uow; _identityUserService = identityUserService; _contactListService = contactListService; _contactGroupService = contactGroupService; _contactService = contactService; _userContactListService = userContactListService; }
public ContactGroup VHasUniqueName(ContactGroup contactGroup, IContactGroupService _contactGroupService) { if (String.IsNullOrEmpty(contactGroup.Name) || contactGroup.Name.Trim() == "") { contactGroup.Errors.Add("Name", "Tidak boleh kosong"); } else if (_contactGroupService.IsNameDuplicated(contactGroup)) { contactGroup.Errors.Add("Name", "Tidak boleh ada duplikasi"); } return(contactGroup); }
public Contact CreateObject(Contact contact, IContactGroupService _contactGroupService) { if (contact.ContactGroupId == 0) { ContactGroup baseGroup = _contactGroupService.GetObjectByIsLegacy(true); if (baseGroup != null) { contact.ContactGroupId = baseGroup.Id; } } contact.Errors = new Dictionary <String, String>(); return(_validator.ValidCreateObject(contact, this, _contactGroupService) ? _repository.CreateObject(contact) : contact); }
public GroupItemPrice CreateObject(GroupItemPrice groupItemPrice, IContactGroupService _contactGroupService, IItemService _itemService, IPriceMutationService _priceMutationService) { groupItemPrice.Errors = new Dictionary <String, String>(); if (_validator.ValidCreateObject(groupItemPrice, this, _contactGroupService, _itemService)) { Item item = _itemService.GetObjectById(groupItemPrice.ItemId); groupItemPrice.CreatedAt = DateTime.Now; PriceMutation priceMutation = _priceMutationService.CreateObject(item.Id, /*groupItemPrice.ContactGroupId,*/ item.SellingPrice, groupItemPrice.CreatedAt); groupItemPrice.PriceMutationId = priceMutation.Id; groupItemPrice = _repository.CreateObject(groupItemPrice); } return(groupItemPrice); }
public MstBarringController() { _itemTypeService = new ItemTypeService(new ItemTypeRepository(), new ItemTypeValidator()); _warehouseItemService = new WarehouseItemService(new WarehouseItemRepository(), new WarehouseItemValidator()); _itemService = new ItemService(new ItemRepository(), new ItemValidator()); _uomService = new UoMService(new UoMRepository(), new UoMValidator()); _warehouseService = new WarehouseService(new WarehouseRepository(), new WarehouseValidator()); _machineService = new MachineService(new MachineRepository(), new MachineValidator()); _barringService = new BarringService(new BarringRepository(), new BarringValidator()); _contactService = new ContactService(new ContactRepository(), new ContactValidator()); _contactGroupService = new ContactGroupService(new ContactGroupRepository(), new ContactGroupValidator()); _priceMutationService = new PriceMutationService(new PriceMutationRepository(), new PriceMutationValidator()); }
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); }
public Contact CreateObject(string Name, string Address, string ContactNo, string PIC, string PICContactNo, string Email, IContactGroupService _contactGroupService) { Contact contact = new Contact { Name = Name, Address = Address, ContactNo = ContactNo, PIC = PIC, PICContactNo = PICContactNo, Email = Email }; return(this.CreateObject(contact, _contactGroupService)); }
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); }
public CoreBuilder CreateObject(string BaseSku, string SkuNewCore, string SkuUsedCore, string Name, string Category, int UoMId, IUoMService _uomService, IItemService _itemService, IItemTypeService _itemTypeService, IWarehouseItemService _warehouseItemService, IWarehouseService _warehouseService, IPriceMutationService _priceMutationService, IContactGroupService _contactGroupService) { CoreBuilder coreBuilder = new CoreBuilder { BaseSku = BaseSku, SkuNewCore = SkuNewCore, SkuUsedCore = SkuUsedCore, Name = Name, Category = Category, UoMId = UoMId }; return(this.CreateObject(coreBuilder, _uomService, _itemService, _itemTypeService, _warehouseItemService, _warehouseService, _priceMutationService, _contactGroupService)); }
public MstItemController() { _itemService = new ItemService(new ItemRepository(), new ItemValidator()); _itemTypeService = new ItemTypeService(new ItemTypeRepository(), new ItemTypeValidator()); _uoMService = new UoMService(new UoMRepository(), new UoMValidator()); _warehouseItemService = new WarehouseItemService(new WarehouseItemRepository(), new WarehouseItemValidator()); _warehouseService = new WarehouseService(new WarehouseRepository(), new WarehouseValidator()); _stockMutationService = new StockMutationService(new StockMutationRepository(), new StockMutationValidator()); _barringService = new BarringService(new BarringRepository(), new BarringValidator()); _contactService = new ContactService(new ContactRepository(), new ContactValidator()); _priceMutationService = new PriceMutationService(new PriceMutationRepository(), new PriceMutationValidator()); _contactGroupService = new ContactGroupService(new ContactGroupRepository(), new ContactGroupValidator()); _purchaseOrderDetailService = new PurchaseOrderDetailService(new PurchaseOrderDetailRepository(), new PurchaseOrderDetailValidator()); _stockAdjustmentDetailService = new StockAdjustmentDetailService(new StockAdjustmentDetailRepository(), new StockAdjustmentDetailValidator()); _salesOrderDetailService = new SalesOrderDetailService(new SalesOrderDetailRepository(), new SalesOrderDetailValidator()); _machineService = new MachineService(new MachineRepository(), new MachineValidator()); }
public RollerBuilder UpdateObject(RollerBuilder rollerBuilder, IMachineService _machineService, IUoMService _uomService, IItemService _itemService, IItemTypeService _itemTypeService, ICoreBuilderService _coreBuilderService, IRollerTypeService _rollerTypeService, IWarehouseItemService _warehouseItemService, IWarehouseService _warehouseService, IBarringService _barringService, IContactService _contactService, IPriceMutationService _priceMutationService, IContactGroupService _contactGroupService) { Item RollerUsedCore = _itemService.GetObjectById(rollerBuilder.RollerUsedCoreItemId); RollerUsedCore.Name = rollerBuilder.Name; RollerUsedCore.Category = rollerBuilder.Category; Item RollerNewCore = _itemService.GetObjectById(rollerBuilder.RollerNewCoreItemId); RollerNewCore.Name = rollerBuilder.Name; RollerNewCore.Category = rollerBuilder.Category; if (_itemService.GetValidator().ValidUpdateLegacyObject(RollerUsedCore, _uomService, _itemService, _itemTypeService) && _itemService.GetValidator().ValidUpdateLegacyObject(RollerNewCore, _uomService, _itemService, _itemTypeService)) { if (_validator.ValidUpdateObject(rollerBuilder, this, _machineService, _uomService, _itemService, _coreBuilderService, _rollerTypeService)) { _itemService.UpdateLegacyObject(RollerUsedCore, _uomService, _itemTypeService, _warehouseItemService, _warehouseService, _barringService, _contactService, _machineService, _priceMutationService, _contactGroupService); _itemService.UpdateLegacyObject(RollerNewCore, _uomService, _itemTypeService, _warehouseItemService, _warehouseService, _barringService, _contactService, _machineService, _priceMutationService, _contactGroupService); rollerBuilder = _repository.UpdateObject(rollerBuilder); } } else { if (RollerUsedCore.Errors.Count() > 0) { rollerBuilder.Errors.Add(RollerUsedCore.Errors.First().Key, RollerUsedCore.Errors.First().Value); } else if (RollerNewCore.Errors.Count() > 0) { rollerBuilder.Errors.Add(RollerNewCore.Errors.First().Key, RollerNewCore.Errors.First().Value); } else { rollerBuilder.Errors.Add("Generic", "Item tidak dapat di update"); } } return(rollerBuilder); }
public CoreBuilder UpdateObject(CoreBuilder coreBuilder, IUoMService _uomService, IItemService _itemService, IItemTypeService _itemTypeService, IWarehouseItemService _warehouseItemService, IWarehouseService _warehouseService, IBarringService _barringService, IContactService _contactService, IMachineService _machineService, IPriceMutationService _priceMutationService, IContactGroupService _contactGroupService) { Item UsedCore = _itemService.GetObjectById(coreBuilder.UsedCoreItemId); UsedCore.Name = coreBuilder.Name; UsedCore.Category = coreBuilder.Category; Item NewCore = _itemService.GetObjectById(coreBuilder.NewCoreItemId); NewCore.Name = coreBuilder.Name; NewCore.Category = coreBuilder.Category; if (_itemService.GetValidator().ValidUpdateLegacyObject(UsedCore, _uomService, _itemService, _itemTypeService) && _itemService.GetValidator().ValidUpdateLegacyObject(NewCore, _uomService, _itemService, _itemTypeService)) { if (_validator.ValidUpdateObject(coreBuilder, this, _uomService, _itemService)) { _itemService.UpdateLegacyObject(UsedCore, _uomService, _itemTypeService, _warehouseItemService, _warehouseService, _barringService, _contactService, _machineService, _priceMutationService, _contactGroupService); _itemService.UpdateLegacyObject(NewCore, _uomService, _itemTypeService, _warehouseItemService, _warehouseService, _barringService, _contactService, _machineService, _priceMutationService, _contactGroupService); coreBuilder = _repository.UpdateObject(coreBuilder); } } else { if (UsedCore.Errors.Count() > 0) { coreBuilder.Errors.Add(UsedCore.Errors.First().Key, UsedCore.Errors.First().Value); } else if (NewCore.Errors.Count() > 0) { coreBuilder.Errors.Add(NewCore.Errors.First().Key, NewCore.Errors.First().Value); } else { coreBuilder.Errors.Add("Generic", "Item tidak dapat di update"); } } return(coreBuilder); }
public void TestFixtureSetUp() { try { CodeSharp.Core.Configuration.ConfigWithEmbeddedXml(null , "application_config" , Assembly.GetExecutingAssembly() , "Cooper.Model.Test.ConfigFiles") .RenderProperties() .Castle(o => this.Resolve(o.Container)); //初始化同步锁 DependencyResolver.Resolve <ILockHelper>().Init <Account>(); DependencyResolver.Resolve <ILockHelper>().Init <GoogleConnection>(); DependencyResolver.Resolve <ILockHelper>().Init <GitHubConnection>(); DependencyResolver.Resolve <ILockHelper>().Init <Member>(); } catch (Exception e) { if (!e.Message.Contains("不可重复初始化配置")) { Console.WriteLine(e.Message); throw e; } } this._log = DependencyResolver.Resolve <ILoggerFactory>().Create(this.GetType()); this._sessionManager = DependencyResolver.Resolve <Castle.Facilities.NHibernateIntegration.ISessionManager>(); this._accountHelper = DependencyResolver.Resolve <IAccountHelper>(); this._accountService = DependencyResolver.Resolve <IAccountService>(); this._accountConnectionService = DependencyResolver.Resolve <IAccountConnectionService>(); this._taskService = DependencyResolver.Resolve <Cooper.Model.Tasks.ITaskService>(); this._taskFolderService = DependencyResolver.Resolve <ITaskFolderService>(); this._addressBookService = DependencyResolver.Resolve <IAddressBookService>(); this._contactGroupService = DependencyResolver.Resolve <IContactGroupService>(); this._contactService = DependencyResolver.Resolve <IContactService>(); this._teamService = DependencyResolver.Resolve <ITeamService>(); this._personalTaskService = DependencyResolver.Resolve <Cooper.Model.Tasks.IPersonalTaskService>(); this._teamTaskService = DependencyResolver.Resolve <Cooper.Model.Teams.ITaskService>(); }
public Barring UpdateObject(Barring barring, IBarringService _barringService, IUoMService _uomService, IItemService _itemService, IItemTypeService _itemTypeService, IContactService _contactService, IMachineService _machineService, IWarehouseItemService _warehouseItemService, IWarehouseService _warehouseService, IContactGroupService _contactGroupService, IPriceMutationService _priceMutationService) { if (_validator.ValidUpdateObject(barring, _barringService, _uomService, _itemService, _itemTypeService, _contactService, _machineService)) { ContactGroup contactGroup = _contactGroupService.GetObjectByIsLegacy(true); Barring oldbarring = _repository.GetObjectById(barring.Id); PriceMutation oldpriceMutation = _priceMutationService.GetObjectById(barring.PriceMutationId); if (oldbarring.SellingPrice != barring.SellingPrice) { DateTime priceMutationTimeStamp = DateTime.Now; PriceMutation priceMutation = _priceMutationService.CreateObject(oldbarring, /*contactGroup,*/ priceMutationTimeStamp); barring.PriceMutationId = priceMutation.Id; _priceMutationService.DeactivateObject(oldpriceMutation, priceMutationTimeStamp); } _repository.UpdateObject(barring); } return(barring); }
public MstCoreBuilderController() { _coreBuilderService = new CoreBuilderService(new CoreBuilderRepository(), new CoreBuilderValidator()); _itemTypeService = new ItemTypeService(new ItemTypeRepository(), new ItemTypeValidator()); _rollerBuilderService = new RollerBuilderService(new RollerBuilderRepository(), new RollerBuilderValidator()); _coreIdentificationDetailService = new CoreIdentificationDetailService(new CoreIdentificationDetailRepository(), new CoreIdentificationDetailValidator()); _recoveryOrderDetailService = new RecoveryOrderDetailService(new RecoveryOrderDetailRepository(), new RecoveryOrderDetailValidator()); _recoveryAccessoryDetailService = new RecoveryAccessoryDetailService(new RecoveryAccessoryDetailRepository(), new RecoveryAccessoryDetailValidator()); _warehouseItemService = new WarehouseItemService(new WarehouseItemRepository(), new WarehouseItemValidator()); _stockMutationService = new StockMutationService(new StockMutationRepository(), new StockMutationValidator()); _itemService = new ItemService(new ItemRepository(), new ItemValidator()); _uomService = new UoMService(new UoMRepository(), new UoMValidator()); _warehouseService = new WarehouseService(new WarehouseRepository(), new WarehouseValidator()); _barringService = new BarringService(new BarringRepository(), new BarringValidator()); _contactService = new ContactService(new ContactRepository(), new ContactValidator()); _priceMutationService = new PriceMutationService(new PriceMutationRepository(), new PriceMutationValidator()); _contactGroupService = new ContactGroupService(new ContactGroupRepository(), new ContactGroupValidator()); _purchaseOrderDetailService = new PurchaseOrderDetailService(new PurchaseOrderDetailRepository(), new PurchaseOrderDetailValidator()); _stockAdjustmentDetailService = new StockAdjustmentDetailService(new StockAdjustmentDetailRepository(), new StockAdjustmentDetailValidator()); _salesOrderDetailService = new SalesOrderDetailService(new SalesOrderDetailRepository(), new SalesOrderDetailValidator()); _machineService = new MachineService(new MachineRepository(), new MachineValidator()); _rollerTypeService = new RollerTypeService(new RollerTypeRepository(), new RollerTypeValidator()); }
public GroupItemPrice VCreateObject(GroupItemPrice groupItemPrice, IGroupItemPriceService _groupItemPriceService, IContactGroupService _contactGroupService, IItemService _itemService) { VNonNegativePrice(groupItemPrice); if (!isValid(groupItemPrice)) { return(groupItemPrice); } VHasUniqueIdCombination(groupItemPrice, _groupItemPriceService); if (!isValid(groupItemPrice)) { return(groupItemPrice); } VIsValidGroup(groupItemPrice, _contactGroupService); if (!isValid(groupItemPrice)) { return(groupItemPrice); } VIsValidItem(groupItemPrice, _itemService); return(groupItemPrice); }
public bool ValidCreateObject(GroupItemPrice groupItemPrice, IGroupItemPriceService _groupItemPriceService, IContactGroupService _contactGroupService, IItemService _itemService) { VCreateObject(groupItemPrice, _groupItemPriceService, _contactGroupService, _itemService); return(isValid(groupItemPrice)); }
public bool ValidUpdateObject(Contact contact, IContactService _contactService, IContactGroupService _contactGroupService) { contact.Errors.Clear(); VUpdateObject(contact, _contactService, _contactGroupService); return(isValid(contact)); }
public bool ValidCreateObject(Contact contact, IContactService _contactService, IContactGroupService _contactGroupService) { VCreateObject(contact, _contactService, _contactGroupService); return(isValid(contact)); }
public Contact VUpdateObject(Contact contact, IContactService _contactService, IContactGroupService _contactGroupService) { VCreateObject(contact, _contactService, _contactGroupService); return(contact); }