补充公司级树
This commit is contained in:
@@ -8,6 +8,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
public partial class ProcedureImageList : PageBase
|
||||
{
|
||||
#region 项目主键
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
@@ -18,18 +34,53 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
//Funs.DropDownPageSize(this.ddlPageSize);
|
||||
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();
|
||||
}
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <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>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
string strSql = @"SELECT Proce.ImageId,
|
||||
Proce.ImageContent,
|
||||
Proce.AttachUrl,
|
||||
@@ -46,7 +97,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
+ @" LEFT JOIN Base_GrooveType AS GrooveType ON GrooveType.GrooveTypeId=Proce.GrooveTypeId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " Where Proce.ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
@@ -238,7 +289,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// <returns></returns>
|
||||
private bool GetButtonPower(string button)
|
||||
{
|
||||
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_ProcedureImageListMenuId, button);
|
||||
return BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_ProcedureImageListMenuId, button);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user