From 715746486281876dcad7f40e618f1bc82c4baef1 Mon Sep 17 00:00:00 2001
From: jingh <jingh@LAPTOP-I53VDLOO>
Date: 星期三, 31 三月 2021 16:56:06 +0800
Subject: [PATCH] 报表增加合计

---
 SCM/报表/Qk_ProcessbillMain.cs |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git "a/SCM/\346\212\245\350\241\250/Qk_ProcessbillMain.cs" "b/SCM/\346\212\245\350\241\250/Qk_ProcessbillMain.cs"
index e7db22e..b42cbb9 100644
--- "a/SCM/\346\212\245\350\241\250/Qk_ProcessbillMain.cs"
+++ "b/SCM/\346\212\245\350\241\250/Qk_ProcessbillMain.cs"
@@ -26,6 +26,7 @@
         public const string ModName = "1250";
         public string sDlgWhere = "";  //澶栫獥浣撻�掑叆
         public int selectRow = 0;
+        Pub_Class.ClsGridListSum oSumGrid = new Pub_Class.ClsGridListSum();
         SCM.WMSWeb.WebService1 oWeb = new SCM.WMSWeb.WebService1();
         private void yl_Click(object sender, EventArgs e)
         {
@@ -59,7 +60,29 @@
             }
             //
             grdMain.DataSource = DSet.Tables[0].DefaultView;
+            grdMain.RowHeadersVisible = false;
+            ////璁剧疆鍚堣鍒�
+            string sTotalCol = "";
+            sTotalCol = DBUtility.Gy_BaseFun.GetTotalCols(DSet);
+            string[] sT;
+            sT = sTotalCol.Split(Convert.ToChar(","));
+            oSumGrid.BuildTotalCols(sT);
+            Total();
+
         }
+
+
+        //鍚堣 new
+        private void Total()
+        {
+            if (grdMain.Rows.Count > 0 && grdMain.ColumnCount > 0)
+            {
+                oSumGrid.SetGridsum();
+                oSumGrid.TotalAll();
+            }
+        }
+
+
         private void tc_Click(object sender, EventArgs e)
         {
             this.Close();
@@ -175,5 +198,11 @@
                 }
             }
         }
+
+        private void Qk_ProcessbillMain_Load(object sender, EventArgs e)
+        {
+            oSumGrid.ogrdMain = grdMain;  //鍒濆鍖� new
+            oSumGrid.oGridsum = grdSum;
+        }
     }
 }

--
Gitblit v1.9.1