Esempio n. 1
0
        private void Grid_Click(object sender, RoutedEventArgs e)
        {
            var btn = e.OriginalSource as Button;
            if (btn == null)
            {
                return;
            }
            var Page = new Page();
            try
            {

                switch (btn.Name)
                {

                    case "BTN_Supplier": Page = SuppliersPage;break;
                    case "BTN_Customers": Page = CustomersPage; break;
                    case "BTN_Users": UsersPage = new Users(); UsersPage.ShowDialog(); break;
                    case "BTN_Components": Page = ComponentPage; break;
                    case "BTN_Products": Page = ProductsPage; break;

                    case "BTN_Incomes": Page = Income_Page; break;
                    case "BTN_Outcomes": Page = Outcome_Page; break;
                    case "BTN_Customers_payments": Page = CustomerInstallmentsPage; break;
                    case "BTN_Suppliers_payments": Page = SupplierInstallmentsPage; break;
                    case "BTN_Stock": Page = StockPage; break;

                    case "BTN_sales": Page = SalesPage; break;
                    case "BTN_Purchases": Page = PurchasesPage; break;
                    case "BTN_Purchases_Back": Page = PurchasesBackPage; break;
                    case "BTN_Damaged_Component": Page = ComponentDamagePage; break;
                    case "BTN_Damaged_Product": Page = ProductsDamagePage; break;
                }

                Frame.Navigate(Page);

                Set_Selected(btn);

            }
            catch
            {

            }
        }
Esempio n. 2
0
        private void InitalizePages()
        {
            ProductsPage  =  new Products();
             CustomersPage = new People(Model.Entities.PersonTypes.Customer) ;
             SuppliersPage = new People( Model.Entities.PersonTypes.Supplier);
             UsersPage =  new Users();
             ComponentPage =  new Components();

            //Accounts
             Outcome_Page =  new Outcomes();
             Income_Page =  new Income();
             CustomerInstallmentsPage =  new Installments(Model.Entities.PersonTypes.Customer);
             SupplierInstallmentsPage =  new Installments(Model.Entities.PersonTypes.Supplier);
             StockPage = new Stock();

            //Transactions
             SalesPage =  new Sales();
             PurchasesPage= new Purchases(Model.Entities.TransactionTypes.Buy);
             PurchasesBackPage = new Purchases(Model.Entities.TransactionTypes.ReBuy);

             ComponentDamagePage =  new ComponentsDamage();
             ProductsDamagePage = new ProductsDamage();
        }