公司级树补充
This commit is contained in:
@@ -10,6 +10,21 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
{
|
||||
public partial class ProjectControlPointAuditRecord : PageBase
|
||||
{
|
||||
#region 项目主键
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
public bool Editable
|
||||
{
|
||||
get
|
||||
@@ -22,6 +37,7 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 页面加载
|
||||
/// <summary>
|
||||
@@ -35,13 +51,42 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
{
|
||||
Editable = false;
|
||||
|
||||
GetButtonPower();
|
||||
BindGrid();
|
||||
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();
|
||||
}
|
||||
BindGrid();
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
/// <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>
|
||||
/// 关闭窗口
|
||||
@@ -121,6 +166,10 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
string strSql = @"SELECT AuditId
|
||||
,WBS_BreakdownProjectAuditRecord.ProjectId
|
||||
,AuditCode
|
||||
@@ -134,7 +183,7 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
FROM dbo.WBS_BreakdownProjectAuditRecord left join Sys_User on Auditer = UserId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " where WBS_BreakdownProjectAuditRecord.ProjectId=@ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
if (!string.IsNullOrEmpty(txtAuditCode.Text))
|
||||
{
|
||||
strSql += " and AuditCode like '%" + txtAuditCode.Text + "%'";
|
||||
@@ -198,7 +247,7 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointAuditMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointAuditMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
|
||||
Reference in New Issue
Block a user