安全检查,补充公司级树
This commit is contained in:
@@ -44,12 +44,7 @@ namespace FineUIPro.Web.HSSE.Emergency
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
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.InitDropDownList();
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("EmergencySupplyEdit.aspx") + "return false;";
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
@@ -60,6 +55,32 @@ namespace FineUIPro.Web.HSSE.Emergency
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
this.InitDropDownList();
|
||||
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
btnNew.Hidden = true;
|
||||
}
|
||||
this.GetButtonPower();
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region GV绑定数据
|
||||
@@ -68,6 +89,10 @@ namespace FineUIPro.Web.HSSE.Emergency
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
string strSql = @"SELECT EmergencySupply.FileId,EmergencySupply.ProjectId,CodeRecords.Code AS FileCode,EmergencySupply.UnitId,EmergencySupply.FileName,EmergencySupply.Category,CompileManUser.UserName AS CompileManName,EmergencySupply.CompileDate,EmergencySupply.States,Unit.UnitName "
|
||||
+ @" ,(CASE WHEN EmergencySupply.States = " + BLL.Const.State_0 + " OR EmergencySupply.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN EmergencySupply.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
|
||||
+ @" FROM Emergency_EmergencySupply AS EmergencySupply"
|
||||
@@ -86,7 +111,7 @@ namespace FineUIPro.Web.HSSE.Emergency
|
||||
}
|
||||
else
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtFileCode.Text.Trim()))
|
||||
@@ -99,7 +124,7 @@ namespace FineUIPro.Web.HSSE.Emergency
|
||||
strSql += " AND EmergencySupply.FileName LIKE @FileName";
|
||||
listStr.Add(new SqlParameter("@FileName", "%" + this.txtFileName.Text.Trim() + "%"));
|
||||
}
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
if (this.drpUnitId.SelectedValue != null && this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND EmergencySupply.UnitId = @UnitId";
|
||||
listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
|
||||
@@ -249,7 +274,7 @@ namespace FineUIPro.Web.HSSE.Emergency
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectEmergencySupplyMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectEmergencySupplyMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
|
||||
Reference in New Issue
Block a user