20240819 离场人员、机具灰色标记
This commit is contained in:
parent
d8438a5c76
commit
55471fb403
|
@ -17,6 +17,9 @@
|
||||||
color: Red;
|
color: Red;
|
||||||
font-size: small;
|
font-size: small;
|
||||||
}
|
}
|
||||||
|
.f-grid-row.Gray {
|
||||||
|
background-color: gray;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace FineUIPro.Web.Comprehensive
|
||||||
{
|
{
|
||||||
string strSql = @"select InspectionMachineId, InspectionMachineCode, U.UnitName,CN.ProfessionalName ,Status,
|
string strSql = @"select InspectionMachineId, InspectionMachineCode, U.UnitName,CN.ProfessionalName ,Status,
|
||||||
InspectionMachineName, SpecificationModel, NextTestDate, TestCycle, C.InspectionDate,
|
InspectionMachineName, SpecificationModel, NextTestDate, TestCycle, C.InspectionDate,
|
||||||
InspectionDate CompileDate, (CASE WHEN IsVerification=1 THEN '是' WHEN IsVerification=0 THEN '否' ELSE '' END) AS IsVerification, InspectionType, LeaveDate, UnitsCount,C.RemarkCode
|
InspectionDate CompileDate, (CASE WHEN IsVerification=1 THEN '是' WHEN IsVerification=0 THEN '否' ELSE '' END) AS IsVerification, InspectionType, LeaveDate, UnitsCount,C.RemarkCode,C.IsOnSite
|
||||||
from Comprehensive_InspectionMachine C
|
from Comprehensive_InspectionMachine C
|
||||||
left join Base_Unit U on C.UnitId=U.UnitId
|
left join Base_Unit U on C.UnitId=U.UnitId
|
||||||
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
|
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
|
||||||
|
@ -106,7 +106,7 @@ namespace FineUIPro.Web.Comprehensive
|
||||||
DataRowView row = e.DataItem as DataRowView;
|
DataRowView row = e.DataItem as DataRowView;
|
||||||
string IsVerification = row["IsVerification"].ToString();
|
string IsVerification = row["IsVerification"].ToString();
|
||||||
string NextTestDate = row["NextTestDate"].ToString();
|
string NextTestDate = row["NextTestDate"].ToString();
|
||||||
string InspectionType= row["InspectionType"].ToString();
|
string InspectionType = row["InspectionType"].ToString();
|
||||||
if (InspectionType == "计量")
|
if (InspectionType == "计量")
|
||||||
{
|
{
|
||||||
if (IsVerification == "是" && !string.IsNullOrEmpty(NextTestDate)) //在校验期内
|
if (IsVerification == "是" && !string.IsNullOrEmpty(NextTestDate)) //在校验期内
|
||||||
|
@ -126,6 +126,13 @@ namespace FineUIPro.Web.Comprehensive
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//离场为灰色
|
||||||
|
string LeaveDate = row["LeaveDate"].ToString();
|
||||||
|
string IsOnSite = row["IsOnSite"].ToString();
|
||||||
|
if (!string.IsNullOrEmpty(LeaveDate) || IsOnSite == "False")
|
||||||
|
{
|
||||||
|
e.RowCssClass = "Gray";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 查询
|
#region 查询
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
color: Red;
|
color: Red;
|
||||||
font-size: small;
|
font-size: small;
|
||||||
}
|
}
|
||||||
|
.f-grid-row.Gray {
|
||||||
|
background-color: gray;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -301,25 +301,27 @@ namespace FineUIPro.Web.Comprehensive
|
||||||
{
|
{
|
||||||
DataRowView row = e.DataItem as DataRowView;
|
DataRowView row = e.DataItem as DataRowView;
|
||||||
|
|
||||||
|
|
||||||
string ValidityDate = row["ValidityDate"].ToString();
|
string ValidityDate = row["ValidityDate"].ToString();
|
||||||
if (!string.IsNullOrEmpty(ValidityDate))
|
if (!string.IsNullOrEmpty(ValidityDate))
|
||||||
{
|
{
|
||||||
if (DateTime.Compare(DateTime.Parse(ValidityDate).AddDays(-15), DateTime.Now) < 0)
|
if (DateTime.Compare(DateTime.Parse(ValidityDate).AddDays(-15), DateTime.Now) < 0)
|
||||||
{
|
{
|
||||||
// Grid1.Rows[e.RowIndex].RowCssClass = "Red";
|
// Grid1.Rows[e.RowIndex].RowCssClass = "Red";
|
||||||
//过期为红色
|
//过期为红色
|
||||||
e.RowCssClass = "Red";
|
e.RowCssClass = "Red";
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
e.RowCssClass = "Yellow";
|
e.RowCssClass = "Yellow";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//离场人员为灰色
|
||||||
|
string DepartureTime = row["DepartureTime"].ToString();
|
||||||
|
string IsOnSite = row["IsOnSite"].ToString();
|
||||||
|
if (!string.IsNullOrEmpty(DepartureTime) || IsOnSite == "False")
|
||||||
|
{
|
||||||
|
e.RowCssClass = "Gray";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Grid行点击事件
|
/// Grid行点击事件
|
||||||
|
|
Loading…
Reference in New Issue