// GET: Orders public ActionResult All() { var ops = new OrderOperations(); var orders = ops.GetAllOrders(); return(View(orders)); }
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}"); }
private void LoadOrdersList() { OrdersList = new ObservableCollection <Order>(orderOperationsObj.GetAllOrders()); }
public List <Order> GetOrders() { return(OrderOperations.GetAllOrders(db)); }