yusijie
2022-10-25 51760e4d45528a612490672614fda78b9dd6bd31
Kanban/Sc_CJKB.cs
@@ -102,15 +102,15 @@
                //开工时间小于当天时间,但是任务单状态还是 待生产,系统自动黄色警示;
                //完工时间小于当天时间,但是任务单还是待生产或者在执行的,系统自动红色警示;
                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;
                //    }
                //}
                //设置合计列
                string sTotalCol = "";
@@ -278,15 +278,15 @@
                    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;
                //    }
                //}
                ////-----------预警状态 小于等于 显示 红色, 小于7 橙色,小于等于14 黄色 
                //int HYJDateCol = Fun_GetCol("预警状态(天)");
@@ -451,15 +451,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)
@@ -517,15 +517,15 @@
            //        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 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;
            //    }
            //}
        }