提交代码

This commit is contained in:
2024-03-05 11:22:03 +08:00
parent d28f7920d8
commit 8e60ae5b65
44 changed files with 4374 additions and 2209 deletions
@@ -18,6 +18,24 @@ namespace FineUIPro.Web.TestRun.DriverRun
BindGrid();
btnNew.OnClientClick = Window1.GetShowReference("DriverRunEdit.aspx") + "return false;";
BLL.UnitService.InitUnitDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
ListItem[] list1 = new ListItem[3];
list1[0] = new ListItem("未开始", "1");
list1[1] = new ListItem("进行中", "2");
list1[2] = new ListItem("已完成", "3");
this.drpStatus.DataTextField = "Text";
this.drpStatus.DataValueField = "Value";
this.drpStatus.DataSource = list1;
this.drpStatus.DataBind();
Funs.FineUIPleaseSelect(this.drpStatus);
ListItem[] list2 = new ListItem[3];
list2[0] = new ListItem("低", "1");
list2[1] = new ListItem("中", "2");
list2[2] = new ListItem("高", "3");
this.drpPriority.DataTextField = "Text";
this.drpPriority.DataValueField = "Value";
this.drpPriority.DataSource = list2;
this.drpPriority.DataBind();
Funs.FineUIPleaseSelect(this.drpPriority);
}
}
#endregion
@@ -39,6 +57,8 @@ namespace FineUIPro.Web.TestRun.DriverRun
driverRun.Objective,
driverRun.NeedCompletedDate,
driverRun.RealCompletedDate,
case driverRun.Status when '1' then '未开始' when '2' then '进行中' when '3' then '已完成' else '' end as Status,
case driverRun.Priority when '1' then '低' when '2' then '中' when '3' then '高' else '' end as Priority,
driverRun.Remark,
Unit.UnitName AS UnitName"
+ @" FROM DriverRun_DriverRun AS driverRun"
@@ -50,6 +70,16 @@ namespace FineUIPro.Web.TestRun.DriverRun
strSql += " AND driverRun.UnitId=@unitId";
listStr.Add(new SqlParameter("@unitId", this.drpUnitId.SelectedValue));
}
if (!string.IsNullOrEmpty(this.drpStatus.SelectedValue) && this.drpStatus.SelectedValue != BLL.Const._Null)
{
strSql += " AND driverRun.Status=@Status";
listStr.Add(new SqlParameter("@Status", this.drpStatus.SelectedValue));
}
if (!string.IsNullOrEmpty(this.drpPriority.SelectedValue) && this.drpPriority.SelectedValue != BLL.Const._Null)
{
strSql += " AND driverRun.Priority=@Priority";
listStr.Add(new SqlParameter("@Priority", this.drpPriority.SelectedValue));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
@@ -57,6 +87,21 @@ namespace FineUIPro.Web.TestRun.DriverRun
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
for (int i = 0; i < Grid1.Rows.Count; i++)
{
Model.DriverRun_DriverRun driverRun = BLL.DriverRunService.GetDriverRunById(Grid1.Rows[i].DataKeys[0].ToString());
if (driverRun != null)
{
if (driverRun.Priority == "2")
{
Grid1.Rows[i].RowCssClass = "yellow";
}
else if (driverRun.Priority == "3")
{
Grid1.Rows[i].RowCssClass = "red";
}
}
}
}
#endregion