コード例 #1
0
 private void AddProductToOperation(OperationProductModel operationProduct)
 {
     this.productList.Add(operationProduct);
     dgOperationProducts.ItemsSource = this.productList;
     dgOperationProducts.Items.Refresh();
     this.operation.OperationProducts = this.productList;
     this.operation.Sum = this.GetSumFromAllProducts(this.productList);
 }
コード例 #2
0
        public OperationProduct()
        {
            InitializeComponent();

            this._repo            = new Repo();
            this.operationProduct = this.DataContext as OperationProductModel;

            cbProducts.ItemsSource          = this._repo.GetProducts();
            cbProducts.DisplayMemberPath    = "Name";
            cbProductUnit.ItemsSource       = this._repo.GetProductUnits();
            cbProductUnit.DisplayMemberPath = "Name";
        }