20240305 开车HSE管理
This commit is contained in:
@@ -17,7 +17,6 @@ namespace FineUIPro.Web.TestRun.DriverHse
|
||||
GetButtonPower();
|
||||
BindGrid();
|
||||
btnNew.OnClientClick = Window1.GetShowReference("HseHazardEdit.aspx") + "return false;";
|
||||
BLL.UnitWorkService.InitUnitWorkDropDownList(this.drpUnitWorkId, this.CurrUser.LoginProjectId, true);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -26,28 +25,22 @@ namespace FineUIPro.Web.TestRun.DriverHse
|
||||
//加载列表
|
||||
public void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT driver.HseHazardId,
|
||||
driver.ProjectId,
|
||||
driver.Code,
|
||||
driver.WorkArea,
|
||||
driver.UnitHead,
|
||||
driver.Supervisor,
|
||||
driver.Hazards,
|
||||
driver.Harm,
|
||||
driver.PreventiveMeasures,
|
||||
driver.Darificaiton,
|
||||
driver.AttachUrl,
|
||||
driver.Remark,
|
||||
driver.UnitWorkId,
|
||||
UnitWork.UnitWorkName"
|
||||
+ @" FROM DriverHse_HseHazard AS driver "
|
||||
+ @" LEFT JOIN WBS_UnitWork AS UnitWork ON UnitWork.UnitWorkId = driver.UnitWorkId WHERE driver.ProjectId=@projectId";
|
||||
string strSql = @"SELECT hseHazard.HseHazardId,
|
||||
hseHazard.ProjectId,
|
||||
hseHazard.Code,
|
||||
hseHazard.WorkArea,
|
||||
hseHazard.IdentificationDate,
|
||||
hseHazard.ControlHeaderMan,
|
||||
hseHazard.Remark,
|
||||
hseHazard.AttachUrl"
|
||||
+ @" FROM DriverHse_HseHazard AS hseHazard "
|
||||
+ @" WHERE hseHazard.ProjectId=@projectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
|
||||
if (!string.IsNullOrEmpty(this.drpUnitWorkId.SelectedValue) && this.drpUnitWorkId.SelectedValue != BLL.Const._Null)
|
||||
if (!string.IsNullOrEmpty(this.txtCode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND driver.UnitWorkId=@unitWorkId";
|
||||
listStr.Add(new SqlParameter("@unitWorkId", this.drpUnitWorkId.SelectedValue));
|
||||
strSql += " AND hseHazard.Code like @code";
|
||||
listStr.Add(new SqlParameter("@code", "%" + this.txtCode.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
Reference in New Issue
Block a user