焊接管理,补充公司级树

This commit is contained in:
2025-04-14 15:31:57 +08:00
parent c8b553efc6
commit bb10b1f54e
111 changed files with 6980 additions and 4039 deletions
@@ -4,7 +4,6 @@ using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
namespace FineUIPro.Web.HJGL.HotProcessHard
@@ -13,6 +12,20 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 硬度委托主键
/// </summary>
public string HardTrustID
@@ -38,11 +51,41 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
{
if (!IsPostBack)
{
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 = this.Grid1.PageSize.ToString();
this.HardTrustID = string.Empty;
this.InitTreeMenu();//加载树
}
}
/// <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.InitTreeMenu();
}
#endregion
#region
@@ -51,6 +94,10 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
this.tvControlItem.Nodes.Clear();
TreeNode rootNode = new TreeNode();
rootNode.Text = "装置-单位-工作区";
@@ -58,14 +105,14 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
rootNode.Expanded = true;
this.tvControlItem.Nodes.Add(rootNode);
////装置
var pInstallation = (from x in Funs.DB.Project_Installation where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
var pInstallation = (from x in Funs.DB.Project_Installation where x.ProjectId == this.ProjectId select x).ToList();
////区域
var pWorkArea = (from x in Funs.DB.ProjectData_WorkArea where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
var pWorkArea = (from x in Funs.DB.ProjectData_WorkArea where x.ProjectId == this.ProjectId select x).ToList();
////单位
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.ProjectId select x).ToList();
var workAreaIdList = (from x in BLL.Funs.DB.PW_IsoInfo
where x.ProjectId == this.CurrUser.LoginProjectId
where x.ProjectId == this.ProjectId
orderby x.ISO_IsoNo
select x.WorkAreaId).Distinct().ToList();
pWorkArea = pWorkArea.Where(x => workAreaIdList.Contains(x.WorkAreaId)).OrderBy(x => x.WorkAreaCode).ToList();
@@ -334,7 +381,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
#endregion
protected void btnMenuModify_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_HotHardReportMenuId, Const.BtnSave))
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_HotHardReportMenuId, Const.BtnSave))
{
var trust = Funs.DB.View_HJGL_Hard_Trust.FirstOrDefault(x => x.HardTrustID == tvControlItem.SelectedNodeID);
if (trust != null)