private async void cboxCategory_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     try
     {
         wcfService.Category ob = (wcfService.Category)cboxCategory.SelectedItem;
         cBoxBrands.DataContext = await svc.ViewAllBrandByCatAsync(ob.CID);
     }
     catch (Exception ex)
     {
     }
 }
Esempio n. 2
0
 private void lstdata_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     try
     {
         wcfService.Category ob = (wcfService.Category)lstdata.SelectedItem;
         id = ob.CID;
         txtCategory.Text = ob.CName;
     }
     catch (Exception ex)
     {
     }
 }
Esempio n. 3
0
        private async void btnUpdate_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                wcfService.Category cat = (wcfService.Category)CBoxCategory.SelectedItem;

                string msg = await svc.UpdateBrandAsync(id, txtBrand.Text, cat.CID);

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

                viewallBrands();
            }
            catch (Exception ex)
            {
            }
        }
        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)
            {
            }
        }
Esempio n. 5
0
        private async void btnInsert_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                wcfService.Category Cat = (wcfService.Category)CBoxCategory.SelectedItem;

                string msg = await svc.InsertBrandAsync(Cat.CID, txtBrand.Text);

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

                cleare();
                viewallBrands();
            }

            catch (Exception ex)
            {
            }
        }