安全检查,补充公司级树
This commit is contained in:
@@ -60,8 +60,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
|
||||
|
||||
this.InitDropDownList();
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
|
||||
@@ -71,11 +70,6 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
// this.Grid1.Columns[0].Hidden = true;
|
||||
}
|
||||
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
{
|
||||
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
|
||||
this.drpUnitId.Enabled = false;
|
||||
}
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("PunishNoticeAdd.aspx") + "return false;";
|
||||
@@ -88,10 +82,19 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
private void InitDropDownList()
|
||||
{
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
{
|
||||
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
|
||||
this.drpUnitId.Enabled = false;
|
||||
}
|
||||
}
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
this.InitDropDownList();
|
||||
//新增UnitId
|
||||
//this.UnitId = this.ucTree.UnitId;
|
||||
////判断 当有projectId的时候单位id为空
|
||||
@@ -107,6 +110,10 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.ProjectId) )
|
||||
{
|
||||
|
||||
@@ -164,7 +171,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
strSql += " AND PunishNoticeCode LIKE @PunishNoticeCode";
|
||||
listStr.Add(new SqlParameter("@PunishNoticeCode", "%" + this.txtPunishNoticeCode.Text.Trim() + "%"));
|
||||
}
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
if (this.drpUnitId.SelectedValue != null && this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND PunishNotice.UnitId = @UnitId2";
|
||||
listStr.Add(new SqlParameter("@UnitId2", this.drpUnitId.SelectedValue.Trim()));
|
||||
@@ -351,7 +358,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectPunishNoticeMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectPunishNoticeMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
|
||||
Reference in New Issue
Block a user