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"); }
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"); }
private void RefundOrder_Loaded(object sender, RoutedEventArgs e) { vmvo = new ViewModelValueOriented(); DataContext = vmvo; vmvo.NewOrderID += Vmvo_NewOrderID; vmvo.OrderIDSearch = vmvo.Order.OrderID; vmvo.OnPropertyChanged(); }
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(); }