Ejemplo n.º 1
0
        // GET: Orders
        public ActionResult All()
        {
            var ops    = new OrderOperations();
            var orders = ops.GetAllOrders();

            return(View(orders));
        }
Ejemplo n.º 2
0
        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}");
        }
Ejemplo n.º 3
0
 private void LoadOrdersList()
 {
     OrdersList = new ObservableCollection <Order>(orderOperationsObj.GetAllOrders());
 }
Ejemplo n.º 4
0
 public List <Order> GetOrders()
 {
     return(OrderOperations.GetAllOrders(db));
 }