安全检查,补充公司级树

This commit is contained in:
2025-04-10 17:34:21 +08:00
parent 6e6f78e900
commit d9a4bb09ac
98 changed files with 6493 additions and 3750 deletions
@@ -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))