Exemple #1
0
        public async void save(object sender, RoutedEventArgs e)
        {
            var result = await _productRepostory.UpdateProductAsync(_products);

            if (result != null)
            {
                MessageBox.Show("Product Updated..");
            }
        }
Exemple #2
0
        public async void save(object sender, RoutedEventArgs e)
        {
            _products.ProductName = txtProductname.Text;
            _products.Description = txtDiscription.Text;
            _products.Category    = txtCategory.Text;
            _products.Price       = Convert.ToDecimal(txtPrice.Text);
            var result = await _productRepostory.UpdateProductAsync(_products);

            if (result != null)
            {
                MessageBox.Show("Product Updated..");
            }
        }
Exemple #3
0
 private async void OnSave()
 {
     UpdateProduct(SimpleEditableProduct, _editableProduct);
     if (EditFlag)
     {
         await _productRepository.UpdateProductAsync(_editableProduct);
     }
     else
     {
         await _productRepository.AddProductAsync(_editableProduct);
     }
     Done();
     SaveCommandRequested("products");
 }
 private async void OnSave()
 {
     Product = await
               _productRepository.UpdateProductAsync(Product);
 }