补充公司级树

This commit is contained in:
2025-04-13 20:44:26 +08:00
parent 96899ce306
commit f5344bddfb
34 changed files with 2330 additions and 1350 deletions
@@ -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
}