焊接管理,补充公司级树
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HardReport.aspx.cs" Inherits="FineUIPro.Web.HJGL.HotProcessHard.HardReport" %>
|
||||
|
||||
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
@@ -18,6 +20,16 @@
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||
BodyPadding="0px">
|
||||
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelLeftRegion2" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="280px" Title="硬度报告"
|
||||
ShowBorder="true" Layout="VBox" ShowHeader="false" AutoScroll="true" BodyPadding="5px"
|
||||
IconFont="ArrowCircleLeft">
|
||||
@@ -37,7 +49,6 @@
|
||||
<f:Tree ID="tvControlItem" ShowHeader="false" Title="硬度委托节点树" OnNodeCommand="tvControlItem_NodeCommand"
|
||||
Height="470px" runat="server" ShowBorder="false" EnableCollapse="true"
|
||||
AutoLeafIdentification="true" EnableSingleExpand="true" EnableTextSelection="true">
|
||||
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
@@ -45,22 +56,22 @@
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="硬度委托"
|
||||
TitleToolTip="硬度委托" AutoScroll="true">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right" >
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="hdHotProessTrustId" Hidden="true">
|
||||
</f:TextBox>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
|
||||
<f:Button ID="btnEdit" Text="编辑" ToolTip="编辑"
|
||||
Icon="TableEdit" runat="server" OnClick="btnMenuModify_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnNew" Text="打印" ToolTip="打印"
|
||||
Icon="Printer" runat="server" OnClick="btnPrinter_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="hdHotProessTrustId" Hidden="true">
|
||||
</f:TextBox>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
|
||||
<f:Button ID="btnEdit" Text="编辑" ToolTip="编辑"
|
||||
Icon="TableEdit" runat="server" OnClick="btnMenuModify_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnNew" Text="打印" ToolTip="打印"
|
||||
Icon="Printer" runat="server" OnClick="btnPrinter_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BodyPadding="10px"
|
||||
runat="server" RedStarPosition="BeforeText" LabelAlign="Left">
|
||||
@@ -68,13 +79,13 @@
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="txtInspectionNum" Label="报告编号" runat="server"
|
||||
LabelAlign="Left">
|
||||
LabelAlign="Left">
|
||||
</f:Label>
|
||||
<f:Label ID="txtHardnessMethod" Label="检测方法" runat="server"
|
||||
LabelAlign="Left">
|
||||
</f:Label>
|
||||
<f:Label ID="txtEquipmentModel" Label="设备型号" runat="server"
|
||||
LabelAlign="Left">
|
||||
LabelAlign="Left">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -50,6 +50,33 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ucTree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion2;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HardTrust.aspx.cs" Inherits="FineUIPro.Web.HJGL.HotProcessHard.HardTrust" %>
|
||||
|
||||
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
@@ -17,6 +19,16 @@
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||
BodyPadding="0px">
|
||||
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelLeftRegion2" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="280px" Title="硬度委托"
|
||||
ShowBorder="true" Layout="VBox" ShowHeader="false" AutoScroll="true" BodyPadding="5px"
|
||||
IconFont="ArrowCircleLeft">
|
||||
@@ -34,7 +46,7 @@
|
||||
<f:Tree ID="tvControlItem" ShowHeader="false" Title="硬度委托节点树" OnNodeCommand="tvControlItem_NodeCommand"
|
||||
Height="470px" runat="server" ShowBorder="false" EnableCollapse="true"
|
||||
AutoLeafIdentification="true" EnableSingleExpand="true" EnableTextSelection="true">
|
||||
<%-- <Listeners>
|
||||
<%-- <Listeners>
|
||||
<f:Listener Event="beforenodecontextmenu" Handler="onTreeNodeContextMenu" />
|
||||
</Listeners>--%>
|
||||
</f:Tree>
|
||||
@@ -44,22 +56,22 @@
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="硬度委托"
|
||||
TitleToolTip="硬度委托" AutoScroll="true">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left" >
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="hdHardTrustID" Hidden="true">
|
||||
</f:TextBox>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" Text="新增" ToolTip="新增"
|
||||
Icon="Add" runat="server" OnClick="btnNew_Click">
|
||||
Icon="Add" runat="server" OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnEdit" Text="编辑" ToolTip="编辑"
|
||||
Icon="TableEdit" runat="server" OnClick="btnEdit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDelete" Text="删除" ToolTip="删除"
|
||||
ConfirmText="确认删除此硬度委托?" ConfirmTarget="Top" Icon="Delete"
|
||||
runat="server" OnClick="btnDelete_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnEdit" Text="编辑" ToolTip="编辑"
|
||||
Icon="TableEdit" runat="server" OnClick="btnEdit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDelete" Text="删除" ToolTip="删除"
|
||||
ConfirmText="确认删除此硬度委托?" ConfirmTarget="Top" Icon="Delete"
|
||||
runat="server" OnClick="btnDelete_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
@@ -69,18 +81,18 @@
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="txtHardTrustNo" Label="委托单号" runat="server" LabelAlign="Left"></f:Label>
|
||||
<f:Label ID="txtHardTrustNo" Label="委托单号" runat="server" LabelAlign="Left"></f:Label>
|
||||
<f:Label ID="txtHardTrustUnit" Label="委托单位" runat="server" LabelAlign="Left"></f:Label>
|
||||
<f:Label ID="txtCheckUnit" Label="检测单位" runat="server" LabelAlign="Left"></f:Label>
|
||||
<f:Label ID="txtHardTrustDate" Label="委托日期" runat="server" LabelAlign="Left"></f:Label>
|
||||
<f:Label ID="txtCheckUnit" Label="检测单位" runat="server" LabelAlign="Left"></f:Label>
|
||||
<f:Label ID="txtHardTrustDate" Label="委托日期" runat="server" LabelAlign="Left"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label runat="server" ID="txtCheckName" Label="检件名称" LabelAlign="Left"></f:Label>
|
||||
<f:Label runat="server" ID="txtCheckName" Label="检件名称" LabelAlign="Left"></f:Label>
|
||||
<f:Label ID="txtStandards" Label="检测标准" runat="server" LabelAlign="Left"></f:Label>
|
||||
<f:Label runat="server" ID="txtAcceptStandard" Label="验收标准" LabelAlign="Left"></f:Label>
|
||||
<f:Label ID="txtHardnessRate" Label="检测比例" runat="server" LabelAlign="Left"></f:Label>
|
||||
<f:Label ID="txtHardnessRate" Label="检测比例" runat="server" LabelAlign="Left"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
@@ -179,7 +191,7 @@
|
||||
EnableIFrame="true" EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
|
||||
IsModal="true" Width="1000px" Height="520px">
|
||||
</f:Window>
|
||||
<%-- <f:Menu ID="Menu1" runat="server">
|
||||
<%-- <f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnNew" OnClick="btnNew_Click" EnablePostBack="true" runat="server" Hidden="true" Icon="Add"
|
||||
Text="新增">
|
||||
</f:MenuButton>
|
||||
@@ -208,7 +220,7 @@
|
||||
}
|
||||
|
||||
var treeID = '<%= tvControlItem.ClientID %>';
|
||||
|
||||
|
||||
// 保存当前菜单对应的树节点ID
|
||||
var currentNodeId;
|
||||
|
||||
|
||||
@@ -11,6 +11,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
|
||||
@@ -36,12 +50,42 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
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.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 获取按钮权限
|
||||
@@ -56,7 +100,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_HotHardManageEditMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_HotHardManageEditMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
@@ -81,6 +125,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 = "装置-单位-工作区";
|
||||
@@ -88,14 +136,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();
|
||||
@@ -222,7 +270,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
/// <param name="e"></param>
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_HotHardManageEditMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_HotHardManageEditMenuId);
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "建筑工程" || this.tvControlItem.SelectedNode.CommandName == "安装工程")
|
||||
{
|
||||
this.btnNew.Hidden = true;
|
||||
@@ -393,7 +441,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_HotHardManageEditMenuId, Const.BtnAdd))
|
||||
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_HotHardManageEditMenuId, Const.BtnAdd))
|
||||
{
|
||||
if (this.tvControlItem.SelectedNode != null && this.tvControlItem.SelectedNode.ToolTip == "区域")
|
||||
{
|
||||
@@ -422,7 +470,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
/// <param name="e"></param>
|
||||
protected void btnEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_HotHardManageEditMenuId, Const.BtnSave))
|
||||
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_HotHardManageEditMenuId, Const.BtnSave))
|
||||
{
|
||||
if (this.tvControlItem.SelectedNode != null)
|
||||
{
|
||||
@@ -458,7 +506,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
/// <param name="e"></param>
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_HotHardManageEditMenuId, Const.BtnDelete))
|
||||
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_HotHardManageEditMenuId, Const.BtnDelete))
|
||||
{
|
||||
if (this.tvControlItem.SelectedNode != null)
|
||||
{
|
||||
@@ -495,7 +543,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
}
|
||||
BLL.Hard_TrustItemService.DeleteHardTrustItemById(this.HardTrustID);
|
||||
BLL.Hard_TrustService.DeleteHardTrustById(this.HardTrustID);
|
||||
//BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Resources.Lan.DeleteHardTrust);
|
||||
//BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.ProjectId, this.CurrUser.UserId, Resources.Lan.DeleteHardTrust);
|
||||
Alert.ShowInTop("删除成功!", MessageBoxIcon.Success);
|
||||
this.InitTreeMenu();
|
||||
this.Grid1.DataSource = null;
|
||||
|
||||
@@ -50,6 +50,33 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ucTree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion2;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HotProessReport.aspx.cs" Inherits="FineUIPro.Web.HJGL.HotProcessHard.HotProessReport" %>
|
||||
|
||||
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
@@ -13,6 +15,16 @@
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||
BodyPadding="0px">
|
||||
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelLeftRegion2" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="320px" Title="热处理委托"
|
||||
ShowBorder="true" Layout="VBox" ShowHeader="false" AutoScroll="true" BodyPadding="5px"
|
||||
IconFont="ArrowCircleLeft">
|
||||
@@ -32,7 +44,7 @@
|
||||
<f:Tree ID="tvControlItem" ShowHeader="false" Title="热处理委托节点树" OnNodeCommand="tvControlItem_NodeCommand"
|
||||
Height="470px" runat="server" ShowBorder="false" EnableCollapse="true" EnableSingleClickExpand="true"
|
||||
AutoLeafIdentification="true" EnableSingleExpand="true" EnableTextSelection="true">
|
||||
<%-- <Listeners>
|
||||
<%-- <Listeners>
|
||||
<f:Listener Event="beforenodecontextmenu" Handler="onTreeNodeContextMenu" />
|
||||
</Listeners>--%>
|
||||
</f:Tree>
|
||||
@@ -42,15 +54,15 @@
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="热处理委托"
|
||||
TitleToolTip="热处理委托" AutoScroll="true">
|
||||
<Toolbars>
|
||||
<f:Toolbar>
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnEdit" Text="编辑" ToolTip="编辑"
|
||||
Icon="TableEdit" runat="server" OnClick="btnMenuModify_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="Button2" runat="server" Icon="Printer" Text="打印" ToolTip="打印" OnClick="btnPrinter_Click" ></f:Button>
|
||||
<f:Toolbar>
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnEdit" Text="编辑" ToolTip="编辑"
|
||||
Icon="TableEdit" runat="server" OnClick="btnMenuModify_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="Button2" runat="server" Icon="Printer" Text="打印" ToolTip="打印" OnClick="btnPrinter_Click"></f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BodyPadding="10px"
|
||||
@@ -59,13 +71,12 @@
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="txtHotProessTrustNo" Label="委托单号"
|
||||
runat="server" LabelAlign="Left" >
|
||||
runat="server" LabelAlign="Left">
|
||||
</f:Label>
|
||||
<f:Label ID="txtProessDate" Label="委托日期" runat="server"
|
||||
LabelAlign="Right" >
|
||||
LabelAlign="Right">
|
||||
</f:Label>
|
||||
<f:Label ID="txtTabler" Label="制表人" runat="server" LabelAlign="Left"
|
||||
>
|
||||
<f:Label ID="txtTabler" Label="制表人" runat="server" LabelAlign="Left">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
@@ -73,13 +84,12 @@
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="txtProessMethod" Label="热处理方法" runat="server"
|
||||
LabelAlign="Left" >
|
||||
LabelAlign="Left">
|
||||
</f:Label>
|
||||
<f:Label ID="txtProessEquipment" Label="热处理设备" runat="server"
|
||||
LabelAlign="Left" >
|
||||
LabelAlign="Left">
|
||||
</f:Label>
|
||||
<f:Label ID="txtReport" Label="报告编号" runat="server" LabelAlign="Right"
|
||||
>
|
||||
<f:Label ID="txtReport" Label="报告编号" runat="server" LabelAlign="Right">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
@@ -174,7 +184,7 @@
|
||||
EnablePostBack="true" Icon="Pencil" ConfirmTarget="Top" runat="server" Text="热处理报告">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
<%-- <f:Menu ID="Menu2" runat="server">
|
||||
<%-- <f:Menu ID="Menu2" runat="server">
|
||||
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Text="编辑" Icon="Pencil" OnClick="btnMenuModify_Click">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnPrinter" EnablePostBack="true" runat="server" Text="打印" Icon="Printer" OnClick="btnPrinter_Click" Hidden="true">
|
||||
|
||||
@@ -14,6 +14,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 HotProessTrustId
|
||||
@@ -39,12 +53,42 @@ 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.HotProessTrustId = 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 加载树
|
||||
@@ -53,6 +97,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 = "装置-单位-工作区";
|
||||
@@ -60,14 +108,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();
|
||||
@@ -229,7 +277,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
+ @" FROM dbo.View_HJGL_HotProess_TrustItem AS Trust"
|
||||
+ @" WHERE Trust.ProjectId= @ProjectId AND Trust.HotProessTrustId=@HotProessTrustId ";
|
||||
|
||||
listStr.Add(new SqlParameter("@ProjectId", hotProessTrust != null ? hotProessTrust.ProjectId : this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@ProjectId", hotProessTrust != null ? hotProessTrust.ProjectId : this.ProjectId));
|
||||
listStr.Add(new SqlParameter("@HotProessTrustId", this.HotProessTrustId));
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtIsoNo.Text.Trim()))
|
||||
@@ -381,7 +429,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuHotProessReport_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_HotProessReportMenuId, Const.BtnSave))
|
||||
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_HotProessReportMenuId, Const.BtnSave))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HotProessReport.aspx?HotProessTrustItemId={0}", this.Grid1.SelectedRowID, "编辑热处理报告 - ")));
|
||||
}
|
||||
@@ -394,7 +442,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
|
||||
protected void btnMenuModify_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_HotProessReportMenuId, Const.BtnSave))
|
||||
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_HotProessReportMenuId, Const.BtnSave))
|
||||
{
|
||||
var trustManage = BLL.HotProess_TrustService.GetHotProessTrustById(this.tvControlItem.SelectedNodeID);
|
||||
if (trustManage != null)
|
||||
@@ -424,7 +472,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
return;
|
||||
}
|
||||
string varValue = string.Empty;
|
||||
var project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
|
||||
var project = BLL.ProjectService.GetProjectByProjectId(this.ProjectId);
|
||||
if (project != null)
|
||||
{
|
||||
varValue = project.ProjectName;
|
||||
|
||||
@@ -50,6 +50,33 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ucTree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion2;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user