public ProductSectionForm() { InitializeComponent(); IKernel kernel = BootStrapper.Initialize(); _productSectionService = kernel.GetService(typeof(ProductSectionService)) as ProductSectionService; _productSection = new ProductSectionModel(); }
public ProductStoreForm() { InitializeComponent(); IKernel kernel = BootStrapper.Initialize(); _productStoreService = kernel.GetService(typeof(ProductStoreService)) as ProductStoreService; _purchaseReceiveService = kernel.GetService(typeof(PurchaseReceiveService)) as PurchaseReceiveService; _purchaseReceiveDetailService = kernel.GetService(typeof(PurchaseReceiveDetailService)) as PurchaseReceiveDetailService; _productUnitService = kernel.GetService(typeof(ProductUnitService)) as ProductUnitService; _productSectionService = kernel.GetService(typeof(ProductSectionService)) as ProductSectionService; _productStore = new ProductStoreModel(); }
public SectionProductsController(IProductSectionService productSectionService) { _productSectionService = productSectionService ?? throw new ArgumentNullException(nameof(productSectionService)); }