This commit is contained in:
jackchenyang 2024-05-12 12:05:01 +08:00
parent 1d15ad3756
commit b329d813e4
17 changed files with 1638 additions and 16 deletions

Binary file not shown.

View File

@ -163,6 +163,7 @@
<Compile Include="WeldingProcess\CheckManage\Batch_NDEService.cs" />
<Compile Include="WeldingProcess\CheckManage\RepairRecordService.cs" />
<Compile Include="WeldingProcess\DataIn\DataInTempService.cs" />
<Compile Include="WeldingProcess\PMI\PMIDelegation_Service.cs" />
<Compile Include="WeldingProcess\TestPackageManage\AItemEndCheckService.cs" />
<Compile Include="WeldingProcess\TestPackageManage\BItemEndCheckService.cs" />
<Compile Include="WeldingProcess\TestPackageManage\TestPackageManageAuditService.cs" />

View File

@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public class PMIDelegation_Service
{
/// <summary>
/// 查找后返回集合增加到列表
/// </summary>
/// <param name="hdItemsString"></param>
/// <returns></returns>
public static List<Model.View_PMI_DelegationDetails> GetPMI_DelegationAddItem(string hdItemsString)
{
var jointInfos = from x in Funs.DB.View_Pipeline_WeldJoint select x;
List<Model.View_PMI_DelegationDetails> returnViewMatch = new List<Model.View_PMI_DelegationDetails>();
if (!string.IsNullOrEmpty(hdItemsString))
{
List<string> jotIds = Funs.GetStrListByStr(hdItemsString, '|');
foreach (var jotItem in jotIds)
{
string[] strs = jotItem.Split(',');
var jotInfo = jointInfos.FirstOrDefault(x => x.WeldJointId == strs[0]);
Model.View_PMI_DelegationDetails newItem = new Model.View_PMI_DelegationDetails();
newItem.Id = SQLHelper.GetNewID(typeof(Model.View_PMI_DelegationDetails));
newItem.WeldJointId = jotInfo.WeldJointId;
newItem.WeldJointCode = jotInfo.WeldJointCode;
newItem.PipelineCode = jotInfo.PipelineCode;
newItem.Specification = jotInfo.Specification;
newItem.MaterialCode = jotInfo.Material1Code;
newItem.QualityNo = string.Empty;
newItem.Acceptance = string.Empty;
newItem.Status = 0;
newItem.PMIId = string.Empty;
newItem.WorkAreaId = jotInfo.WorkAreaId;
newItem.CreatedTime = DateTime.Now;
newItem.DelegationDate= DateTime.Now;
newItem.DelegationNo = string.Empty;
returnViewMatch.Add(newItem);
}
}
return returnViewMatch;
}
/// <summary>
/// 返回视图列表集合
/// </summary>
public static List<Model.View_PMI_DelegationDetails> GetPMI_DelegationItem(string projectId, string pmiId)
{
List<Model.View_PMI_DelegationDetails> returnViewMatch = (from x in Funs.DB.View_PMI_DelegationDetails
where x.ProjectId == projectId && x.PMIId == pmiId
select x).ToList();
return returnViewMatch;
}
}
}

View File

@ -31,4 +31,36 @@ update Pipeline_WeldJoint set isPMI=0
-- 插入PMI委托菜单
insert into Sys_Menu values('A6FB44C3-0920-4F77-862F-D814FD5E5D23','PMI检测管理','PMI detection management','',21,0,3,NUll,1)
insert into Sys_Menu values(NEWID(),'PMI委托','PMI delegation','/WeldingProcess/PMI/PMIDelegation.aspx',0,'A6FB44C3-0920-4F77-862F-D814FD5E5D23',3,NULL,1)
insert into Sys_Menu values(NEWID(),'PMI¼ì²â¼Èë','PMI detection entry','/WeldingProcess/PMI/PMIDetectionEntry.aspx',0,'A6FB44C3-0920-4F77-862F-D814FD5E5D23',3,NULL,1)
insert into Sys_Menu values(NEWID(),'PMI쇱꿎쩌흙','PMI detection entry','/WeldingProcess/PMI/PMIDetectionEntry.aspx',0,'A6FB44C3-0920-4F77-862F-D814FD5E5D23',3,NULL,1)
CREATE VIEW [dbo].[View_PMI_DelegationDetails]
AS
/*******袒똑官辜츠玖***********/
SELECT
B.PMIId,
B.JointId,
B.QualityNo,
B.Acceptance,
B.CreatedTime,
B.status,
Pipeline.PipelineCode,
WeldJoint.WeldJointCode,
WeldJoint.Specification,
WeldJoint.Remark,
Pipeline.SingleNumber,
(CASE WHEN WeldJoint.CoverWelderCode IS NOT NULL AND WeldJoint.BackingWelderCode IS NOT NULL
THEN WeldJoint.CoverWelderCode + '/' + WeldJoint.BackingWelderCode
ELSE (ISNULL(WeldJoint.CoverWelderCode,'') + ISNULL(WeldJoint.BackingWelderCode,'')) END) AS WelderCode, --
(CASE WHEN WeldJoint.Material1Code IS NOT NULL AND WeldJoint.Material2Code IS NOT NULL
THEN WeldJoint.Material1Code + '/' + WeldJoint.Material2Code
ELSE (ISNULL(WeldJoint.Material1Code,'') + ISNULL(WeldJoint.Material2Code,'')) END) AS MaterialCode --
FROM PMI_Delegation AS A INNER JOIN
PMI_DelegationDetails AS B ON A.Id=B.PMIId
LEFT JOIN View_Pipeline_WeldJoint AS WeldJoint ON WeldJoint.WeldJointId=B.JointId
LEFT JOIN Pipeline_Pipeline AS Pipeline ON Pipeline.PipelineId=WeldJoint.PipelineId
GO

View File

@ -69,6 +69,15 @@ namespace Resources {
}
}
/// <summary>
/// 查找类似 制造/验收标准 的本地化字符串。
/// </summary>
internal static string Acceptance {
get {
return ResourceManager.GetString("Acceptance", resourceCulture);
}
}
/// <summary>
/// 查找类似 账号 的本地化字符串。
/// </summary>
@ -3678,6 +3687,33 @@ namespace Resources {
}
}
/// <summary>
/// 查找类似 PMI委托单号已存在 的本地化字符串。
/// </summary>
internal static string PMICodeExists {
get {
return ResourceManager.GetString("PMICodeExists", resourceCulture);
}
}
/// <summary>
/// 查找类似 PMI处理委托 的本地化字符串。
/// </summary>
internal static string PMIDelegationTrust {
get {
return ResourceManager.GetString("PMIDelegationTrust", resourceCulture);
}
}
/// <summary>
/// 查找类似 PMI委托单保存失败 的本地化字符串。
/// </summary>
internal static string PMIError {
get {
return ResourceManager.GetString("PMIError", resourceCulture);
}
}
/// <summary>
/// 查找类似 点口编号 的本地化字符串。
/// </summary>
@ -4146,6 +4182,15 @@ namespace Resources {
}
}
/// <summary>
/// 查找类似 质量证明文件编号 的本地化字符串。
/// </summary>
internal static string QualityNo {
get {
return ResourceManager.GetString("QualityNo", resourceCulture);
}
}
/// <summary>
/// 查找类似 返修原因 的本地化字符串。
/// </summary>

View File

@ -2115,4 +2115,19 @@
<data name="DetectionStandard" xml:space="preserve">
<value>检测标准</value>
</data>
<data name="Acceptance" xml:space="preserve">
<value>制造/验收标准</value>
</data>
<data name="QualityNo" xml:space="preserve">
<value>质量证明文件编号</value>
</data>
<data name="PMIDelegationTrust" xml:space="preserve">
<value>PMI处理委托</value>
</data>
<data name="PMICodeExists" xml:space="preserve">
<value>PMI委托单号已存在</value>
</data>
<data name="PMIError" xml:space="preserve">
<value>PMI委托单保存失败</value>
</data>
</root>

View File

@ -397,6 +397,7 @@
<Content Include="WeldingProcess\DataIn\DataInEdit.aspx" />
<Content Include="WeldingProcess\PMI\PMIDelegation.aspx" />
<Content Include="WeldingProcess\PMI\PMIDelegationEdit.aspx" />
<Content Include="WeldingProcess\PMI\PMISelectList.aspx" />
<Content Include="WeldingProcess\TestPackageManage\AItemEndCheck.aspx" />
<Content Include="WeldingProcess\TestPackageManage\BItemEndCheck.aspx" />
<Content Include="WeldingProcess\TestPackageManage\TestPackageManageAudit.aspx" />
@ -4461,6 +4462,13 @@
<Compile Include="WeldingProcess\PMI\PMIDelegationEdit.aspx.designer.cs">
<DependentUpon>PMIDelegationEdit.aspx</DependentUpon>
</Compile>
<Compile Include="WeldingProcess\PMI\PMISelectList.aspx.cs">
<DependentUpon>PMISelectList.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WeldingProcess\PMI\PMISelectList.aspx.designer.cs">
<DependentUpon>PMISelectList.aspx</DependentUpon>
</Compile>
<Compile Include="WeldingProcess\TestPackageManage\AItemEndCheck.aspx.cs">
<DependentUpon>AItemEndCheck.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -4887,6 +4895,7 @@
<Content Include="App_GlobalResources\Lan.resx">
<Generator>GlobalResourceProxyGenerator</Generator>
<LastGenOutput>Lan.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</Content>
</ItemGroup>
<ItemGroup>

View File

@ -104,9 +104,9 @@
</Items>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="<%$ Resources:Lan,HotProessTrust %>"
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="HotProessTrustItemId"
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="ID"
AllowCellEditing="true" AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2"
DataIDField="HotProessTrustItemId" AllowSorting="true" SortField="PipelineCode,WeldJointCode"
DataIDField="ID" AllowSorting="true" SortField="PipelineCode,WeldJointCode"
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True">
<Toolbars>
@ -139,10 +139,24 @@
DataField="MaterialCode" SortField="MaterialCode" FieldType="String" HeaderTextAlign="Center"
TextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,TrustDate %>" ColumnID="ProessDate"
DataField="ProessDate" SortField="ProessDate" FieldType="Date" Renderer="Date"
<f:RenderField HeaderText="<%$ Resources:Lan,TrustDate %>" ColumnID="CreatedTime"
DataField="CreatedTime" SortField="CreatedTime" FieldType="Date" Renderer="Date"
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
</f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,QualityNo %>" ColumnID="QualityNo" DataField="QualityNo"
FieldType="String" TextAlign="Left" Width="150px">
<Editor>
<f:TextBox ID="tbxEditorQualityNo" Required="true" runat="server">
</f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,Acceptance %>" ColumnID="Acceptance"
DataField="Acceptance" FieldType="String" TextAlign="Left" Width="150px">
<Editor>
<f:TextBox ID="txtEditorAcceptance" Required="true" runat="server">
</f:TextBox>
</Editor>
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />

View File

@ -144,12 +144,10 @@ namespace FineUIPro.Web.WeldingProcess.PMI
if (result != null)
{
this.PMIDelegationId = result.Id;
strSql = @"SELECT * "
+ @" FROM dbo.View_HotProess_TrustItem AS Trust"
+ @" WHERE Trust.ProjectId= @ProjectId AND Trust.HotProessTrustId=@HotProessTrustId ";
strSql = @"SELECT *FROM [View_PMI_DelegationDetails] WHERE ProjectId= @ProjectId AND PMIID=@PMIDelegationId ";
listStr.Add(new SqlParameter("@ProjectId", result != null ? result.ProjectId : this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@HotProessTrustId", this.PMIDelegationId));
listStr.Add(new SqlParameter("@PMIDelegationId", this.PMIDelegationId));
if (!string.IsNullOrEmpty(this.txtIsoNo.Text.Trim()))
{

View File

@ -257,6 +257,24 @@ namespace FineUIPro.Web.WeldingProcess.PMI
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill2;
/// <summary>
/// tbxEditorQualityNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox tbxEditorQualityNo;
/// <summary>
/// txtEditorAcceptance 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEditorAcceptance;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>

View File

@ -1,16 +1,177 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PMIDelegationEdit.aspx.cs" Inherits="FineUIPro.Web.WeldingProcess.PMI.PMIDelegationEdit" %>
<!DOCTYPE html>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<title>编辑热处理委托及数据录入</title>
<base target="_self" />
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="<%$ Resources:Lan,HotProessTrust %>"
TitleToolTip="<%$ Resources:Lan,HotProessTrust %>" AutoScroll="true">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:HiddenField runat="server" ID="hdItemsString">
</f:HiddenField>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSave" Text="<%$ Resources:Lan,Save %>" ToolTip="<%$ Resources:Lan,Save %>"
Icon="SystemSave" ValidateForms="SimpleForm1" runat="server" OnClick="btnSave_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="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtDelegationNo" Label="<%$ Resources:Lan,RequestSheetNumber %>"
runat="server" LabelAlign="Right" Required="true" ShowRedStar="true" FocusOnPageLoad="true"
LabelWidth="180px">
</f:TextBox>
<f:DatePicker ID="txtDelegationDate" runat="server" Label="<%$ Resources:Lan,DelegationDate %>"
LabelAlign="Right" Required="true" ShowRedStar="true" LabelWidth="140px">
</f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpInstallationId" Label="<%$ Resources:Lan,InstallationName %>"
runat="server" ShowRedStar="true" Required="true" EnableEdit="true" LabelAlign="Right"
LabelWidth="180px">
</f:DropDownList>
<f:DropDownList ID="drpUnitId" Label="<%$ Resources:Lan,UnitName %>" runat="server"
ShowRedStar="true" Required="true" EnableEdit="true" LabelAlign="Right" LabelWidth="140px">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtDetectionMethod" Label="<%$ Resources:Lan,DetectionMethod %>" runat="server"
LabelAlign="Right" MaxLength="50" LabelWidth="180px">
</f:TextBox>
<f:TextBox ID="txtDetectionStandard" Label="<%$ Resources:Lan,DetectionStandard %>" runat="server"
LabelAlign="Right" MaxLength="50" LabelWidth="140px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtTabler" Label="<%$ Resources:Lan,Lister %>" runat="server" LabelAlign="Right"
MaxLength="50" LabelWidth="180px">
</f:TextBox>
<f:TextBox ID="txtRemark" Label="<%$ Resources:Lan,Remark %>" runat="server" LabelAlign="Right"
MaxLength="100" LabelWidth="140px">
</f:TextBox>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="<%$ Resources:Lan,PMIDelegationTrust %>"
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="WeldJointId,Id"
EnableColumnLines="true" AllowCellEditing="true" ClicksToEdit="1" DataIDField="Id"
AllowSorting="true" SortField="PipelineCode,WeldJointCode" SortDirection="ASC"
AllowPaging="false" IsDatabasePaging="true" PageSize="10000" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:Button ID="btnDelete" Text="<%$ Resources:Lan,DeleteRows %>" ToolTip="<%$ Resources:Lan,DeleteData %>"
ConfirmText="<%$ Resources:Lan,DeleteReminder %>" ConfirmTarget="Top" Icon="Delete"
runat="server" OnClick="btnMenuDelete_Click">
</f:Button>
<f:Button runat="server" ID="ckSelect" Text="<%$ Resources:Lan,Find %>" Icon="Find"
OnClick="ckSelect_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="<%$ Resources:Lan,SerialNumber %>"
Width="90px" HeaderTextAlign="Center" TextAlign="Center" />
<f:RenderField HeaderText="<%$ Resources:Lan,PipelineCode %>" ColumnID="PipelineCode"
DataField="PipelineCode" SortField="PipelineCode" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,WeldingJointNumber %>" ColumnID="WeldJointCode"
DataField="WeldJointCode" SortField="WeldJointCode" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="160px">
</f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,Specifications %>" ColumnID="Specification"
DataField="Specification" SortField="Specification" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="160px">
</f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,MaterialSpecificationCode %>" ColumnID="MaterialCode"
DataField="MaterialCode" SortField="MaterialCode" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="220px">
</f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,QualityNo %>" ColumnID="QualityNo" DataField="QualityNo"
FieldType="String" TextAlign="Left" Width="150px">
<Editor>
<f:TextBox ID="tbxEditorQualityNo" Required="true" runat="server">
</f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,Acceptance %>" ColumnID="Acceptance"
DataField="Acceptance" FieldType="String" TextAlign="Left" Width="150px">
<Editor>
<f:TextBox ID="txtEditorAcceptance" Required="true" runat="server">
</f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="WeldJointId" ColumnID="WeldJointId" DataField="WeldJointId"
FieldType="String" Hidden="true">
</f:RenderField>
<f:RenderField HeaderText="Id" ColumnID="Id"
DataField="Id" FieldType="String" Hidden="true">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
<f:Listener Event="dataload" Handler="onGridDataLoad" />
</Listeners>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="<%$ Resources:Lan,PopForm %>" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close"
IsModal="true" Width="1200px" Height="560px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
Icon="Delete" ConfirmText="<%$ Resources:Lan,DeleteReminder %>" ConfirmTarget="Top"
runat="server" Text="<%$ Resources:Lan,Delete %>">
</f:MenuButton>
</f:Menu>
</form>
<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
function onGridDataLoad(event) {
this.mergeColumns(['PipelineCode']);
this.mergeColumns(['WeldJointCode']);
}
</script>
</body>
</html>

View File

@ -1,5 +1,9 @@
using System;
using BLL;
using Model;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
@ -7,11 +11,293 @@ using System.Web.UI.WebControls;
namespace FineUIPro.Web.WeldingProcess.PMI
{
public partial class PMIDelegationEdit : System.Web.UI.Page
public partial class PMIDelegationEdit : PageBase
{
#region
/// <summary>
/// PMI委托主键
/// </summary>
public string PMIDelegationId
{
get
{
return (string)ViewState["PMIDelegationId"];
}
set
{
ViewState["PMIDelegationId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.PMIDelegationId = Request.Params["PMIDelegationId"];
BLL.Project_InstallationService.InitInstallationDropDownList(this.drpInstallationId, true, this.CurrUser.LoginProjectId, Resources.Lan.PleaseSelect);//装置
BLL.Base_UnitService.InitUnitDropDownList(this.drpUnitId, true, BLL.Const.UnitType_5, Resources.Lan.PleaseSelect);//单位
this.PageInfoLoad(); ///加载页面
this.txtDetectionMethod.Text = "PMI光谱分析";
this.txtDetectionMethod.Enabled = false;
//this.BindGrid(result); ////初始化页面
this.txtDelegationDate.Text = DateTime.Now.ToString("yyyy-MM-dd");
}
}
#endregion
#region
/// <summary>
/// 加载页面输入提交信息
/// </summary>
private void PageInfoLoad()
{
var trust = Funs.DB.PMI_Delegation.FirstOrDefault(t=>t.Id==this.PMIDelegationId);
if (trust != null)
{
//this.ProjectId = trust.ProjectId;
this.txtDelegationNo.Text = trust.DelegationNo;
if (trust.DelegationDate.HasValue)
{
this.txtDelegationDate.Text = string.Format("{0:yyyy-MM-dd}", trust.DelegationDate);
}
if (!string.IsNullOrEmpty(trust.InstallationId))
{
this.drpInstallationId.SelectedValue = trust.InstallationId;
}
if (!string.IsNullOrEmpty(trust.UnitId))
{
this.drpUnitId.SelectedValue = trust.UnitId;
}
this.txtDetectionMethod.Text = "PMI光谱分析";
this.txtDetectionStandard.Text = trust.DetectionStandard;
if (!string.IsNullOrEmpty(trust.Tabler))
{
this.txtTabler.Text = BLL.Sys_UserService.GetUserNameByUserId(trust.Tabler);
}
this.txtRemark.Text = trust.Remark;
}
else
{
this.txtTabler.Text = this.CurrUser.UserName;
this.SimpleForm1.Reset(); //重置所有字段
}
}
#endregion
#region
/// <summary>
/// 数据绑定
/// </summary>
private void BindGrid(List<Model.View_PMI_DelegationDetails> lists)
{
DataTable tb = this.LINQToDataTable(lists);
Grid1.RecordCount = tb.Rows.Count;
tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#endregion
#region
/// <summary>
/// 查找需要PMI处理的焊口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ckSelect_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.drpUnitId.SelectedValue) && this.drpUnitId.SelectedValue != BLL.Const._Null)
{
string weldJointIds = string.Empty;
for (int i = 0; i < Grid1.Rows.Count; i++)
{
string jotId = Grid1.DataKeys[i][0].ToString();
weldJointIds += jotId + "|";
}
if (weldJointIds != string.Empty)
{
weldJointIds = weldJointIds.Substring(0, weldJointIds.Length - 1);
}
//url查询
string window = String.Format($"PMISelectList.aspx?unitId={this.drpUnitId.SelectedValue}&projectId={this.CurrUser.LoginProjectId}&weldJointIds={weldJointIds}", "编辑 - ");
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(hdItemsString.ClientID) + Window1.GetShowReference(window));
}
else
{
Alert.ShowInTop(Resources.Lan.PleaseSelectCompany, MessageBoxIcon.Warning);
}
}
#endregion
#region Grid
/// <summary>
/// 关闭弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
string weldJointIds = string.Empty;
if (!string.IsNullOrEmpty(hdItemsString.Text))
{
weldJointIds = hdItemsString.Text.Substring(0, hdItemsString.Text.LastIndexOf('|'));
List<Model.View_PMI_DelegationDetails> lists = BLL.PMIDelegation_Service.GetPMI_DelegationAddItem(weldJointIds);
this.BindGrid(lists);
//获取单位
string unitCode = Funs.DB.Base_Unit.FirstOrDefault(t => t.UnitId == drpUnitId.SelectedValue)?.UnitCode;
//获取区域code
var workdAreaIdList = lists.Select(t => t.WorkAreaId).ToList();
var workAreaCode = Funs.DB.Project_WorkArea.AsQueryable().Where(t => workdAreaIdList.Contains(t.WorkAreaId)).Distinct().FirstOrDefault()?.WorkAreaCode;
this.txtDelegationNo.Text = $"PMI-{unitCode}-{workAreaCode}-PI-";
}
}
#endregion
#region PMI委托
/// <summary>
/// 编辑PMI委托
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.PMIDelegationId, Const.BtnSave))
{
var isExists = Funs.DB.PMI_Delegation.Any(t => t.DelegationNo == this.txtDelegationNo.Text.Trim() && t.ProjectId == this.CurrUser.LoginProjectId);
if (isExists)
{
ShowNotify(Resources.Lan.PMICodeExists, MessageBoxIcon.Warning);
return;
}
try
{
var pmiModel = new Model.PMI_Delegation();
pmiModel.Id = SQLHelper.GetNewID(typeof(Model.PMI_Delegation));
pmiModel.DelegationNo = txtDelegationNo.Text.Trim();
pmiModel.DelegationDate = !string.IsNullOrEmpty(txtDelegationDate.Text.Trim()) ? DateTime.Parse(txtDelegationDate.Text.Trim()) : DateTime.Now;
pmiModel.InstallationId = drpInstallationId.SelectedValue;
pmiModel.UnitId = drpUnitId.SelectedValue;
pmiModel.ProjectId = this.CurrUser.LoginProjectId;
pmiModel.Remark = txtRemark.Text.Trim();
pmiModel.DetectionStandard=txtDetectionStandard.Text.Trim();
pmiModel.CreatedTime = DateTime.Now;
pmiModel.Tabler = this.CurrUser.UserId;
this.PMIDelegationId = pmiModel.Id;
Funs.DB.PMI_Delegation.InsertOnSubmit(pmiModel);
//先删除明细表
var deleteEntity= Funs.DB.PMI_DelegationDetails.Where(t => t.PMIId == pmiModel.Id).ToList();
if (deleteEntity.Any())
{
Funs.DB.PMI_DelegationDetails.DeleteAllOnSubmit(deleteEntity);
}
//再插入明细表
this.CollectGridJointInfo();
Funs.DB.SubmitChanges();
}
catch (Exception ex)
{
BLL.ErrLogInfo.WriteLog(ex);
ShowNotify(Resources.Lan.PMIError, MessageBoxIcon.Error);
return;
}
ShowNotify(Resources.Lan.SaveSuccessfully, MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(this.PMIDelegationId)
+ ActiveWindow.GetHidePostBackReference());
}
else
{
ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
return;
}
}
#endregion
#region Grid页面信息,
/// <summary>
/// 收集Grid页面信息,提交明细
/// </summary>
/// <returns></returns>
private void CollectGridJointInfo()
{
var listData = new List<Model.PMI_DelegationDetails>();
JArray mergedData = Grid1.GetMergedData();
foreach (JObject mergedRow in mergedData)
{
JObject values = mergedRow.Value<JObject>("values");
Model.PMI_DelegationDetails newTrustItem = new Model.PMI_DelegationDetails();
newTrustItem.Id = SQLHelper.GetNewID(typeof(PMI_DelegationDetails));
newTrustItem.JointId = values.Value<string>("WeldJointId").ToString();
newTrustItem.Acceptance = values.Value<string>("Acceptance").ToString();
newTrustItem.QualityNo = values.Value<string>("QualityNo").ToString();
newTrustItem.Status = 0;
newTrustItem.CreatedTime = DateTime.Now;
newTrustItem.PMIId = this.PMIDelegationId;
listData.Add(newTrustItem);
}
Funs.DB.PMI_DelegationDetails.InsertAllOnSubmit(listData);
}
#endregion
#region
/// <summary>
/// 右键删除事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.hdItemsString.Text))
{
this.hdItemsString.Text = this.hdItemsString.Text.Substring(0, this.hdItemsString.Text.LastIndexOf('|'));
}
var trust = Funs.DB.PMI_Delegation.FirstOrDefault(t=>t.Id==this.PMIDelegationId);
if (Grid1.SelectedRowIndexArray.Length > 0)
{
List<Model.View_PMI_DelegationDetails> GetHotProessTrustItem = new List<Model.View_PMI_DelegationDetails>();
if (!string.IsNullOrEmpty(this.hdItemsString.Text))
{
GetHotProessTrustItem = BLL.PMIDelegation_Service.GetPMI_DelegationAddItem(this.hdItemsString.Text);
}
else if (string.IsNullOrEmpty(this.hdItemsString.Text) && this.PMIDelegationId != null)
{
GetHotProessTrustItem = BLL.PMIDelegation_Service.GetPMI_DelegationItem(this.CurrUser.LoginProjectId, this.PMIDelegationId);
}
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var item = GetHotProessTrustItem.FirstOrDefault(x => x.WeldJointId == rowID);
if (item != null)
{
if (string.IsNullOrEmpty(this.PMIDelegationId)) //新增记录可直接删除
{
GetHotProessTrustItem.Remove(item);
}
}
}
BindGrid(GetHotProessTrustItem);
ShowNotify(Resources.Lan.DeletedSuccessfully, MessageBoxIcon.Success);
}
}
#endregion
}
}

View File

@ -22,5 +22,230 @@ namespace FineUIPro.Web.WeldingProcess.PMI
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// hdItemsString 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdItemsString;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtDelegationNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtDelegationNo;
/// <summary>
/// txtDelegationDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtDelegationDate;
/// <summary>
/// drpInstallationId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpInstallationId;
/// <summary>
/// drpUnitId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnitId;
/// <summary>
/// txtDetectionMethod 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtDetectionMethod;
/// <summary>
/// txtDetectionStandard 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtDetectionStandard;
/// <summary>
/// txtTabler 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTabler;
/// <summary>
/// txtRemark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRemark;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDelete;
/// <summary>
/// ckSelect 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button ckSelect;
/// <summary>
/// tbxEditorQualityNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox tbxEditorQualityNo;
/// <summary>
/// txtEditorAcceptance 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEditorAcceptance;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDelete;
}
}

View File

@ -0,0 +1,100 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PMISelectList.aspx.cs" Inherits="FineUIPro.Web.WeldingProcess.PMI.PMISelectList" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>查找管线焊口信息</title>
<base target="_self" />
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<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="250px" Title="<%$ Resources:Lan,Pipeline %>" ShowBorder="true"
Layout="VBox" ShowHeader="false" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox ID="txtIsono" runat="server" Label="<%$ Resources:Lan,PipelineCode %>"
EmptyText="<%$ Resources:Lan,EnterQueryConditions %>" AutoPostBack="true" OnTextChanged="Tree_TextChanged"
Width="230px" LabelWidth="110px" LabelAlign="Right">
</f:TextBox>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Tree ID="tvControlItem" ShowHeader="false" Height="450px" Title="管线列表" OnNodeCommand="tvControlItem_NodeCommand"
runat="server" ShowBorder="false" EnableCollapse="true" EnableSingleClickExpand="true"
AutoLeafIdentification="true" EnableTextSelection="true" Expanded="true">
</f:Tree>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="<%$ Resources:Lan,WeldingJointInfo %>"
TitleToolTip="<%$ Resources:Lan,WeldingJointInfo %>" AutoScroll="true">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="<%$ Resources:Lan,WeldingJointInfo %>"
EnableCollapse="true" KeepCurrentSelection="true" runat="server" BoxFlex="1"
DataKeyNames="WeldJointId" EnableColumnLines="true" DataIDField="WeldJointId"
EnableTextSelection="True" AllowSorting="true" SortField="WeldJointCode" SortDirection="ASC"
OnSort="Grid1_Sort" AllowPaging="false"
EnableCheckBoxSelect="true">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:TextBox ID="txtJointNo" runat="server" Label="<%$ Resources:Lan,WeldingJointNumber %>"
EmptyText="<%$ Resources:Lan,EnterQueryConditions %>" AutoPostBack="true" OnTextChanged="Tree2_TextChanged"
Width="300px" LabelWidth="160px" LabelAlign="Right">
</f:TextBox>
<f:Label ID="ww" runat="server" Width="60px">
</f:Label>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnAccept" Icon="Accept" runat="server" Text="<%$ Resources:Lan,Sure %>"
OnClick="btnAccept_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RenderField HeaderText="<%$ Resources:Lan,WeldingJointNumber %>" ColumnID="WeldJointCode"
DataField="WeldJointCode" SortField="WeldJointCode" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="180px">
</f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,Specifications %>" ColumnID="Specification"
DataField="Specification" SortField="Specification" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="180px">
</f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,MaterialSpecificationCode %>" ColumnID="MaterialCode"
DataField="MaterialCode" SortField="MaterialCode" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="300px">
</f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,WeldingDate %>" ColumnID="WeldingDate"
DataField="WeldingDate" SortField="WeldingDate" FieldType="Date" Renderer="Date"
HeaderTextAlign="Center" TextAlign="Left" Width="150px">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
</form>
<script type="text/javascript">
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
// F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
</script>
</body>
</html>

View File

@ -0,0 +1,209 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.WeldingProcess.PMI
{
public partial class PMISelectList : PageBase
{
string UnitId = string.Empty;
string ProjectId = string.Empty;
string PMIId = string.Empty;
string weldJointIds=string.Empty;
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.UnitId = Request.Params["unitId"] ??"";
this.ProjectId = this.CurrUser.LoginProjectId;
this.PMIId = Request.Params["PMIId"]??"";
this.weldJointIds = Request.Params["weldJointIds"] ?? "";
this.InitTreeMenu();//加载树
this.BindGrid();
}
}
#endregion
#region 线
/// <summary>
/// 加载树
/// </summary>
private void InitTreeMenu()
{
this.tvControlItem.Nodes.Clear();
TreeNode rootNode = new TreeNode();
rootNode.Text = Resources.Lan.PipelineCode;
rootNode.NodeID = "0";
rootNode.ToolTip = Resources.Lan.SeachTip;
rootNode.Expanded = true;
this.tvControlItem.Nodes.Add(rootNode);
//排除已经委托过的
var listData= (from a in Funs.DB.PMI_Delegation.AsQueryable() join
b in Funs.DB.PMI_DelegationDetails.AsQueryable() on
a.Id equals b.PMIId
select b.JointId
).Distinct().ToList();
//查询带有PMI处理的管线数据
var iso = from x in Funs.DB.View_Pipeline_WeldJoint
where x.ProjectId == this.ProjectId && x.IsPMI == true && x.UnitId == this.UnitId
select new { x.PipelineCode, x.PipelineId,x.WeldJointId }; //from x in Funs.DB.Pipeline_Pipeline where x.ProjectId == this.ProjectId && x.UnitId == this.UnitId select x;
if (listData.Count > 0)
{
iso = iso.Where(e => !listData.Contains(e.WeldJointId));
}
if (!string.IsNullOrEmpty(this.txtIsono.Text))
{
iso = iso.Where(e => e.PipelineCode.Contains(this.txtIsono.Text.Trim()));
}
var isoList = iso.Select(x => new {x.PipelineId,x.PipelineCode }).OrderBy(x => x.PipelineCode).Distinct().ToList();
if (isoList.Count > 0)
{
foreach (var q in isoList)
{
TreeNode newNode = new TreeNode();
newNode.NodeID = q.PipelineId;
newNode.Text = q.PipelineCode;
newNode.EnableClickEvent = true;
rootNode.Nodes.Add(newNode);
}
}
}
#endregion
#region 线
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Tree_TextChanged(object sender, EventArgs e)
{
this.InitTreeMenu();
}
protected void Tree2_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
#endregion
#region TreeView
/// <summary>
/// 点击TreeView
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
this.BindGrid();
}
#endregion
#region
/// <summary>
/// 数据绑定
/// </summary>
private void BindGrid()
{
string sql = @"SELECT WeldJointId,ProjectId,PipelineId,WeldJointCode,WPQCode,DetectionType,
convert(int,dbo.Fun_GetParseInt(WeldJointCode)) AS ConvertJointNo,
dbo.Fun_GetParseString(WeldJointCode) AS PreJotNo,
PipingClassCode,PipeSegment,JointAttribute,PageNum,
ComponentsCode1,ComponentsCode2,Is_hjName,IsHotProessStr,Material1Code,Material2Code,
WeldTypeCode,Specification,HeartNo1,HeartNo2,Size,Dia,Thickness,GrooveTypeCode,
WeldingMethodCode,WeldSilkId,WeldMatCode,WeldingDate,WeldingDailyCode,DoneDin,
BackingWelderCode,CoverWelderCode,SystemNumber,TestPackageNo,Remark,
MaterialCode,WeldingDate,
(CASE WHEN IsCancel=1 THEN '是' ELSE '否' END) AS IsCancel,isPMI
FROM View_Pipeline_WeldJoint WHERE isPMI=1 ";
List<SqlParameter> paramsList = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.txtJointNo.Text))
{
sql += @" and WeldJointCode=@WeldJointCode";
paramsList.Add(new SqlParameter("@WeldJointCode", txtJointNo.Text.Trim()));
}
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
sql += @" and PipelineId=@PipelineId ";
paramsList.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
}
var dt = SQLHelper.GetDataTableRunText(sql, paramsList.ToArray());
Grid1.DataSource = dt;
Grid1.DataBind();
}
#endregion
#region
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
this.BindGrid();
}
#endregion
#region
/// <summary>
/// 提交按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAccept_Click(object sender, EventArgs e)
{
string itemsString = "";
string[] selectRowId = Grid1.SelectedRowIDArray;
int n = 0;
int j = 0;
int[] selections = new int[selectRowId.Count()];
foreach (GridRow row in Grid1.Rows)
{
if (selectRowId.Contains(row.DataKeys[0]))
{
selections[n] = j;
n++;
}
j++;
}
var select = selections.Distinct();
string jotIds = Request.Params["jotIds"];
if (!string.IsNullOrEmpty(jotIds))
{
string[] jots = jotIds.Split('|');
foreach (string jotId in jots)
{
itemsString += jotId + "|";
}
}
foreach (int i in select)
{
string rowID = Grid1.DataKeys[i][0].ToString();
if (!itemsString.Contains(rowID))
{
itemsString += rowID + "|";
}
}
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(itemsString)
+ ActiveWindow.GetHidePostBackReference());
}
#endregion
}
}

View File

@ -0,0 +1,143 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.WeldingProcess.PMI
{
public partial class PMISelectList
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// txtIsono 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtIsono;
/// <summary>
/// tvControlItem 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvControlItem;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtJointNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtJointNo;
/// <summary>
/// ww 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label ww;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnAccept 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAccept;
}
}

View File

@ -1070,6 +1070,14 @@ namespace Model
}
}
public System.Data.Linq.Table<View_PMI_DelegationDetails> View_PMI_DelegationDetails
{
get
{
return this.GetTable<View_PMI_DelegationDetails>();
}
}
public System.Data.Linq.Table<View_PTP_TestPackageAudit> View_PTP_TestPackageAudit
{
get
@ -37258,6 +37266,8 @@ namespace Model
private string _ProjectId;
private System.Nullable<bool> _IsPMI;
private string _PipelineCode;
private string _PipelineId;
@ -37388,6 +37398,22 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="isPMI", Storage="_IsPMI", DbType="Bit")]
public System.Nullable<bool> IsPMI
{
get
{
return this._IsPMI;
}
set
{
if ((this._IsPMI != value))
{
this._IsPMI = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineCode", DbType="NVarChar(100)")]
public string PipelineCode
{
@ -40633,6 +40659,285 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_PMI_DelegationDetails")]
public partial class View_PMI_DelegationDetails
{
private string _Id;
private string _Acceptance;
private System.Nullable<System.DateTime> _CreatedTime;
private string _WeldJointId;
private int _Status;
private string _QualityNo;
private string _PMIId;
private string _ProjectId;
private string _DelegationNo;
private System.Nullable<System.DateTime> _DelegationDate;
private string _WeldJointCode;
private string _PipelineCode;
private string _Specification;
private string _MaterialCode;
private string _WorkAreaId;
public View_PMI_DelegationDetails()
{
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
public string Id
{
get
{
return this._Id;
}
set
{
if ((this._Id != value))
{
this._Id = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Acceptance", DbType="NVarChar(255)")]
public string Acceptance
{
get
{
return this._Acceptance;
}
set
{
if ((this._Acceptance != value))
{
this._Acceptance = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreatedTime", DbType="DateTime")]
public System.Nullable<System.DateTime> CreatedTime
{
get
{
return this._CreatedTime;
}
set
{
if ((this._CreatedTime != value))
{
this._CreatedTime = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldJointId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
public string WeldJointId
{
get
{
return this._WeldJointId;
}
set
{
if ((this._WeldJointId != value))
{
this._WeldJointId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="status", Storage="_Status", DbType="Int NOT NULL")]
public int Status
{
get
{
return this._Status;
}
set
{
if ((this._Status != value))
{
this._Status = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualityNo", DbType="NVarChar(255)")]
public string QualityNo
{
get
{
return this._QualityNo;
}
set
{
if ((this._QualityNo != value))
{
this._QualityNo = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PMIId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
public string PMIId
{
get
{
return this._PMIId;
}
set
{
if ((this._PMIId != value))
{
this._PMIId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
public string ProjectId
{
get
{
return this._ProjectId;
}
set
{
if ((this._ProjectId != value))
{
this._ProjectId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DelegationNo", DbType="NVarChar(50)")]
public string DelegationNo
{
get
{
return this._DelegationNo;
}
set
{
if ((this._DelegationNo != value))
{
this._DelegationNo = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DelegationDate", DbType="DateTime")]
public System.Nullable<System.DateTime> DelegationDate
{
get
{
return this._DelegationDate;
}
set
{
if ((this._DelegationDate != value))
{
this._DelegationDate = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldJointCode", DbType="NVarChar(50)")]
public string WeldJointCode
{
get
{
return this._WeldJointCode;
}
set
{
if ((this._WeldJointCode != value))
{
this._WeldJointCode = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineCode", DbType="NVarChar(100)")]
public string PipelineCode
{
get
{
return this._PipelineCode;
}
set
{
if ((this._PipelineCode != value))
{
this._PipelineCode = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Specification", DbType="NVarChar(50)")]
public string Specification
{
get
{
return this._Specification;
}
set
{
if ((this._Specification != value))
{
this._Specification = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50)")]
public string MaterialCode
{
get
{
return this._MaterialCode;
}
set
{
if ((this._MaterialCode != value))
{
this._MaterialCode = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(50)")]
public string WorkAreaId
{
get
{
return this._WorkAreaId;
}
set
{
if ((this._WorkAreaId != value))
{
this._WorkAreaId = value;
}
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_PTP_TestPackageAudit")]
public partial class View_PTP_TestPackageAudit
{