补充公司级别树
This commit is contained in:
@@ -54,12 +54,20 @@ namespace FineUIPro.Web.HSSE.Hazard
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
BLL.RiskLevelService.InitRiskLevelDropDownList(this.drpHazardLevel, true);
|
||||
Funs.FineUIPleaseSelect(this.drpState);
|
||||
@@ -69,11 +77,33 @@ namespace FineUIPro.Web.HSSE.Hazard
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
this.BindGrid();
|
||||
|
||||
this.GetButtonPower();
|
||||
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
//{
|
||||
// btnNew.Hidden = true;
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
string strSql = "select p.*,HazardListItem.WorkStage,HazardListItem.HazardListTypeId,HazardListItem.HazardId,HazardListItem.HazardItems,ControllingPersonUsers.UserName AS ControllingPersonName,Users.UserName,HazardList.WorkAreaName,HazardList.CompileDate,case p.State when '0' then '未巡检' when '1' then '已巡检' when '2' then '超期巡检' else '超期未巡检' end as StateStr,"
|
||||
+ @" (select Days from Base_RiskLevel where RiskLevelId=(select top 1 RiskLevel from Hazard_RiskEvaluationRecord where DataId=p.HazardSelectedItemId order by EvaluatorDate desc)) as Days, "
|
||||
+ @" (select RiskLevelName from Base_RiskLevel where RiskLevelId=(select top 1 RiskLevel from Hazard_RiskEvaluationRecord where DataId=p.HazardSelectedItemId order by EvaluatorDate desc)) as RiskLevelName,"
|
||||
|
||||
Reference in New Issue
Block a user