コード例 #1
0
        private void OnBranchSelected(object sender, EventArgs e)
        {
            var dataMani = new DatabaseManipulation();

            if (dataMani.GetAllProductsInBranch() == false)
            {
                MessageBox.Show("Could Not Find Any Products For The Selected Branch", "Error!", MessageBoxButton.OK, MessageBoxImage.Error);
            }

            vmvo.OnPropertyChanged("ProductList");
        }
コード例 #2
0
        private void Vmvo_NewOrderID(object sender, EventArgs e)
        {
            DatabaseManipulation dataMani = new DatabaseManipulation();

            if (!dataMani.LoadOrder())
            {
                MessageBox.Show("Could Not Find the Specified Order.", "Alert!", MessageBoxButton.OK, MessageBoxImage.Error);
            }

            vmvo.ProductQuantity = vmvo.Order.Quantity;

            vmvo.OnPropertyChanged("ProductQuantity");
            vmvo.OnPropertyChanged("Order");
        }
コード例 #3
0
        private void RefundOrder_Loaded(object sender, RoutedEventArgs e)
        {
            vmvo        = new ViewModelValueOriented();
            DataContext = vmvo;

            vmvo.NewOrderID += Vmvo_NewOrderID;

            vmvo.OrderIDSearch = vmvo.Order.OrderID;
            vmvo.OnPropertyChanged();
        }
コード例 #4
0
        private void PurchaseOrder_Loaded(object sender, RoutedEventArgs e)
        {
            //Variables
            var dataMani = new DatabaseManipulation();

            orderList = new List <Orders>();

            //Load Viewmodel into dataContext
            vmvo        = new ViewModelValueOriented();
            DataContext = vmvo;

            vmvo.CurrentBranchSelected += OnBranchSelected;

            //Check if all branches are loaded into view
            if (dataMani.GetAllBranches() == false)
            {
                MessageBox.Show("Could Not Load Branches", "Error!", MessageBoxButton.OK, MessageBoxImage.Error);
            }

            vmvo.OnPropertyChanged();
        }