private void LoadMaintenance(SupplierOrCustomer supplierOrCustomer) { SupplierService supplierService = new SupplierService(_context); CustomerService customerService = new CustomerService(_context); var f = new SupplierCustomerMaintenaceForm(supplierService, customerService, Operation.Add, supplierOrCustomer); f.ShowDialog(); }
public SupplierCustomerMaintenaceForm(SupplierService supplierService, CustomerService customerService, Operation mode, SupplierOrCustomer sc) { _supplierService = supplierService; _customerService = customerService; _mode = mode; _sc = sc; LoadSupplierOrCustomer(); 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(); }