Пример #1
0
        public async void OnSave(object sender, RoutedEventArgs e)
        {
            _product.ProductName = ProductTextBox.Text;
            _product.Description = DescriptionTextBox.Text;
            _product.category    = CategoryTextBox.Text;
            _product.price       = Convert.ToDecimal(PriceTextBox.Text);
            var result = await _productRepository.UpdateProdcutAsync(_product);

            if (result != null)
            {
                MessageBox.Show("Product Updated");
            }
        }
 private async void OnSave()
 {
     UpdateProduct(SimpleEditableProduct, EditableProduct);
     if (EditFlag)
     {
         await _ProductRepository.UpdateProdcutAsync(EditableProduct);
     }
     else
     {
         await _ProductRepository.AddProductAsync(EditableProduct);
     }
     Done();
     SaveCommandRequest("products");
 }
Пример #3
0
 private async void OnSave()
 {
     Product = await _prodcutRepository.UpdateProdcutAsync(_product);
 }