protected override void OnOK()
 {
     if (condition == null)
     {
         condition = new ConditionD();
     }
     condition.StartId = this.comboBoxEditStartId.Text.Split(new char[] { ' ' })[0];
     condition.EndId   = this.comboBoxEditEndId.Text.Split(new char[] { ' ' })[0];
 }
Example #2
0
        /// <summary>
        /// 一参构造,初始化
        /// </summary>
        /// <param name="condition"></param>
        public Q24(ConditionD condition)
        {
            InitializeComponent();

            System.Collections.Generic.IList <Model.Stock> list = this.miscDateManager.Select(condition.StartId, condition.EndId);

            if (list == null || list.Count <= 0)
            {
                throw new global::Helper.InvalidValueException();
            }

            this.bindingSource1.DataSource = list;
            this.xrLabelReportName.Text    = Properties.Resources.StockSafeQuantity;
            this.xrLabelDateRange.Text     = string.Format(Properties.Resources.ProductIdRange, condition.StartId, condition.EndId);
            this.xrTableCellProductId.DataBindings.Add("Text", this.DataSource, Model.Stock.PRO_ProductId);
            this.xrTableCellProductName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductName);
            //this.xrTableCellProductUnit.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PROPERTY_PRODUCTBASEUNIT);
            this.xrTableCellQuantity.DataBindings.Add("Text", this.DataSource, Model.Stock.PRO_StockQuantity1, "{0:0}");
            this.xrTableCellDepotName.DataBindings.Add("Text", this.DataSource, "Depot." + Model.Depot.PRO_DepotName);
            this.xrTableCellSafeQuantity.DataBindings.Add("Text", this.DataSource, Model.Stock.PRO_StockQuantityD);
            this.xrTableCellDiffQuantity.DataBindings.Add("Text", this.DataSource, Model.Stock.PROPERTY_STOCKDIFFQUANTITY);
        }