public SalesController() { var dbfactory = new DatabaseFactory(); var unitOfWork = new UnitOfWork(dbfactory); _salesOrderService = new SalesOrderService(new SalesOrderRepository(dbfactory), new SalesOrderDetailRepository(dbfactory), new SalesOrderApprovalRepository(dbfactory), new NotificationRepository(dbfactory), new NotificationDetailRepository(dbfactory), unitOfWork); _approvalController = new ApprovalController<SlsSalesOrderApproval, SlsSalesOrderViewModel>(_salesOrderService); _deliveryService = new DeliveryService(new DeliveryRepository(dbfactory), new DeliveryDetailRepository(dbfactory), unitOfWork); _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), unitOfWork); _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), unitOfWork); _officeService = new OfficeService(new OfficeRepository(dbfactory), unitOfWork); _DistributorService = new DistributorService(new DistributorRepository(dbfactory), unitOfWork); _DealerService = new DealerService(new DealerRepository(dbfactory), unitOfWork); _CorporateClientService = new CorporateClientService(new CorporateClientRepository(dbfactory), unitOfWork); _RetailerService = new RetailerService(new RetailerRepository(dbfactory), unitOfWork); _FreeProductService = new FreeProductService(new FreeProductRepository(dbfactory), new ChartOfProductRepository(dbfactory), new UnitOfMeasurementRepository(dbfactory), unitOfWork); _ProductService = new ChartOfProductService(new ChartOfProductRepository(dbfactory), unitOfWork); _UnitService = new UnitOfMeasurementService(new UnitOfMeasurementRepository(dbfactory), unitOfWork); _salesDiscountSettingService = new SalesDiscountSettingService(new SalesDiscountSettingRepository(dbfactory), unitOfWork); _PartyCreditService = new PartyCreditReportService(new InvStoreOpeningRepository(dbfactory), unitOfWork); _promotionalOfferService = new PromotionalOfferService(new PromotionalOfferRepository(dbfactory), new PromotionalOfferDetailRepository(dbfactory), new UnitOfWork(dbfactory)); }
public CorporateSalesOrderController() { var dbfactory = new DatabaseFactory(); var unitOfWork = new UnitOfWork(dbfactory); _salesOrderService = new SalesOrderService(new SalesOrderRepository(dbfactory), new SalesOrderDetailRepository(dbfactory), new SalesOrderApprovalRepository(dbfactory), new NotificationRepository(dbfactory), new NotificationDetailRepository(dbfactory), unitOfWork); _officeService = new OfficeService(new OfficeRepository(dbfactory), unitOfWork); _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), unitOfWork); _FreeProductService = new FreeProductService(new FreeProductRepository(dbfactory), new ChartOfProductRepository(dbfactory), new UnitOfMeasurementRepository(dbfactory), unitOfWork); _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), unitOfWork); _salesDiscountSettingService = new SalesDiscountSettingService(new SalesDiscountSettingRepository(dbfactory), unitOfWork); _PartyCreditService = new PartyCreditReportService(new InvStoreOpeningRepository(dbfactory), unitOfWork); }
public FreeProductController() { var dbfactory = new DatabaseFactory(); _FreeProductService = new FreeProductService(new FreeProductRepository(dbfactory), new ChartOfProductRepository(dbfactory), new UnitOfMeasurementRepository(dbfactory), new UnitOfWork(dbfactory)); }