Exemplo n.º 1
0
 private void lstdata_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     try
     {
         wcfService.Brands brand = (wcfService.Brands)lstdata.SelectedItem;
         //txtBrand.Text 4
         id            = brand.BID;
         txtBrand.Text = brand.BName;
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 2
0
        private async void btnUpdate1_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                wcfService.Category Cat = (wcfService.Category)cboxCategory.SelectedItem;
                wcfService.Brands   b   = (wcfService.Brands)cBoxBrands.SelectedItem;
                string msg = await svc.UpdateProductAsync(id, txtProduct.Text, txtPrice.Text, txtQuantity.Text, Cat.CID, b.BID);

                MessageDialog ms = new MessageDialog(msg);
                await ms.ShowAsync();

                viewData();
            }
            catch (Exception ex)
            {
            }
        }