From 715746486281876dcad7f40e618f1bc82c4baef1 Mon Sep 17 00:00:00 2001 From: jingh <jingh@LAPTOP-I53VDLOO> Date: 星期三, 31 三月 2021 16:56:06 +0800 Subject: [PATCH] 报表增加合计 --- SCM/单据资料/Gy_BarCodeMain.cs | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git "a/SCM/\345\215\225\346\215\256\350\265\204\346\226\231/Gy_BarCodeMain.cs" "b/SCM/\345\215\225\346\215\256\350\265\204\346\226\231/Gy_BarCodeMain.cs" index f982836..207d204 100644 --- "a/SCM/\345\215\225\346\215\256\350\265\204\346\226\231/Gy_BarCodeMain.cs" +++ "b/SCM/\345\215\225\346\215\256\350\265\204\346\226\231/Gy_BarCodeMain.cs" @@ -25,6 +25,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 cx_Click(object sender, EventArgs e) { @@ -64,7 +65,30 @@ } // 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(); + } + } + + /// <summary> /// 缃戞牸 瀵煎嚭EXCEL 缃戞牸锛屾枃浠跺悕锛屾爣棰樺悕 /// </summary> @@ -164,5 +188,11 @@ { } + + private void Gy_BarCodeMain_Load(object sender, EventArgs e) + { + oSumGrid.ogrdMain = grdMain; //鍒濆鍖� new + oSumGrid.oGridsum = grdSum; + } } } -- Gitblit v1.9.1