Ejemplo n.º 1
0
 protected override void OnOK()
 {
     if (condition == null)
     {
         condition = new ConditionStockByProduct();
     }
     condition.Product = EditProduct.EditValue as Model.Product;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 构造函数,初始化
 /// </summary>
 /// <param name="stock"></param>
 public Q47(ConditionStockByProduct stock)
 {
     InitializeComponent();
     if (stock.Product == null)
     {
         return;
     }
     System.Collections.Generic.IList <Model.Stock> list = this.stockManager.Select(stock.Product.ProductId);
     if (list == null || list.Count <= 0)
     {
         throw new global::Helper.InvalidValueException();
     }
     this.xrLabelRepotName.Text = String.Format("{0} 庫房貨存統計", stock.Product.ProductName);
     bindingSource1.DataSource  = list;
     this.xrTableCellDepotName.DataBindings.Add("Text", this.DataSource, "DepotPosition." + "Depot." + Model.Depot.PRO_DepotName);
     this.xrTableCellDepotStockCount.DataBindings.Add("Text", this.DataSource, Model.Stock.PRO_StockQuantity1);
     this.xrSubreport1.ReportSource = new Q47_1();
 }