安全检查,补充公司级树
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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
|
||||
this.InitDropDownList();
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
|
||||
@@ -67,12 +67,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;
|
||||
}
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
Grid1.PageSize = this.CurrUser.PageSize.Value;
|
||||
@@ -82,10 +76,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为空
|
||||
@@ -101,6 +104,10 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
|
||||
@@ -121,7 +128,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
// listStr.Add(new SqlParameter("@UnitId1", UnitId));
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
/// 施工分包 只看到自己已完成的处罚单
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
@@ -129,7 +136,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
strSql += " AND P.UnitId = @UnitId"; ///处罚单位
|
||||
listStr.Add(new SqlParameter("@UnitId", this.CurrUser.UnitId));
|
||||
}
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
if (this.drpUnitId.SelectedValue != null && this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND P.UnitId = @UnitId";
|
||||
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
|
||||
|
||||
Reference in New Issue
Block a user