コード例 #1
0
        private void ListRequestedProduct_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (ListRequestedProduct.Items.Count > 0 && ListRequestedProduct.SelectedItem != null)
            {
                ProductSearched search = new ProductSearched((ProductsSet)ListRequestedProduct.SelectedItem);

                search.ShowDialog();

                if (search.Cancel)
                {
                    _dataDC.SaveChanges();
                }
            }
        }
コード例 #2
0
        private void lvProductSearched_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (lvProductSearched.Items.Count > 0 && lvProductSearched.SelectedItem != null)
            {
                ProductSearched search = new ProductSearched((ProductsSet)lvProductSearched.SelectedItem);

                search.ShowDialog();

                if (!search.Cancel)
                {
                    _dataDC.SaveChanges();
                }
            }
        }
コード例 #3
0
        private void btAddSearch_Click(object sender, RoutedEventArgs e)
        {
            ProductsSet newProduct = new ProductsSet();

            newProduct.Proveedor_ID = _client.Id;
            newProduct.Enbusca      = true.ToString();
            newProduct.Enventa      = false.ToString();
            ProductSearched search = new ProductSearched(newProduct);

            search._new = true;

            search.ShowDialog();

            if (search._new && !search.Cancel)
            {
                lps.Add(newProduct);
                _dataDC.ProductsSet.AddObject(newProduct);
                _dataDC.SaveChanges();
                lvProductSearched.ItemsSource = lps.Where(S => S.Enbusca == true.ToString() && S.Proveedor_ID == _client.Id).ToList();
            }
        }
コード例 #4
0
ファイル: Client.xaml.cs プロジェクト: jose-sanchez/CPP
        private void lvProductSearched_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (lvProductSearched.Items.Count > 0 && lvProductSearched.SelectedItem != null)
            {
                ProductSearched search = new ProductSearched((ProductsSet)lvProductSearched.SelectedItem);

                search.ShowDialog();

                if (!search.Cancel)
                {
                    _dataDC.SaveChanges();
                }

            }
        }
コード例 #5
0
ファイル: Client.xaml.cs プロジェクト: jose-sanchez/CPP
        private void btAddSearch_Click(object sender, RoutedEventArgs e)
        {
            ProductsSet newProduct = new ProductsSet();
            newProduct.Proveedor_ID = _client.Id;
            newProduct.Enbusca = true.ToString();
            newProduct.Enventa = false.ToString();
            ProductSearched search = new ProductSearched(newProduct);
            search._new = true;

            search.ShowDialog();

            if (search._new && !search.Cancel)
            {
                lps.Add(newProduct);
                _dataDC.ProductsSet.AddObject(newProduct);
                _dataDC.SaveChanges();
                lvProductSearched.ItemsSource = lps.Where(S => S.Enbusca == true.ToString() && S.Proveedor_ID == _client.Id).ToList();
            }
        }
コード例 #6
0
ファイル: Index.xaml.cs プロジェクト: jose-sanchez/CPP
        private void ListRequestedProduct_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (ListRequestedProduct.Items.Count > 0 && ListRequestedProduct.SelectedItem != null)
            {
                ProductSearched search = new ProductSearched((ProductsSet)ListRequestedProduct.SelectedItem);

                search.ShowDialog();

                if (search.Cancel)
                {
                    _dataDC.SaveChanges();
                }

            }
        }