public InWithDRForm(ItemService itemService, SupplierService supplierService, CustomerService customerService, DRService drService, InOutService inOutService, DRParam param, string name) { _itemService = itemService; _supplierService = supplierService; _customerService = customerService; _drService = drService; _inOutService = inOutService; _param = param; _name = name; _items = _itemService.AllActiveItems(); _drItems = new List <DRItem>(); InitializeComponent(); }
private void loadSDRForm(ReceiptType type, Operation operation, SupplierOrCustomer sc, DR selectedSDR) { ItemService itemService = new ItemService(_context); HistoryService historyService = new HistoryService(_context); SupplierService supplierService = new SupplierService(_context); CustomerService customerService = new CustomerService(_context); DRService drService = new DRService(_context); ReturnedHistoryService returnedHistoryService = new ReturnedHistoryService(_context); InOutService inOutService = new InOutService(itemService, historyService, drService, returnedHistoryService); DRParam p = new DRParam(); p.ReceiptType = type; p.Operation = operation; p.SC = sc; p.SelectedDR = selectedSDR; InWithDRForm f = new InWithDRForm(itemService, supplierService, customerService, drService, inOutService, p, _name); f.ShowDialog(); }