public SupplierViewModel() { supplierOperationsObj = new SupplierOperations(); currentSupplier = new Supplier(); LoadData(); addSupplier = new SupplierCommands(Add); searchSupplier = new SupplierCommands(Search); updateSupplier = new SupplierCommands(Update); deleteSupplier = new SupplierCommands(Delete); }
public CostViewModel() { currentCost = new Cost(); orderOperationsObj = new OrderOperations(); supplierOperationsObj = new SupplierOperations(); costOperationObj = new CostOperations(); LoadData(); suppliersList = new ObservableCollection <Supplier>(supplierOperationsObj.GetAllSuppliers()); ordersList = new ObservableCollection <Order>(orderOperationsObj.GetAllOrders()); addCost = new CostCommands(Add); searchCost = new CostCommands(Search); updateCost = new CostCommands(Update); deleteCost = new CostCommands(Delete); currentCost.PurchaseDate = DateTime.Today; //Console.WriteLine($" nr faktury {CostsList[0].InvoiceNr}"); }
public SuppliersController(WarehouseContext context) { _context = context; _service = new SupplierOperations(); _pageSize = 8; }