补充公司级别树
This commit is contained in:
@@ -10,6 +10,22 @@ namespace FineUIPro.Web.HSSE.InformationProject
|
||||
{
|
||||
public partial class ConstructionStandardIdentify : PageBase
|
||||
{
|
||||
#region 项目主键
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
@@ -21,13 +37,44 @@ namespace FineUIPro.Web.HSSE.InformationProject
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
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.CurrUser.LoginProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
this.BindGrid();
|
||||
|
||||
this.GetButtonPower();
|
||||
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
btnNew.Hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 绑定数据
|
||||
@@ -46,16 +93,16 @@ namespace FineUIPro.Web.HSSE.InformationProject
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string projectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]))
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
projectId = Request.Params["projectId"];
|
||||
return;
|
||||
}
|
||||
|
||||
string projectId = this.ProjectId;
|
||||
List<Model.View_InformationProject_ConstructionStandardIdentify> q = (from x in Funs.DB.View_InformationProject_ConstructionStandardIdentify
|
||||
where x.ProjectId == projectId && x.State == BLL.Const.State_2
|
||||
orderby x.IdentifyDate descending
|
||||
select x).ToList();
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(txtConstructionStandardIdentifyCode.Text.Trim()))
|
||||
{
|
||||
@@ -76,7 +123,7 @@ namespace FineUIPro.Web.HSSE.InformationProject
|
||||
{
|
||||
List<Model.View_InformationProject_ConstructionStandardIdentify> source = new List<Model.View_InformationProject_ConstructionStandardIdentify>();
|
||||
source = (from x in Funs.DB.View_InformationProject_ConstructionStandardIdentify
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
where x.ProjectId == this.ProjectId
|
||||
orderby x.IdentifyDate descending
|
||||
select x).ToList();
|
||||
if (!string.IsNullOrEmpty(txtConstructionStandardIdentifyCode.Text.Trim()))
|
||||
@@ -183,7 +230,7 @@ namespace FineUIPro.Web.HSSE.InformationProject
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
int count = BLL.ConstructionStandardIdentifyService.GetConstructionStandardIdentifyByVersionIsNull(this.CurrUser.LoginProjectId);
|
||||
int count = BLL.ConstructionStandardIdentifyService.GetConstructionStandardIdentifyByVersionIsNull(this.ProjectId);
|
||||
if (count == 0)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ConstructionStandardIdentifyEdit.aspx", "选择 - ")));
|
||||
@@ -242,7 +289,7 @@ namespace FineUIPro.Web.HSSE.InformationProject
|
||||
return;
|
||||
}
|
||||
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ConstructionStandardIdentifyMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ConstructionStandardIdentifyMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
|
||||
Reference in New Issue
Block a user