1
yangle
2023-08-25 70f147e9f20d2993b09546b2f00a904cae60c0f9
Kanban/Sc_CJKB.cs
@@ -101,15 +101,16 @@
                //-----------预警状态
                //开工时间小于当天时间,但是任务单状态还是 待生产,系统自动黄色警示;
                //完工时间小于当天时间,但是任务单还是待生产或者在执行的,系统自动红色警示;
                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 = "";
@@ -277,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("预警状态(天)");
@@ -450,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)
@@ -516,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;
            //    }
            //}
        }