2023-05-22-001
This commit is contained in:
@@ -6,6 +6,18 @@
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>人员报验</title>
|
||||
<style type="text/css">
|
||||
.f-grid-row.Red {
|
||||
background-color: red;
|
||||
}
|
||||
.f-grid-row.Yellow {
|
||||
background-color: yellow;
|
||||
}
|
||||
.LabelColor {
|
||||
color: Red;
|
||||
font-size: small;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -17,7 +29,7 @@
|
||||
runat="server" BoxFlex="1" DataKeyNames="InspectionPersonId" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="2" DataIDField="InspectionPersonId" AllowSorting="true" SortField="InspectionPersonCode"
|
||||
SortDirection="DESC" OnSort="Grid1_Sort" OnRowCommand="Grid1_RowCommand"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" OnRowDataBound="Grid1_RowDataBound"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true" OnPreRowDataBound="Grid1_PreRowDataBound">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using Aspose.Words.Tables;
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -295,7 +296,30 @@ namespace FineUIPro.Web.Comprehensive
|
||||
lbfAction1.Enabled = false;
|
||||
}
|
||||
}
|
||||
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
|
||||
{
|
||||
DataRowView row = e.DataItem as DataRowView;
|
||||
|
||||
|
||||
string ValidityDate = row["ValidityDate"].ToString();
|
||||
if (!string.IsNullOrEmpty(ValidityDate))
|
||||
{
|
||||
if (DateTime.Compare(DateTime.Parse(ValidityDate).AddDays(-15), DateTime.Now) < 0)
|
||||
{
|
||||
// Grid1.Rows[e.RowIndex].RowCssClass = "Red";
|
||||
//过期为红色
|
||||
e.RowCssClass = "Red";
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
e.RowCssClass = "Yellow";
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Grid行点击事件
|
||||
/// </summary>
|
||||
@@ -338,5 +362,7 @@ namespace FineUIPro.Web.Comprehensive
|
||||
|
||||
return "编制";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user