安全检查,补充公司级树
This commit is contained in:
+56
-2
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user