添加时间限制

This commit is contained in:
李超 2025-07-23 10:45:23 +08:00
parent 6dd2db4824
commit 3a17c000be
1 changed files with 9 additions and 2 deletions

View File

@ -105,9 +105,16 @@ namespace FineUIPro.Web.HSSE.TowerCrane
listStr.Add(new SqlParameter("@TowerCraneId", TowerCraneId));
if (ckIsWarnOnly.Checked)
{
strSql += " and AlarmType is not null ";
strSql += " and AlarmType is not null ";
}
if (!string.IsNullOrEmpty(txtStartTime.Text))
{
strSql += " and Date >='"+ txtStartTime.Text + "' ";
}
if (!string.IsNullOrEmpty(txtEndTime.Text))
{
strSql += " and Date <='" + txtEndTime.Text + "' ";
}
strSql += " order by Date desc";
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);