质量管理,现场控制点裁剪柜允许编辑

This commit is contained in:
2025-07-01 18:48:37 +08:00
parent eba44201cb
commit c40e74e47e
3 changed files with 202 additions and 19 deletions
@@ -240,7 +240,8 @@ namespace FineUIPro.Web.CQMS.WBS
orderby x.SortIndex
select x).ToList();
foreach (var q in childDivisions)
{if (q.IsSelected == true)
{
if (q.IsSelected == true)
{
TreeNode newNode = new TreeNode();
newNode.Text = q.DivisionName;
@@ -438,8 +439,8 @@ namespace FineUIPro.Web.CQMS.WBS
return id;
}
#region
/// <summary>
@@ -528,8 +529,8 @@ namespace FineUIPro.Web.CQMS.WBS
tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
Grid1.DataBind();
}
#endregion
@@ -989,7 +990,7 @@ namespace FineUIPro.Web.CQMS.WBS
}
#endregion
#region
/// <summary>
@@ -1005,9 +1006,83 @@ namespace FineUIPro.Web.CQMS.WBS
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId);
if (buttonList.Count() > 0)
{
{
if (buttonList.Contains(BLL.Const.BtnModify))
{
this.btnMenuEdit.Hidden = false;
this.btnMenuModify.Hidden = false;
}
}
}
#endregion
#region
/// <summary>
/// 右键修改事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
if (this.trWBS.SelectedNode != null)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId, BLL.Const.BtnModify))
{
if (this.trWBS.SelectedNode.CommandName != "ProjectType" && this.trWBS.SelectedNode.CommandName != "UnitWork" && this.trWBS.SelectedNode.CommandName != "CNProfessional") //非工程类型和单位工程、专业节点可以修改
{
this.hdSelectId.Text = this.trWBS.SelectedNode.NodeID;
string unitWorkId = this.GetUnitWorkId(this.trWBS.SelectedNode);
string openUrl = String.Format("EditDivisionProject.aspx?type=modify&selectedCode={0}&unitWorkId={1}", this.trWBS.SelectedNode.NodeID, unitWorkId, "编辑 - ");
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(hdSelectId.ClientID)
+ Window1.GetShowReference(openUrl));
}
else
{
Alert.ShowInTop("单位工程、工程类型和专业节点无法修改!", MessageBoxIcon.Warning);
}
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
else
{
Alert.ShowInTop("请选择树节点!", MessageBoxIcon.Warning);
}
}
#endregion
#region Grid双击事件
/// <summary>
/// Grid行双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
btnMenuModify_Click(null, null);
}
#endregion
#region
/// <summary>
/// 编辑按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuModify_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("EditBreakdownProject.aspx?type=modify&breakdownProjectId={0}&divisionProjectId={1}", this.Grid1.SelectedRowID, this.trWBS.SelectedNodeID, "新增 - ")));
}
#endregion
}
}