补充公司级别树
This commit is contained in:
@@ -38,18 +38,21 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
|
||||
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
|
||||
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.drpUnit.SelectedValue = this.CurrUser.UnitId;
|
||||
this.drpUnit.Enabled = false;
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
this.InitDropDownList();
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
|
||||
this.btnNew.OnClientClick = Window1.GetShowReference("RectifyNoticesFinalDocEdit.aspx") + "return false;";
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
@@ -60,11 +63,44 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
private void InitDropDownList()
|
||||
{
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true);
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
{
|
||||
this.drpUnit.SelectedValue = this.CurrUser.UnitId;
|
||||
this.drpUnit.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.ProjectId))
|
||||
{
|
||||
btnNew.Hidden = true;
|
||||
}
|
||||
this.GetButtonPower();
|
||||
this.BindGrid();
|
||||
}
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string strSql = @"SELECT RectifyNoticesFinalDocId
|
||||
,RectifyNoticesFinalDocCode
|
||||
,(case State when '1' then '已完成' else '未完成' end ) as State
|
||||
@@ -81,9 +117,9 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
+ @" WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND Doc.ProjectId = @ProjectId";
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -100,8 +136,8 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
strSql += " AND Doc.CheckManDate <= @EndDate";
|
||||
listStr.Add(new SqlParameter("@EndDate", endDate));
|
||||
}
|
||||
if (this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
}
|
||||
if (this.drpUnit.SelectedValue != null && this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND Doc.UnitId = @UnitId2";
|
||||
listStr.Add(new SqlParameter("@UnitId2", this.drpUnit.SelectedValue));
|
||||
@@ -207,9 +243,9 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
var licenseManager = BLL.Check_RectifyNoticesFinalDocService.GetCheck_RectifyNoticesFinalDocById(id);
|
||||
if (licenseManager != null)
|
||||
{
|
||||
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RectifyNoticesFinalDocEdit.aspx?RectifyNoticesFinalDocId={0}", id, "编辑 - ")));
|
||||
|
||||
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RectifyNoticesFinalDocEdit.aspx?RectifyNoticesFinalDocId={0}", id, "编辑 - ")));
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -230,7 +266,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
var Doc = BLL.Check_RectifyNoticesFinalDocService.GetCheck_RectifyNoticesFinalDocById(rowID);
|
||||
if (Doc != null)
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, Doc.RectifyNoticesFinalDocCode,Doc.RectifyNoticesFinalDocId, BLL.Const.ProjectRectifyNoticesFinalDocEditMenuId, BLL.Const.BtnDelete);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, Doc.RectifyNoticesFinalDocCode, Doc.RectifyNoticesFinalDocId, BLL.Const.ProjectRectifyNoticesFinalDocEditMenuId, BLL.Const.BtnDelete);
|
||||
BLL.Check_RectifyNoticesFinalDocService.DeleteCheck_RectifyNoticesFinalDocById(rowID);
|
||||
}
|
||||
}
|
||||
@@ -253,7 +289,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectRectifyNoticesFinalDocEditMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectRectifyNoticesFinalDocEditMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
|
||||
Reference in New Issue
Block a user