示例#1
0
        /// <summary>
        /// 设置数据值
        /// </summary>
        void SetData()
        {
            ClearData();
            string sql = string.Empty;

            //订单信息设置
            sql  = "SELECT FormNo,MAX(OrderDate) FormDate,SUM(Qty) Qty,SUM(TotalRecQty) ReceiveQty FROM UV1_Sale_SaleOrderDts WHERE FormNo=" + SysString.ToDBString(FormNo);
            sql += " GROUP BY FormNo";
            DataTable dt = SysUtils.Fill(sql);

            ucsoProcessSOStandard1.UCDataSource = dt;
            ucsoProcessSOStandard1.UCAct();


            //采购流程设置
            sql  = "SELECT FormNo,FormDate,SUM(Qty) Qty,SUM(TotalRecQty) ReceiveQty,MLType FROM UV1_Buy_ItemBuyFormDts WHERE DtsSO=" + SysString.ToDBString(FormNo);
            sql += " GROUP BY FormNo,FormDate,MLType";
            DataTable dtBuy = SysUtils.Fill(sql);

            //加工流程设置
            sql  = "SELECT FormNo,FormDate,SUM(Qty) Qty,SUM(TotalRecQty) ReceiveQty,ProcessTypeID FROM UV1_WO_FabricProcessDts WHERE DtsSO=" + SysString.ToDBString(FormNo);
            sql += " GROUP BY FormNo,FormDate,ProcessTypeID";
            DataTable dtWO = SysUtils.Fill(sql);


            for (int i = 1; i <= 8; i++)
            {
                UCSOProcessOneStandard uspos = FindOneCtl(i);
                SetDataOne(uspos, dtBuy, dtWO);
            }
        }
示例#2
0
        /// <summary>
        /// 初始化一个进度
        /// </summary>
        /// <param name="p_Dr"></param>
        void IniDataOneProcess(DataRow p_Dr, int p_StepIndex)
        {
            UCSOProcessOneStandard ucpos = FindOneCtl(p_StepIndex);

            ucpos.UCSettingDr = p_Dr;
            ucpos.UCStepIndex = p_StepIndex;
            ucpos.Visible     = true;
        }
示例#3
0
        void SetDataOne(UCSOProcessOneStandard uspos, DataTable dtBuy, DataTable dtWO)
        {
            if (uspos.Visible)
            {
                switch (uspos.UCStepID)
                {
                case (int)EnumUCSaleProcedure.纱线采购单:
                    uspos.UCDataSource = dtBuy.Select("MLType=3");
                    break;


                case (int)EnumUCSaleProcedure.成品采购单:
                    uspos.UCDataSource = dtBuy.Select("MLType=1");
                    break;

                case (int)EnumUCSaleProcedure.坯布采购单:
                    uspos.UCDataSource = dtBuy.Select("MLType=2");
                    break;

                case (int)EnumUCSaleProcedure.辅料采购单:
                    uspos.UCDataSource = dtBuy.Select("MLType=5");

                    break;

                case (int)EnumUCSaleProcedure.织胚加工单:
                    uspos.UCDataSource = dtWO.Select("ProcessTypeID=2");
                    break;

                case (int)EnumUCSaleProcedure.染整加工单:
                    uspos.UCDataSource = dtWO.Select("ProcessTypeID=1");
                    break;

                case (int)EnumUCSaleProcedure.印花加工单:
                    uspos.UCDataSource = dtWO.Select("ProcessTypeID=3");
                    break;

                case (int)EnumUCSaleProcedure.其它加工单:
                    uspos.UCDataSource = dtWO.Select("ProcessTypeID=4");
                    break;
                }
                uspos.UCAct();
            }

            //for (int i = 0; i < dtBuy.Rows.Count; i++)//采购
            //{
            //    // 1/2/3/4/5:成品,坯布,纱线,色坯,辅料

            //}
            //for (int i = 0; i < dtWO.Rows.Count; i++)//加工
            //{
            //    //2:织造 1:染整 3:印花 4:其它


            //}
        }
示例#4
0
 /// <summary>
 /// 清空数据
 /// </summary>
 void ClearData()
 {
     for (int i = 1; i <= 6; i++)
     {
         UCSOProcessOneStandard ucpos = FindOneCtl(i);
         if (ucpos.Visible)
         {
             ucpos.UCDataSource = null;
         }
     }
 }