From 4286ee5823987af404e167a7c4aeacbe7def3c36 Mon Sep 17 00:00:00 2001 From: 王 垚 <1402714037@qq.com> Date: 星期三, 27 七月 2022 10:19:37 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API into master --- Kanban/Sc_CJKB.cs | 71 +++++++++++++++++++++++------------ 1 files changed, 46 insertions(+), 25 deletions(-) diff --git a/Kanban/Sc_CJKB.cs b/Kanban/Sc_CJKB.cs index cbc910c..055ee65 100644 --- a/Kanban/Sc_CJKB.cs +++ b/Kanban/Sc_CJKB.cs @@ -76,7 +76,7 @@ string sSql = ""; string sWhere = ""; ClsIni oIni = new ClsIni(); - string sID = ClsIni.ReadIni("Dept", "DeptID", Pub_Class.ClsPub.AppPath + @"\" + "HXErp.ini"); + string sID = ClsIni.ReadIni("Dept", "DeptID", Pub_Class.ClsPub.AppPath + @"\" + "HXErp_SY.ini"); sDeptID = sID; //杩囨护鏉′欢 //if (frmCondition.SqlStr.Trim().Length == 0) @@ -101,21 +101,15 @@ //-----------棰勮鐘舵�� //寮�宸ユ椂闂村皬浜庡綋澶╂椂闂达紝浣嗘槸浠诲姟鍗曠姸鎬佽繕鏄� 寰呯敓浜э紝绯荤粺鑷姩榛勮壊璀︾ず锛� //瀹屽伐鏃堕棿灏忎簬褰撳ぉ鏃堕棿锛屼絾鏄换鍔″崟杩樻槸寰呯敓浜ф垨鑰呭湪鎵ц鐨勶紝绯荤粺鑷姩绾㈣壊璀︾ず锛� - //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; - // } - //} + 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; + } + } //璁剧疆鍚堣鍒� string sTotalCol = ""; @@ -282,7 +276,16 @@ 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; + } + } ////-----------棰勮鐘舵�� 灏忎簬绛変簬 鏄剧ず 绾㈣壊锛� 灏忎簬7 姗欒壊锛屽皬浜庣瓑浜�14 榛勮壊 //int HYJDateCol = Fun_GetCol("棰勮鐘舵�侊紙澶╋級"); @@ -447,6 +450,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; + } + } } private void toolStripButton1_Click(object sender, EventArgs e) @@ -489,17 +501,26 @@ //-----------棰勮鐘舵�� //寮�宸ユ椂闂村皬浜庡綋澶╂椂闂达紝浣嗘槸浠诲姟鍗曠姸鎬佽繕鏄� 寰呯敓浜э紝绯荤粺鑷姩榛勮壊璀︾ず锛� //瀹屽伐鏃堕棿灏忎簬褰撳ぉ鏃堕棿锛屼絾鏄换鍔″崟杩樻槸寰呯敓浜ф垨鑰呭湪鎵ц鐨勶紝绯荤粺鑷姩绾㈣壊璀︾ず锛� - int HBDateCol = Fun_GetCol("寮�宸ユ椂闂�"); - int HEDateCol = Fun_GetCol("瀹屽伐鏃堕棿"); - int HStatusCol = Fun_GetCol("鐢熶骇鐘舵��"); + //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; + // } + //} + 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[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) == "寰呯敓浜�") + if (DBUtility.ClsPub.isDate(grdMain.Rows[i].Cells[HEDateCol].Value) < oNow) { grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.Red; } -- Gitblit v1.9.1