コード例 #1
0
 //Button click executes AddProduct method.
 private void Btn_Confirm(object sender, RoutedEventArgs e)
 {
     //Validation for Product properties.
     if (ValidateProduct.Validate(apvm.Product))
     {
         apvm.AddProduct();
         ManagerWindow window = new ManagerWindow();
         window.Show();
         this.Close();
     }
 }
コード例 #2
0
        public async void Execute(object parameter)
        {
            var product = parameter as Product;

            _viewModel.AddProduct(product);
        }