コード例 #1
0
        private void cb_deal_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            selectedDeal=(Deal)cb_deal.SelectedItem;
            _productsInOrder = new List<Product_in_order>();
            foreach(Product_in_deal pid in selectedDeal.Products_in_deal )
            {
                Product_in_order pio = new Product_in_order();
                pio.ID = Globals.GetId("IPO");
                    pio.Product = pid.Product;
                    pio.Price = pid.Price;
                    pio.Quantity_in_order = pid.Quantity;
                    _productsInOrder.Add(pio);
            }
            if(selectedDeal.Has_collective_product)
            {
                ProductSelector ps = new ProductSelector(_productsInOrder);
                if(ps.ShowDialog()==true)
                {

                }
            }
            datagrid_productsInOrder.ItemsSource = _productsInOrder;
            lbl_productsInOrder.Visibility = System.Windows.Visibility.Visible;
            datagrid_productsInOrder.Visibility = System.Windows.Visibility.Visible;
            Validate();
        }
コード例 #2
0
ファイル: UserTask.cs プロジェクト: pellicerrobert/IRIS
 public override bool DefaultAction()
 {
     ProductSelector ps = new ProductSelector(_pio,comment,properties);
     if (ps.ShowDialog() == true)
     {
         Globals._tasks.Remove(this);
         Order o = Databases.localModel.OrderSet.Find(Order_id);
         o.All_products_selected = true;
         Databases.localModel.SaveChanges();
         return true;
     }
     return false;
 }