Exemple #1
0
        /// <summary>
        /// 回调事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnCallBack_Click_Extend(object sender, EventArgs e)
        {
            int type = 0;//type=0成品成本预测,type=1整单成品预测

            if (this.NameValues != null && this.NameValues["type"] != null)
            {
                type = Convert.ToInt16(this.NameValues["type"].ToString());
            }
            UFIDA.U9.Cust.GS.FT.CostForcastBP.Proxy.CostForcastFromSoProxy proxy = new CostForcastBP.Proxy.CostForcastFromSoProxy();
            List <long>       SO         = new List <long>();
            List <long>       SOLine     = new List <long>();
            IList <IUIRecord> recordList = this.Model.SO.Cache.GetSelectRecord(); //选择所有数据

            if (type == 1)
            {
                foreach (SORecord so in recordList)
                {
                    SO.Add(Int64.Parse(so["MainID"].ToString()));//销售单ID
                }
            }
            else
            {
                foreach (SORecord so in recordList)
                {
                    SOLine.Add(so.ID);//销售行ID
                }
            }
            proxy.SO     = SO;
            proxy.SOLine = SOLine;
            if (this.CurrentSessionState["Cust_IsClose"] != null && this.CurrentSessionState["Cust_IsClose"].ToString() == "1")
            {
                proxy.IsJobServer = true;
            }
            else
            {
                proxy.IsJobServer = false;
            }
            int result = proxy.Do();

            if (result >= 0)
            {
                this.CloseDialog(true);
            }
        }
Exemple #2
0
        /// <summary>
        /// 调度运算成本预测事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnDispatch207_Click_Extend(object sender, EventArgs e)
        {
            int type = 0;//type=0成品成本预测,type=1整单成品预测

            if (this.NameValues != null && this.NameValues["type"] != null)
            {
                type = Convert.ToInt16(this.NameValues["type"].ToString());
            }
            if (this.Model.SO.SelectRecords.Count <= 0)
            {
                throw new Exception("请选择进行整单预测的订单");
            }
            UFIDA.U9.Cust.GS.FT.CostForcastBP.Proxy.CostForcastFromSoProxy proxy = new CostForcastBP.Proxy.CostForcastFromSoProxy();
            List <long>       SO         = new List <long>();
            List <long>       SOLine     = new List <long>();
            IList <IUIRecord> recordList = this.Model.SO.Cache.GetSelectRecord(); //选择所有数据

            if (type == 1)
            {
                foreach (SORecord so in recordList)
                {
                    SO.Add(Int64.Parse(so["MainID"].ToString()));//销售单ID
                }
            }
            else
            {
                foreach (SORecord so in recordList)
                {
                    SOLine.Add(so.ID);//销售行ID
                }
            }

            proxy.SO          = SO;
            proxy.SOLine      = SOLine;
            proxy.IsJobServer = true;
            int result = proxy.Do();

            if (result >= 0)
            {
                this.CloseDialog(true);
            }
            OnDispatch207_Click_DefaultImpl(sender, e);
        }