安全检查,补充公司级树

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
@@ -8,6 +8,23 @@ namespace FineUIPro.Web.Customization.CNCEC4.HSSE.Report
{
public partial class HazardousEngineering : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@@ -18,6 +35,21 @@ namespace FineUIPro.Web.Customization.CNCEC4.HSSE.Report
{
if (!IsPostBack)
{
Funs.DropDownPageSize(this.ddlPageSize);
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
this.BindGrid();
@@ -25,12 +57,34 @@ namespace FineUIPro.Web.Customization.CNCEC4.HSSE.Report
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
//this.GetButtonPower();
this.BindGrid();
}
#region
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT report.ReportId,
report.Months,
report.UnitId,
@@ -54,7 +108,7 @@ namespace FineUIPro.Web.Customization.CNCEC4.HSSE.Report
+ @" LEFT JOIN dbo.Base_Unit as unit on unit.UnitId = report.UnitId"
+ @" WHERE report.ProjectId= @ProjectId ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (!string.IsNullOrEmpty(this.txtMonth.Text.Trim()))
{
strSql += " AND report.Months = @months ";
@@ -249,7 +303,7 @@ namespace FineUIPro.Web.Customization.CNCEC4.HSSE.Report
/// <returns></returns>
private bool GetButtonPower(string button)
{
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HazardousEngineeringMenuId, button);
return BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HazardousEngineeringMenuId, button);
}
#endregion