| | |
| | | //开工时间小于当天时间,但是任务单状态还是 待生产,系统自动黄色警示; |
| | | //完工时间小于当天时间,但是任务单还是待生产或者在执行的,系统自动红色警示; |
| | | |
| | | 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 = ""; |
| | |
| | | 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("预警状态(天)"); |
| | |
| | | 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) |
| | |
| | | // 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; |
| | | // } |
| | | //} |
| | | } |
| | | |
| | | |