安全检查,补充公司级树
This commit is contained in:
@@ -7,7 +7,7 @@ using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
public partial class IncentiveNotice :PageBase
|
||||
public partial class IncentiveNotice : PageBase
|
||||
{
|
||||
#region 项目主键
|
||||
/// <summary>
|
||||
@@ -56,7 +56,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
|
||||
this.InitDropDownList();
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
|
||||
@@ -66,12 +66,6 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
// this.Grid1.Columns[0].Hidden = true;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("IncentiveNoticeAdd.aspx") + "return false;";
|
||||
@@ -84,10 +78,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为空
|
||||
@@ -103,8 +106,11 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
|
||||
if (!string.IsNullOrEmpty(this.ProjectId) )
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
string strSql = @"SELECT IncentiveNotice.IncentiveNoticeId,"
|
||||
+ @"IncentiveNotice.ProjectId,"
|
||||
@@ -173,7 +179,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
strSql += " AND IncentiveNoticeCode LIKE @IncentiveNoticeCode";
|
||||
listStr.Add(new SqlParameter("@IncentiveNoticeCode", "%" + this.txtIncentiveNoticeCode.Text.Trim() + "%"));
|
||||
}
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
if (this.drpUnitId.SelectedValue != null && this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND IncentiveNotice.UnitId = @UnitId2";
|
||||
listStr.Add(new SqlParameter("@UnitId2", this.drpUnitId.SelectedValue.Trim()));
|
||||
@@ -354,7 +360,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectIncentiveNoticeMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectIncentiveNoticeMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
|
||||
Reference in New Issue
Block a user