From fd56fa51fe25f26ce5b518c6f3afb81fbc19553a Mon Sep 17 00:00:00 2001 From: zzr99 <1940172413@qq.com> Date: 星期一, 25 七月 2022 17:04:53 +0800 Subject: [PATCH] 盘点 --- WarM/报表分析/Sc_CJKB.cs | 159 ++++++++++++++++++++++++++++++---------------------- 1 files changed, 91 insertions(+), 68 deletions(-) diff --git "a/WarM/\346\212\245\350\241\250\345\210\206\346\236\220/Sc_CJKB.cs" "b/WarM/\346\212\245\350\241\250\345\210\206\346\236\220/Sc_CJKB.cs" index cd31e21..0f2dc9b 100644 --- "a/WarM/\346\212\245\350\241\250\345\210\206\346\236\220/Sc_CJKB.cs" +++ "b/WarM/\346\212\245\350\241\250\345\210\206\346\236\220/Sc_CJKB.cs" @@ -72,77 +72,100 @@ { try { - ClsCN SubCn = new ClsCN(); - string sSql = ""; - string sWhere = ""; - //杩囨护鏉′欢 - //if (frmCondition.SqlStr.Trim().Length == 0) + //ClsCN SubCn = new ClsCN(); + //string sSql = ""; + //string sWhere = ""; + ////杩囨护鏉′欢 + ////if (frmCondition.SqlStr.Trim().Length == 0) + //// return; + ////sSql = frmCondition.SqlStr + sWhere + " order by HStatus,HDate "; + //sSql = "exec h_p_CJKB "; + //// + //DSet = SubCn.RunProcReturn(sSql, ViewName, ref DBUtility.ClsPub.sExeReturnInfo); + ////鐢熸垚棣栬鏍囬 + //if (DSet == null) + //{ + // //MessageBox.Show("娌℃湁杩斿洖浠讳綍缁撴灉,璇峰湪杩囨护妗嗕腑鐐瑰嚮銆愭仮澶嶃�戞寜閽�,灏濊瘯鍐嶆鏌ヨ锛�" + DBUtility.ClsPub.sExeReturnInfo); // return; - //sSql = frmCondition.SqlStr + sWhere + " order by HStatus,HDate "; - sSql = "exec h_p_CJKB "; - // - DSet = SubCn.RunProcReturn(sSql, ViewName, ref DBUtility.ClsPub.sExeReturnInfo); - //鐢熸垚棣栬鏍囬 - if (DSet == null) + //} + ////閲婃斁鍐荤粨 + //DBUtility.Xt_BaseBillFun.CancelFrozenCol(grdMain); + //// + //grdMain.DataSource = DSet.Tables[0].DefaultView; + //// + + ////-----------棰勮鐘舵�� + ////寮�宸ユ椂闂村皬浜庡綋澶╂椂闂达紝浣嗘槸浠诲姟鍗曠姸鎬佽繕鏄� 寰呯敓浜э紝绯荤粺鑷姩榛勮壊璀︾ず锛� + ////瀹屽伐鏃堕棿灏忎簬褰撳ぉ鏃堕棿锛屼絾鏄换鍔″崟杩樻槸寰呯敓浜ф垨鑰呭湪鎵ц鐨勶紝绯荤粺鑷姩绾㈣壊璀︾ず锛� + ////int HBDateCol = Fun_GetCol("寮�宸ユ椂闂�"); + ////int HEDateCol = Fun_GetCol("瀹屽伐鏃堕棿"); + ////int HStatusCol = Fun_GetCol("鐢熶骇鐘舵��"); + ////DateTime oNow = DateTime.Today.Date; + ////for (int i = 0; i < grdMain.Rows.Count; i++) + ////{ + //// if (DBUtility.ClsPub.isDate(grdMain.Rows[i].Cells[HBDateCol].Value) < oNow && DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HStatusCol].Value) == "寰呯敓浜�") + //// { + //// grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.Yellow; + //// } + //// if (DBUtility.ClsPub.isDate(grdMain.Rows[i].Cells[HEDateCol].Value) < oNow && DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HStatusCol].Value) == "寰呯敓浜�") + //// { + //// grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.Red; + //// } + ////} + + ////璁剧疆鍚堣鍒� + //string sTotalCol = ""; + //sTotalCol = DBUtility.Gy_BaseFun.GetTotalCols(DSet); + //string[] sT; + //sT = sTotalCol.Split(Convert.ToChar(",")); + //oSumGrid.BuildTotalCols(sT); + //// + ////鍐荤粨 + //int FrCol = 10; + //string s = "鏄�"; + //DBUtility.Xt_BaseBillFun.DisplayGrid(grdMain, this.Name, s, FrCol); + ////鐢荤嚎 + ////GraphLine(); + + ////Total(); + + ////for (int i = 0; i < grdMain.Rows.Count; i++) + ////{ + //// if (i % 2 == 0) + //// { + //// grdMain.Rows[i].DefaultCellStyle.BackColor = Color.SteelBlue; + //// grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.White; + //// } + //// else + //// { + //// grdMain.Rows[i].DefaultCellStyle.BackColor = Color.SlateGray; + //// grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.White; + //// } + ////} + //// + /// + + ClsCN clsCN = new ClsCN(); + ClsIni clsIni = new ClsIni(); + string text = ClsIni.ReadIni("Dept", "DeptID", Pub_Class.ClsPub.AppPath + "\\HXErp.ini"); + this.sDeptID = text; + string procName = "exec h_p_CJKB " + this.sDeptID; + this.DSet = clsCN.RunProcReturn(procName, this.ViewName, ref Pub_Class.ClsPub.sExeReturnInfo); + bool flag = this.DSet == null; + if (!flag) { - //MessageBox.Show("娌℃湁杩斿洖浠讳綍缁撴灉,璇峰湪杩囨护妗嗕腑鐐瑰嚮銆愭仮澶嶃�戞寜閽�,灏濊瘯鍐嶆鏌ヨ锛�" + DBUtility.ClsPub.sExeReturnInfo); - return; + Xt_BaseBillFun.CancelFrozenCol(this.grdMain); + this.grdMain.DataSource = this.DSet.Tables[0].DefaultView; + string totalCols = Gy_BaseFun.GetTotalCols(this.DSet); + string[] cols = totalCols.Split(new char[] + { + Convert.ToChar(",") + }); + this.oSumGrid.BuildTotalCols(cols); + int frCol = 10; + string s = "鏄�"; + Xt_BaseBillFun.DisplayGrid(this.grdMain, base.Name, s, frCol); } - //閲婃斁鍐荤粨 - DBUtility.Xt_BaseBillFun.CancelFrozenCol(grdMain); - // - grdMain.DataSource = DSet.Tables[0].DefaultView; - // - - //-----------棰勮鐘舵�� - //寮�宸ユ椂闂村皬浜庡綋澶╂椂闂达紝浣嗘槸浠诲姟鍗曠姸鎬佽繕鏄� 寰呯敓浜э紝绯荤粺鑷姩榛勮壊璀︾ず锛� - //瀹屽伐鏃堕棿灏忎簬褰撳ぉ鏃堕棿锛屼絾鏄换鍔″崟杩樻槸寰呯敓浜ф垨鑰呭湪鎵ц鐨勶紝绯荤粺鑷姩绾㈣壊璀︾ず锛� - //int HBDateCol = Fun_GetCol("寮�宸ユ椂闂�"); - //int HEDateCol = Fun_GetCol("瀹屽伐鏃堕棿"); - //int HStatusCol = Fun_GetCol("鐢熶骇鐘舵��"); - //DateTime oNow = DateTime.Today.Date; - //for (int i = 0; i < grdMain.Rows.Count; i++) - //{ - // if (DBUtility.ClsPub.isDate(grdMain.Rows[i].Cells[HBDateCol].Value) < oNow && DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HStatusCol].Value) == "寰呯敓浜�") - // { - // grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.Yellow; - // } - // if (DBUtility.ClsPub.isDate(grdMain.Rows[i].Cells[HEDateCol].Value) < oNow && DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HStatusCol].Value) == "寰呯敓浜�") - // { - // grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.Red; - // } - //} - - //璁剧疆鍚堣鍒� - string sTotalCol = ""; - sTotalCol = DBUtility.Gy_BaseFun.GetTotalCols(DSet); - string[] sT; - sT = sTotalCol.Split(Convert.ToChar(",")); - oSumGrid.BuildTotalCols(sT); - // - //鍐荤粨 - int FrCol = 10; - string s = "鏄�"; - DBUtility.Xt_BaseBillFun.DisplayGrid(grdMain, this.Name, s, FrCol); - //鐢荤嚎 - //GraphLine(); - - //Total(); - - //for (int i = 0; i < grdMain.Rows.Count; i++) - //{ - // if (i % 2 == 0) - // { - // grdMain.Rows[i].DefaultCellStyle.BackColor = Color.SteelBlue; - // grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.White; - // } - // else - // { - // grdMain.Rows[i].DefaultCellStyle.BackColor = Color.SlateGray; - // grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.White; - // } - //} - // } catch (Exception e) { -- Gitblit v1.9.1