From be02cd78719168e0717b9e4f1df0db580d5eaa16 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 27 四月 2023 14:55:03 +0800
Subject: [PATCH] 生产订单维护: 增加  多行下推 按钮,  根据选中的行 批量下推生成流转卡(工艺路线取物料默认的,没工艺路线的 则不生成。) 。

---
 Kanban/Sc_QLKB.cs |   79 ++++++++++++++++++++++++---------------
 1 files changed, 48 insertions(+), 31 deletions(-)

diff --git a/Kanban/Sc_QLKB.cs b/Kanban/Sc_QLKB.cs
index 49a7f84..64fb0c9 100644
--- a/Kanban/Sc_QLKB.cs
+++ b/Kanban/Sc_QLKB.cs
@@ -148,7 +148,7 @@
                 //ClsIni clsIni = new ClsIni();
                 //string text = ClsIni.ReadIni("Dept", "DeptID", Pub_Class.ClsPub.AppPath + "\\HXErp_SY.ini");
                 //this.sDeptID = text;
-
+                string s = "";
 
                 ClsCN SubCn = new ClsCN();
                 string sSql = "";
@@ -156,7 +156,7 @@
                 ClsIni oIni = new ClsIni();
                 string sID = ClsIni.ReadIni("Dept", "DeptID", Pub_Class.ClsPub.AppPath + @"\" + "HXErp_SY.ini");
                 sDeptID = sID;
-                string procName = "exec h_p_QLKB " + this.sDeptID;
+                string procName = "exec h_p_QLKB_CS " + this.sDeptID;
                 this.DSet = SubCn.RunProcReturn(procName, this.ViewName, ref Pub_Class.ClsPub.sExeReturnInfo);
                 bool flag = this.DSet == null;
                 if (!flag)
@@ -170,19 +170,25 @@
                     });
                     this.oSumGrid.BuildTotalCols(cols);
                     int frCol = 10;
-                    string s = "鏄�";
+                     s = "鍚�";
                     Xt_BaseBillFun.DisplayGrid(this.grdMain, base.Name, s, frCol);
                 }
-                int HEDateCol = Fun_GetCol("璁″垝寮�宸ユ棩鏈�");
-                DateTime oNow = DateTime.Today.Date;
-                for (int i = 0; i < grdMain.Rows.Count; i++)
-                {
-                    if (DBUtility.ClsPub.isDate(grdMain.Rows[i].Cells[HEDateCol].Value) < oNow)
-                    {
-                        grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.Red;
-                    }
-                }
-            } 
+                //int HEDateCol = Fun_GetCol("璁″垝寮�宸ユ棩鏈�");
+                //DateTime oNow = DateTime.Today.Date;
+                //for (int i = 0; i < grdMain.Rows.Count; i++)
+                //{
+                //    if (DBUtility.ClsPub.isDate(grdMain.Rows[i].Cells[HEDateCol].Value) < oNow)
+                //    {
+                //        grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.Red;
+                //    }
+                //}
+                s = "鍚�";
+                int MainIDCol = Fun_GetCol("hmainid");
+                int SubIDCol = Fun_GetCol("hsubid");
+                long n = 0;
+                DBUtility.Xt_BaseBillFun.GraphLine_XB(grdMain, MainIDCol, SubIDCol, s, ref n);
+                //Total();
+            }
             catch (Exception e)
             {
                 return;
@@ -318,15 +324,26 @@
                     grdMain.DataSource = null;
                     grdMain.DataSource = DSet.Tables[0].DefaultView;
 
-                int HEDateCol = Fun_GetCol("璁″垝寮�宸ユ棩鏈�");
-                DateTime oNow = DateTime.Today.Date;
-                for (int i = 0; i < grdMain.Rows.Count; i++)
-                {
-                    if (DBUtility.ClsPub.isDate(grdMain.Rows[i].Cells[HEDateCol].Value) < oNow)
-                    {
-                        grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.Red;
-                    }
-                }
+                //int HEDateCol = Fun_GetCol("璁″垝寮�宸ユ棩鏈�");
+                //DateTime oNow = DateTime.Today.Date;
+                //for (int i = 0; i < grdMain.Rows.Count; i++)
+                //{
+                //    if (DBUtility.ClsPub.isDate(grdMain.Rows[i].Cells[HEDateCol].Value) < oNow)
+                //    {
+                //        grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.Red;
+                //    }
+                //}
+
+
+                int MainIDCol = Fun_GetCol("hmainid");
+                int SubIDCol = Fun_GetCol("hsubid");
+                string s = "鍚�";
+                long n = 0;
+                DBUtility.Xt_BaseBillFun.GraphLine_XB(grdMain, MainIDCol, SubIDCol, s, ref n);
+
+
+
+
                 ////-----------棰勮鐘舵�� 灏忎簬绛変簬 鏄剧ず 绾㈣壊锛� 灏忎簬7 姗欒壊锛屽皬浜庣瓑浜�14 榛勮壊 
                 //int HYJDateCol = Fun_GetCol("棰勮鐘舵�侊紙澶╋級");
                 //int HSumUnDownQtyCol = Fun_GetCol("鎬绘湭涓嬮噰璐噺");
@@ -490,15 +507,15 @@
                 HQty = 0;
                 timer1.Enabled = true;
             }
-            int HEDateCol = Fun_GetCol("璁″垝寮�宸ユ棩鏈�");
-            DateTime oNow = DateTime.Today.Date;
-            for (int i = 0; i < grdMain.Rows.Count; i++)
-            {
-                if (DBUtility.ClsPub.isDate(grdMain.Rows[i].Cells[HEDateCol].Value) < oNow)
-                {
-                    grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.Red;
-                }
-            }
+            //int HEDateCol = Fun_GetCol("璁″垝寮�宸ユ棩鏈�");
+            //DateTime oNow = DateTime.Today.Date;
+            //for (int i = 0; i < grdMain.Rows.Count; i++)
+            //{
+            //    if (DBUtility.ClsPub.isDate(grdMain.Rows[i].Cells[HEDateCol].Value) < oNow)
+            //    {
+            //        grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.Red;
+            //    }
+            //}
         }
 
         private void toolStripButton1_Click(object sender, EventArgs e)

--
Gitblit v1.9.1