20260212 支管连接焊接接头、角焊接头组对焊接检查记录

This commit is contained in:
毕文静 2026-02-12 22:31:54 +08:00
parent 4cd7676169
commit 0f98e28a13
8 changed files with 938 additions and 452 deletions

View File

@ -1339,5 +1339,19 @@ namespace BLL
{ {
return (from x in Funs.DB.HJGL_PW_JointInfo where x.ISO_ID == iso_id select x).Count(); return (from x in Funs.DB.HJGL_PW_JointInfo where x.ISO_ID == iso_id select x).Count();
} }
/// <summary>
/// 根据项目Id获取支管连接焊缝和角焊缝
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public static List<Model.HJGL_PW_JointInfo> GetJointInfoByProjectId(string projectId)
{
return (from x in Funs.DB.HJGL_PW_JointInfo
join y in Funs.DB.HJGL_BS_JointType on x.JOTY_ID equals y.JOTY_ID
where x.ProjectId == projectId
&& (y.JOTY_Name.Contains("支管连接焊缝") || y.JOTY_Name.Contains("角焊缝"))
select x).ToList();
}
} }
} }

View File

@ -32,6 +32,17 @@ namespace BLL
return (from x in Funs.DB.JGZL_TeamWeldingInspectionItem where x.TeamWeldingInspectionId == teamWeldingInspectionId select x).ToList(); return (from x in Funs.DB.JGZL_TeamWeldingInspectionItem where x.TeamWeldingInspectionId == teamWeldingInspectionId select x).ToList();
} }
/// <summary>
/// 根据管线号、焊口号获取支管连接焊接接头、角焊接头组对焊接检查记录
/// </summary>
/// <param name="isoNo"></param>
/// <param name="jotNo"></param>
/// <returns></returns>
public static Model.JGZL_TeamWeldingInspectionItem GetTeamWeldingInspectionItemByIsoNoAndJointNo(string isoNo,string jotNo)
{
return Funs.DB.JGZL_TeamWeldingInspectionItem.FirstOrDefault(e => e.PipelineNo == isoNo && e.WeldingJointNo == jotNo);
}
/// <summary> /// <summary>
/// 添加 /// 添加
/// </summary> /// </summary>

View File

@ -23,6 +23,16 @@ namespace BLL
return Funs.DB.JGZL_TeamWeldingInspection.FirstOrDefault(e => e.TeamWeldingInspectionId == teamWeldingInspectionId); return Funs.DB.JGZL_TeamWeldingInspection.FirstOrDefault(e => e.TeamWeldingInspectionId == teamWeldingInspectionId);
} }
/// <summary>
/// 根据项目Id获取支管连接焊接接头、角焊接头组对焊接检查记录主表
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public static Model.JGZL_TeamWeldingInspection GetTeamWeldingInspectionByProjectId(string projectId)
{
return Funs.DB.JGZL_TeamWeldingInspection.FirstOrDefault(e => e.ProjectId == projectId);
}
/// <summary> /// <summary>
/// 添加 /// 添加
/// </summary> /// </summary>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="01/07/2026 11:35:17" ReportInfo.Modified="02/12/2026 14:44:01" ReportInfo.CreatorVersion="2017.1.16.0"> <Report ScriptLanguage="CSharp" ReportInfo.Created="01/07/2026 11:35:17" ReportInfo.Modified="02/12/2026 22:25:06" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System; <ScriptText>using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
@ -42,7 +42,7 @@ namespace FastReport
} }
</ScriptText> </ScriptText>
<Dictionary> <Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QFAfFMxSj3AeiHAz03GrK9Aw=="> <MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QFx3bd3T6Sb/EHw7Al2HDS3Q==">
<TableDataSource Name="Data" DataType="System.Int32" PropName="Attach_Image" Enabled="true" TableName="Data"> <TableDataSource Name="Data" DataType="System.Int32" PropName="Attach_Image" Enabled="true" TableName="Data">
<Column Name="Num" DataType="System.String" PropName="attach_image_id"/> <Column Name="Num" DataType="System.String" PropName="attach_image_id"/>
<Column Name="CheckDate" DataType="System.String" PropName="image_series"/> <Column Name="CheckDate" DataType="System.String" PropName="image_series"/>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="11/20/2024 14:22:21" ReportInfo.Modified="02/04/2026 14:43:03" ReportInfo.CreatorVersion="2017.1.16.0"> <Report ScriptLanguage="CSharp" ReportInfo.Created="11/20/2024 14:22:21" ReportInfo.Modified="02/12/2026 22:20:45" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System; <ScriptText>using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
@ -42,7 +42,7 @@ namespace FastReport
} }
</ScriptText> </ScriptText>
<Dictionary> <Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QFSNC6k3/Jky1tLKNl3mNErg=="> <MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QFsoKsInwAGXf7JXNSZ89jqA==">
<TableDataSource Name="MainData" DataType="System.Int32" PropName="Attach_Image" Enabled="true" TableName="MainData"> <TableDataSource Name="MainData" DataType="System.Int32" PropName="Attach_Image" Enabled="true" TableName="MainData">
<Column Name="ProjectName" DataType="System.String" PropName="attach_image_id"/> <Column Name="ProjectName" DataType="System.String" PropName="attach_image_id"/>
<Column Name="CheckUnit" DataType="System.String" PropName="image_series"/> <Column Name="CheckUnit" DataType="System.String" PropName="image_series"/>
@ -68,27 +68,27 @@ namespace FastReport
</TableDataSource> </TableDataSource>
</MsSqlDataConnection> </MsSqlDataConnection>
</Dictionary> </Dictionary>
<ReportPage Name="Page1" LeftMargin="25" TopMargin="20" RightMargin="20" BottomMargin="21" FirstPageSource="4" OtherPagesSource="4" Guides="0,623.7,135.25,1.65,47.9,431.45,66.8,57.35,76.25,19.55,525.95,29,25.22,42.23,85.7,552.47,211.5,278.3,527.25,87.35,335.65,411.9,498.25,581.47,623.72,89.78,283.51,354.39,193.73"> <ReportPage Name="Page1" RawPaperSize="9" LeftMargin="22" TopMargin="13.3" RightMargin="17" BottomMargin="16" Guides="0,646.36,140.26,1.24,50.61,431.11,69.51,60.06,78.96,22.26,525.61,31.71,27.93,41.16,44.94,88.41,560.26,200.32,269.83,532.33,89.65,329.89,408.85,500.62,601.42,646.39,95.45,294.85,371.4,199.4">
<PageHeaderBand Name="PageHeader1" Width="623.7" Height="274.9" Guides="0,274.9,113.1,24.8,77.95,9.45,28.35,53.15,35.15,147.35,34.25,181.6,215.85,250.1"> <PageHeaderBand Name="PageHeader1" Width="646.38" Height="284.35" Guides="0,284.35,113.1,24.8,77.95,9.45,28.35,53.15,35.15,156.8,43.7,191.05,34.25,225.3,259.55">
<TableObject Name="Table1" Width="623.7" Height="274.9"> <TableObject Name="Table1" Width="646.36" Height="284.35">
<TableColumn Name="Column1" Width="85.7"/> <TableColumn Name="Column1" Width="88.41"/>
<TableColumn Name="Column2" Width="1.65"/> <TableColumn Name="Column2" Width="1.24"/>
<TableColumn Name="Column3" Width="47.9"/> <TableColumn Name="Column3" Width="50.61"/>
<TableColumn Name="Column4" Width="76.25"/> <TableColumn Name="Column4" Width="60.06"/>
<TableColumn Name="Column5" Width="66.8"/> <TableColumn Name="Column5" Width="69.51"/>
<TableColumn Name="Column6" Width="57.35"/> <TableColumn Name="Column6" Width="60.06"/>
<TableColumn Name="Column7" Width="76.25"/> <TableColumn Name="Column7" Width="78.96"/>
<TableColumn Name="Column8" Width="19.55"/> <TableColumn Name="Column8" Width="22.26"/>
<TableColumn Name="Column9" Width="66.8"/> <TableColumn Name="Column9" Width="69.51"/>
<TableColumn Name="Column10" Width="29"/> <TableColumn Name="Column10" Width="31.71"/>
<TableColumn Name="Column13" Width="25.22"/> <TableColumn Name="Column13" Width="27.93"/>
<TableColumn Name="Column11" Width="29"/> <TableColumn Name="Column11" Width="41.16"/>
<TableColumn Name="Column12" Width="42.23"/> <TableColumn Name="Column12" Width="44.94"/>
<TableRow Name="Row1" Height="24.8"> <TableRow Name="Row1" Height="24.8">
<TableCell Name="Cell1" Border.Lines="All" Text="SH/T 3543—G414" HorzAlign="Center" VertAlign="Center" Font="体, 10.5pt" ColSpan="3" RowSpan="3"/> <TableCell Name="Cell1" Border.Lines="All" Text="SH/T 3543—G414" HorzAlign="Center" VertAlign="Center" Font="体, 10.5pt" ColSpan="3" RowSpan="3"/>
<TableCell Name="Cell2" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/> <TableCell Name="Cell2" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell3" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/> <TableCell Name="Cell3" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell4" Border.Lines="All" Text="管道焊口检测委托单" HorzAlign="Center" VertAlign="Center" Font="华文中宋, 16pt, style=Bold" ColSpan="5" RowSpan="3"/> <TableCell Name="Cell4" Border.Lines="All" Text="管道焊口检测委托单" HorzAlign="Center" VertAlign="Center" Font="思源宋体 CN, 16pt, style=Bold" ColSpan="5" RowSpan="3"/>
<TableCell Name="Cell5" Border.Lines="All" Font="宋体, 10.5pt"/> <TableCell Name="Cell5" Border.Lines="All" Font="宋体, 10.5pt"/>
<TableCell Name="Cell26" Border.Lines="All" Font="宋体, 10.5pt"/> <TableCell Name="Cell26" Border.Lines="All" Font="宋体, 10.5pt"/>
<TableCell Name="Cell27" Border.Lines="All" Font="宋体, 10.5pt"/> <TableCell Name="Cell27" Border.Lines="All" Font="宋体, 10.5pt"/>
@ -131,7 +131,7 @@ namespace FastReport
<TableCell Name="Cell45" Border.Lines="Right, Bottom" Text="管道安装" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/> <TableCell Name="Cell45" Border.Lines="Right, Bottom" Text="管道安装" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/>
<TableCell Name="Cell46" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/> <TableCell Name="Cell46" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableRow> </TableRow>
<TableRow Name="Row4" Height="34.25"> <TableRow Name="Row4" Height="43.7">
<TableCell Name="Cell16" Border.Lines="All" Text="检测单位" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/> <TableCell Name="Cell16" Border.Lines="All" Text="检测单位" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell17" Border.Lines="All" Text="[MainData.CheckUnit]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="3"/> <TableCell Name="Cell17" Border.Lines="All" Text="[MainData.CheckUnit]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="3"/>
<TableCell Name="Cell18" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/> <TableCell Name="Cell18" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
@ -208,21 +208,21 @@ namespace FastReport
</TableRow> </TableRow>
</TableObject> </TableObject>
</PageHeaderBand> </PageHeaderBand>
<DataBand Name="Data1" Top="278.9" Width="623.7" Height="34.25" Guides="0,34.25"> <DataBand Name="Data1" Top="288.35" Width="646.38" Height="34.25" Guides="0,34.25">
<TableObject Name="Table2" Width="623.7" Height="34.25" ManualBuildEvent="Table2_ManualBuild"> <TableObject Name="Table2" Width="646.36" Height="34.25" ManualBuildEvent="Table2_ManualBuild">
<TableColumn Name="Column14" Width="85.7"/> <TableColumn Name="Column14" Width="88.41"/>
<TableColumn Name="Column15" Width="1.65"/> <TableColumn Name="Column15" Width="1.24"/>
<TableColumn Name="Column16" Width="47.9"/> <TableColumn Name="Column16" Width="50.61"/>
<TableColumn Name="Column17" Width="76.25"/> <TableColumn Name="Column17" Width="60.06"/>
<TableColumn Name="Column18" Width="66.8"/> <TableColumn Name="Column18" Width="69.51"/>
<TableColumn Name="Column19" Width="57.35"/> <TableColumn Name="Column19" Width="60.06"/>
<TableColumn Name="Column20" Width="76.25"/> <TableColumn Name="Column20" Width="78.96"/>
<TableColumn Name="Column21" Width="19.55"/> <TableColumn Name="Column21" Width="22.26"/>
<TableColumn Name="Column22" Width="66.8"/> <TableColumn Name="Column22" Width="69.51"/>
<TableColumn Name="Column23" Width="29"/> <TableColumn Name="Column23" Width="31.71"/>
<TableColumn Name="Column24" Width="25.22"/> <TableColumn Name="Column24" Width="27.93"/>
<TableColumn Name="Column25" Width="29"/> <TableColumn Name="Column25" Width="41.16"/>
<TableColumn Name="Column26" Width="42.23"/> <TableColumn Name="Column26" Width="44.94"/>
<TableRow Name="Row9" Height="34.25"> <TableRow Name="Row9" Height="34.25">
<TableCell Name="Cell196" Border.Lines="All" Text="[Data.BatchCode]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/> <TableCell Name="Cell196" Border.Lines="All" Text="[Data.BatchCode]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/>
<TableCell Name="Cell197" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/> <TableCell Name="Cell197" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
@ -240,22 +240,22 @@ namespace FastReport
</TableRow> </TableRow>
</TableObject> </TableObject>
</DataBand> </DataBand>
<ColumnFooterBand Name="ColumnFooter1" Top="355.4" Width="623.7"> <ColumnFooterBand Name="ColumnFooter1" Top="364.85" Width="646.38">
<ChildBand Name="Child1" Top="317.15" Width="623.7" Height="34.25" Guides="0,34.25" FillUnusedSpace="true"> <ChildBand Name="Child1" Top="326.6" Width="646.38" Height="34.25" Guides="0,34.25" FillUnusedSpace="true">
<TableObject Name="Table3" Width="623.7" Height="34.25"> <TableObject Name="Table3" Width="646.36" Height="34.25">
<TableColumn Name="Column27" Width="85.7"/> <TableColumn Name="Column27" Width="88.41"/>
<TableColumn Name="Column28" Width="1.65"/> <TableColumn Name="Column28" Width="1.24"/>
<TableColumn Name="Column29" Width="47.9"/> <TableColumn Name="Column29" Width="50.61"/>
<TableColumn Name="Column30" Width="76.25"/> <TableColumn Name="Column30" Width="60.06"/>
<TableColumn Name="Column31" Width="66.8"/> <TableColumn Name="Column31" Width="69.51"/>
<TableColumn Name="Column32" Width="57.35"/> <TableColumn Name="Column32" Width="60.06"/>
<TableColumn Name="Column33" Width="76.25"/> <TableColumn Name="Column33" Width="78.96"/>
<TableColumn Name="Column34" Width="19.55"/> <TableColumn Name="Column34" Width="22.26"/>
<TableColumn Name="Column35" Width="66.8"/> <TableColumn Name="Column35" Width="69.51"/>
<TableColumn Name="Column36" Width="29"/> <TableColumn Name="Column36" Width="31.71"/>
<TableColumn Name="Column37" Width="25.22"/> <TableColumn Name="Column37" Width="27.93"/>
<TableColumn Name="Column38" Width="29"/> <TableColumn Name="Column38" Width="41.16"/>
<TableColumn Name="Column39" Width="42.23"/> <TableColumn Name="Column39" Width="44.94"/>
<TableRow Name="Row10" Height="34.25"> <TableRow Name="Row10" Height="34.25">
<TableCell Name="Cell209" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="2"/> <TableCell Name="Cell209" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="2"/>
<TableCell Name="Cell210" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/> <TableCell Name="Cell210" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
@ -274,21 +274,21 @@ namespace FastReport
</TableObject> </TableObject>
</ChildBand> </ChildBand>
</ColumnFooterBand> </ColumnFooterBand>
<PageFooterBand Name="PageFooter1" Top="359.4" Width="623.7" Height="75.61" Guides="0,75.61,42.53,33.08"> <PageFooterBand Name="PageFooter1" Top="368.85" Width="646.38" Height="75.61" Guides="0,75.61,42.53,33.08">
<TableObject Name="Table4" Width="623.72" Height="75.61" Border.Lines="Left, Bottom"> <TableObject Name="Table4" Width="646.39" Height="75.61" Border.Lines="Left, Bottom">
<TableColumn Name="Column40" Width="89.78"/> <TableColumn Name="Column40" Width="95.45"/>
<TableColumn Name="Column41" Width="193.73"/> <TableColumn Name="Column41" Width="199.4"/>
<TableColumn Name="Column42" Width="70.88"/> <TableColumn Name="Column42" Width="76.55"/>
<TableColumn Name="Column43" Width="269.33"/> <TableColumn Name="Column43" Width="274.99"/>
<TableRow Name="Row11" Height="42.53"> <TableRow Name="Row11" Height="42.53">
<TableCell Name="Cell222" Border.Lines="Left, Top, Bottom" Text="委托单位:" VertAlign="Center" Font="宋体, 10.5pt" RowSpan="2"/> <TableCell Name="Cell222" Border.Lines="Left" Text="委托单位:" VertAlign="Center" Font="宋体, 10.5pt" RowSpan="2"/>
<TableCell Name="Cell223" Border.Lines="Right, Top, Bottom" Text="浙江鼎盛石化工程有限公司" VertAlign="Center" Font="楷体, 10.5pt" RowSpan="2"/> <TableCell Name="Cell223" Border.Lines="Right" Text="浙江鼎盛石化工程有限公司" VertAlign="Center" Font="楷体, 10.5pt" RowSpan="2"/>
<TableCell Name="Cell224" Border.Lines="Left, Top" Text="委托人:" VertAlign="Center" Font="宋体, 10.5pt"/> <TableCell Name="Cell224" Border.Lines="Left" Text="委托人:" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell225" Border.Lines="Right, Top" Text="[MainData.TrustManName]" VertAlign="Center" Font="楷体, 10.5pt"/> <TableCell Name="Cell225" Border.Lines="Right" Text="[MainData.TrustManName]" VertAlign="Center" Font="楷体, 10.5pt"/>
</TableRow> </TableRow>
<TableRow Name="Row12" Height="33.08"> <TableRow Name="Row12" Height="33.08">
<TableCell Name="Cell227" Border.Lines="All"/> <TableCell Name="Cell227" Border.Lines="Left, Right"/>
<TableCell Name="Cell228" Border.Lines="All"/> <TableCell Name="Cell228" Border.Lines="Left, Right"/>
<TableCell Name="Cell229" Border.Lines="Left, Bottom" Text="日期:" VertAlign="Center" Font="宋体, 10.5pt"/> <TableCell Name="Cell229" Border.Lines="Left, Bottom" Text="日期:" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell230" Border.Lines="Right, Bottom" VertAlign="Center" Font="楷体, 10.5pt"/> <TableCell Name="Cell230" Border.Lines="Right, Bottom" VertAlign="Center" Font="楷体, 10.5pt"/>
</TableRow> </TableRow>

View File

@ -37,9 +37,11 @@
<Toolbars> <Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right"> <f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items> <Items>
<f:TextBox ID="txtIsoNoS" runat="server" Label="管道编号" EmptyText="输入查询条件" LabelAlign="Right" AutoPostBack="true" OnTextChanged="txtIsoNoS_TextChanged"></f:TextBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server"> <f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill> </f:ToolbarFill>
<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button> <f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>
<f:Button ID="btnSave" Text="保存" ToolTip="保存" Icon="SystemSave" runat="server" OnClick="btnSave_Click"></f:Button>
<f:Button ID="btnPrint" Text="支管连接焊接接头、角焊接头组对焊接检查记录打印" Icon="Printer" runat="server" OnClick="btnPrint_Click"> <f:Button ID="btnPrint" Text="支管连接焊接接头、角焊接头组对焊接检查记录打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
</f:Button> </f:Button>
</Items> </Items>
@ -49,15 +51,15 @@
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="支管连接焊接接头、角焊接头组对焊接检查记录" EnableCollapse="true" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="支管连接焊接接头、角焊接头组对焊接检查记录" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="TeamWeldingInspectionItemId" AllowCellEditing="true" runat="server" BoxFlex="1" DataKeyNames="TeamWeldingInspectionItemId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="TeamWeldingInspectionItemId" AllowSorting="true" EnableColumnLines="true" ClicksToEdit="1" DataIDField="TeamWeldingInspectionItemId" AllowSorting="true"
SortField="CheckDate,ISO_IsoNo,JOT_JointNo" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" SortField="CheckDate,PipelineNo,WeldingJointNo" SortDirection="ASC" OnPreDataBound="Grid1_PreDataBound"
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True" AutoScroll="true">
EnableTextSelection="True" AutoScroll="true" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
<Toolbars> <Toolbars>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right"> <f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right">
<Items> <Items>
<f:DropDownList ID="drpUsingUnitTeam" runat="server" Label="使用单位/班组" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="drpUsingUnitTeam_SelectedIndexChanged"></f:DropDownList> <f:TextBox ID="txtUsingUnitTeam" runat="server" Label="使用单位/班组" LabelAlign="Right"></f:TextBox>
<f:DropDownList ID="drpInstallationArea" runat="server" Label="装置名称/施工区域" LabelAlign="Right" LabelWidth="140px" AutoPostBack="true" OnSelectedIndexChanged="drpUsingUnitTeam_SelectedIndexChanged"></f:DropDownList> <f:TextBox ID="txtInstallationArea" runat="server" Label="装置名称施工区域" LabelAlign="Right" LabelWidth="130px"></f:TextBox>
<f:DatePicker ID="txtCheckDate" runat="server" Label="检查时间" LabelAlign="Right" Width="220px" AutoPostBack="true" OnTextChanged="drpUsingUnitTeam_SelectedIndexChanged"></f:DatePicker> <f:TextBox ID="txtProjectName" runat="server" Label="项目名称" LabelAlign="Right"></f:TextBox>
<f:TextBox ID="txtProjectCode" runat="server" Label="施工号" LabelAlign="Right"></f:TextBox>
<f:ToolbarFill ID="ToolbarFill2" runat="server"> <f:ToolbarFill ID="ToolbarFill2" runat="server">
</f:ToolbarFill> </f:ToolbarFill>
</Items> </Items>
@ -66,26 +68,125 @@
<Columns> <Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" <f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
TextAlign="Center" /> TextAlign="Center" />
<f:RenderField HeaderText="使用单位/班组" ColumnID="UsingUnitTeam" DataField="UsingUnitTeam" SortField="UsingUnitTeam"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="150px" ExpandUnusedSpace="true">
</f:RenderField>
<f:RenderField HeaderText="装置名称/施工区域" ColumnID="InstallationArea" DataField="InstallationArea" SortField="InstallationArea"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="150px" ExpandUnusedSpace="true">
</f:RenderField>
<f:RenderField HeaderText="管道编号" ColumnID="ISO_IsoNo" DataField="ISO_IsoNo" SortField="ISO_IsoNo"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="150px" ExpandUnusedSpace="true">
</f:RenderField>
<f:RenderField HeaderText="焊口编号" ColumnID="JOT_JointNo" DataField="JOT_JointNo" SortField="JOT_JointNo"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="150px" ExpandUnusedSpace="true">
</f:RenderField>
<f:RenderField HeaderText="检查时间" ColumnID="CheckDate" DataField="CheckDate" SortField="CheckDate" <f:RenderField HeaderText="检查时间" ColumnID="CheckDate" DataField="CheckDate" SortField="CheckDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" TextAlign="Left" Width="180px" ExpandUnusedSpace="true"> FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
<Editor>
<f:DatePicker ID="txtCheckDate" runat="server"></f:DatePicker>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="材质" ColumnID="Material" DataField="Material" SortField="Material"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<Editor>
<f:TextBox ID="txtMaterial" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="管道编号" ColumnID="PipelineNo" DataField="PipelineNo" SortField="PipelineNo"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="150px">
<Editor>
<f:TextBox ID="txtPipelineNo" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="焊口编号" ColumnID="WeldingJointNo" DataField="WeldingJointNo" SortField="WeldingJointNo"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
<Editor>
<f:TextBox ID="txtWeldingJointNo" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="安装形式" ColumnID="InstallationMethod" DataField="InstallationMethod" SortField="InstallationMethod"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
<Editor>
<f:DropDownList ID="drpInstallationMethod" runat="server">
<f:ListItem Value="安放式" Text="安放式"/>
<f:ListItem Value="插入式" Text="插入式" />
</f:DropDownList>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="所用焊丝牌号" ColumnID="WeldingWire" DataField="WeldingWire" SortField="WeldingWire"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
<Editor>
<f:TextBox ID="txtWeldingWire" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="所用焊条牌号" ColumnID="WeldingRod" DataField="WeldingRod" SortField="WeldingRod"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
<Editor>
<f:TextBox ID="txtWeldingRod" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="组队间隙mm" ColumnID="TeamGap" DataField="TeamGap" SortField="TeamGap"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
<Editor>
<f:TextBox ID="txtTeamGap" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:GroupField HeaderText="组队确认" HeaderTextAlign="Center" TextAlign="Center">
<Columns>
<f:RenderField HeaderText="管工" ColumnID="TeamPlumber" DataField="TeamPlumber" SortField="TeamPlumber"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
<Editor>
<f:TextBox ID="txtTeamPlumber" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="焊工" ColumnID="TeamWelder" DataField="TeamWelder" SortField="TeamWelder"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
<Editor>
<f:TextBox ID="txtTeamWelder" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="质检员" ColumnID="TeamInspector" DataField="TeamInspector" SortField="TeamInspector"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
<Editor>
<f:TextBox ID="txtTeamInspector" runat="server"></f:TextBox>
</Editor>
</f:RenderField> </f:RenderField>
</Columns> </Columns>
<Listeners> </f:GroupField>
<f:GroupField HeaderText="GTAW" HeaderTextAlign="Center" TextAlign="Center">
<Columns>
<f:RenderField HeaderText="焊工" ColumnID="GTAWWelder" DataField="GTAWWelder" SortField="GTAWWelder"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
<Editor>
<f:TextBox ID="txtGTAWWelder" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="质检员" ColumnID="GTAWInspector" DataField="GTAWInspector" SortField="GTAWInspector"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
<Editor>
<f:TextBox ID="txtGTAWInspector" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField HeaderText="SMAW" HeaderTextAlign="Center" TextAlign="Center">
<Columns>
<f:RenderField HeaderText="焊工" ColumnID="SMAWWelder" DataField="SMAWWelder" SortField="SMAWWelder"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
<Editor>
<f:TextBox ID="txtSMAWWelder" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField HeaderText="焊缝VT" HeaderTextAlign="Center" TextAlign="Center">
<Columns>
<f:RenderField HeaderText="质检员" ColumnID="VTInspector" DataField="VTInspector" SortField="VTInspector"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
<Editor>
<f:TextBox ID="txtVTInspector" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
</Columns>
</f:GroupField>
<f:LinkButtonField ColumnID="Delete3" Width="60px" EnablePostBack="false" Icon="Delete"
HeaderTextAlign="Center" HeaderText="删除" />
<f:RenderField HeaderText="主键" ColumnID="TeamWeldingInspectionItemId" DataField="TeamWeldingInspectionItemId" SortField="TeamWeldingInspectionItemId"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="140px" Hidden="true">
</f:RenderField>
</Columns>
<%--<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" /> <f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners> </Listeners>--%>
<PageItems> <%--<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> <f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator> </f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> <f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
@ -97,36 +198,36 @@
<f:ListItem Text="20" Value="20" /> <f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" /> <f:ListItem Text="25" Value="25" />
</f:DropDownList> </f:DropDownList>
</PageItems> </PageItems>--%>
</f:Grid> </f:Grid>
</Items> </Items>
</f:Panel> </f:Panel>
</Items> </Items>
</f:Panel> </f:Panel>
<f:Window ID="Window1" Title="支管连接焊接接头、角焊接头组对焊接检查记录" Hidden="true" EnableIFrame="true" EnableMaximize="true" <%--<f:Window ID="Window1" Title="支管连接焊接接头、角焊接头组对焊接检查记录" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true" Target="top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Width="1100px" Height="620px"> Width="1100px" Height="620px">
</f:Window> </f:Window>--%>
<f:Window ID="WindowPrint" Title="打印支管连接焊接接头、角焊接头组对焊接检查记录" Hidden="true" EnableIFrame="true" EnableMaximize="false" <f:Window ID="WindowPrint" Title="打印支管连接焊接接头、角焊接头组对焊接检查记录" Hidden="true" EnableIFrame="true" EnableMaximize="false"
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1024px" Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1024px"
Height="600px"> Height="600px">
</f:Window> </f:Window>
<f:Menu ID="Menu1" runat="server"> <%--<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true" <f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Icon="TableEdit"> runat="server" Text="编辑" Icon="TableEdit">
</f:MenuButton> </f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true" <f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="Delete"> ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="Delete">
</f:MenuButton> </f:MenuButton>
</f:Menu> </f:Menu>--%>
</form> </form>
<script type="text/javascript"> <%--<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>'; var menuID = '<%= Menu1.ClientID %>';
// 返回false来阻止浏览器右键菜单 // 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) { function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY); F(menuID).show(); //showAt(event.pageX, event.pageY);
return false; return false;
} }
</script> </script>--%>
</body> </body>
</html> </html>

View File

@ -9,11 +9,65 @@ using System.Web.UI;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using System.IO; using System.IO;
using System.Text; using System.Text;
using Model;
using Newtonsoft.Json.Linq;
namespace FineUIPro.Web.JGZL namespace FineUIPro.Web.JGZL
{ {
public partial class TeamWeldingInspection : PageBase public partial class TeamWeldingInspection : PageBase
{ {
#region
/// <summary>
/// 主键
/// </summary>
private string TeamWeldingInspectionItemId
{
get
{
return (string)ViewState["TeamWeldingInspectionItemId"];
}
set
{
ViewState["TeamWeldingInspectionItemId"] = value;
}
}
/// <summary>
/// 项目Id
/// </summary>
private string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 外键—TeamWeldingInspectionId
/// </summary>
public string TeamWeldingInspectionId
{
get
{
return (string)ViewState["TeamWeldingInspectionId"];
}
set
{
ViewState["TeamWeldingInspectionId"] = value;
}
}
/// <summary>
/// 定义集合
/// </summary>
private static List<Model.JGZL_TeamWeldingInspectionItem> itemLists = new List<JGZL_TeamWeldingInspectionItem>();
#endregion
#region #region
/// <summary> /// <summary>
/// 加载页面 /// 加载页面
@ -24,7 +78,7 @@ namespace FineUIPro.Web.JGZL
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); //this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.drpProjectId.DataTextField = "ProjectCode"; this.drpProjectId.DataTextField = "ProjectCode";
this.drpProjectId.DataValueField = "ProjectId"; this.drpProjectId.DataValueField = "ProjectId";
@ -35,26 +89,134 @@ namespace FineUIPro.Web.JGZL
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
this.InitTreeMenu();//加载树 this.InitTreeMenu();//加载树
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue; this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
this.ProjectId = this.tvControlItem.SelectedNodeID;
var project = BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId);
this.drpUsingUnitTeam.DataTextField = "UsingUnitTeam"; if (project != null)
this.drpUsingUnitTeam.DataValueField = "UsingUnitTeam"; {
this.drpUsingUnitTeam.DataSource = (from x in Funs.DB.JGZL_TeamWeldingInspection this.txtProjectName.Text = project.ProjectName;
where x.ProjectId == this.drpProjectId.SelectedValue this.txtProjectCode.Text = project.ProjectCode;
select x.UsingUnitTeam).Distinct().ToList();
this.drpUsingUnitTeam.DataBind();
Funs.FineUIPleaseSelect(this.drpUsingUnitTeam);
this.drpInstallationArea.DataTextField = "InstallationArea";
this.drpInstallationArea.DataValueField = "InstallationArea";
this.drpInstallationArea.DataSource = (from x in Funs.DB.JGZL_TeamWeldingInspection
where x.ProjectId == this.drpProjectId.SelectedValue
select x.InstallationArea).Distinct().ToList();
this.drpInstallationArea.DataBind();
Funs.FineUIPleaseSelect(this.drpInstallationArea);
this.BindGrid();
} }
var teamWeldingInspection = BLL.TeamWeldingInspectionService.GetTeamWeldingInspectionByProjectId(this.ProjectId);
if (teamWeldingInspection != null)
{
this.TeamWeldingInspectionId = teamWeldingInspection.TeamWeldingInspectionId;
txtUsingUnitTeam.Text = teamWeldingInspection.UsingUnitTeam;
txtInstallationArea.Text = teamWeldingInspection.InstallationArea;
}
DataInfo();
//this.BindGrid();
}
}
private void EmptyText()
{
this.TeamWeldingInspectionId = string.Empty;
this.txtUsingUnitTeam.Text = string.Empty;
this.txtInstallationArea.Text = string.Empty;
this.txtProjectCode.Text = string.Empty;
this.txtProjectName.Text = string.Empty;
//itemLists.Clear();
//this.Grid1.DataSource = itemLists;
//this.Grid1.DataBind();
}
private void DataInfo()
{
EmptyText();
itemLists.Clear();
if (!string.IsNullOrEmpty(this.ProjectId))
{
var teamWeldingInspection = BLL.TeamWeldingInspectionService.GetTeamWeldingInspectionByProjectId(this.ProjectId);
if (teamWeldingInspection != null)
{
this.TeamWeldingInspectionId = teamWeldingInspection.TeamWeldingInspectionId;
this.txtUsingUnitTeam.Text = teamWeldingInspection.UsingUnitTeam;
this.txtInstallationArea.Text = teamWeldingInspection.InstallationArea;
var pro = BLL.Base_ProjectService.GetProjectByProjectId(teamWeldingInspection.ProjectId);
if (pro != null)
{
this.txtProjectCode.Text = pro.ProjectCode;
this.txtProjectName.Text = pro.ProjectName;
}
itemLists = BLL.TeamWeldingInspectionItemService.GetTeamWeldingInspectionItemList(this.TeamWeldingInspectionId);
}
else
{
var pro = BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId);
if (pro != null)
{
this.txtProjectCode.Text = pro.ProjectCode;
this.txtProjectName.Text = pro.ProjectName;
}
}
var jointInfo = BLL.HJGL_PW_JointInfoService.GetJointInfoByProjectId(this.ProjectId);
foreach (var item in jointInfo)
{
string ISO_IsoNo = string.Empty;
if (!string.IsNullOrEmpty(item.ISO_ID))
{
var iso = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(item.ISO_ID);
if (iso != null)
{
ISO_IsoNo = iso.ISO_IsoNo;//管道编号
}
}
var teamWeldingInspectionItem = BLL.TeamWeldingInspectionItemService.GetTeamWeldingInspectionItemByIsoNoAndJointNo(ISO_IsoNo, item.JOT_JointNo);
if (teamWeldingInspectionItem != null)
{
//itemLists.Add(teamWeldingInspectionItem);
}
else
{
Model.JGZL_TeamWeldingInspectionItem newItem = new JGZL_TeamWeldingInspectionItem();
newItem.TeamWeldingInspectionItemId = SQLHelper.GetNewID(typeof(Model.JGZL_TeamWeldingInspectionItem));
if (!string.IsNullOrEmpty(item.DReportID))
{
var dreort = BLL.HJGL_WeldReportService.GetWeldReportByDReportID(item.DReportID);
if (dreort != null)
{
newItem.CheckDate = dreort.JOT_WeldDate;//检查日期
}
}
if (!string.IsNullOrEmpty(item.STE_ID))
{
var ste = BLL.HJGL_MaterialService.GetSteelBySteID(item.STE_ID);
if (ste != null)
{
newItem.Material = ste.STE_Code;//材质
}
}
newItem.PipelineNo = ISO_IsoNo; //管道编号
newItem.WeldingJointNo = item.JOT_JointNo; //焊口编号
if (!string.IsNullOrEmpty(item.JOT_WeldSilk))
{
var silk = BLL.HJGL_ConsumablesService.getConsumablesByConsumablesId(item.JOT_WeldSilk);
if (silk != null)
{
newItem.WeldingWire = silk.WMT_MatCode;//所用焊丝牌号
}
}
if (!string.IsNullOrEmpty(item.JOT_WeldMat))
{
var weldMat = BLL.HJGL_ConsumablesService.getConsumablesByConsumablesId(item.JOT_WeldMat);
if (weldMat != null)
{
newItem.WeldingRod = weldMat.WMT_MatCode;//所用焊条牌号
}
}
itemLists.Add(newItem);
}
}
if (!string.IsNullOrEmpty(this.txtIsoNoS.Text))
{
itemLists = itemLists.Where(e => e.PipelineNo.Contains(this.txtIsoNoS.Text)).ToList(); ;
}
}
this.Grid1.DataSource = itemLists;
this.Grid1.DataBind();
} }
#endregion #endregion
@ -101,26 +263,9 @@ namespace FineUIPro.Web.JGZL
{ {
if (this.tvControlItem.SelectedNodeID != "0") if (this.tvControlItem.SelectedNodeID != "0")
{ {
this.drpUsingUnitTeam.Items.Clear(); //this.BindGrid();
this.drpUsingUnitTeam.DataTextField = "UsingUnitTeam"; this.ProjectId = this.tvControlItem.SelectedNodeID;
this.drpUsingUnitTeam.DataValueField = "UsingUnitTeam"; DataInfo();
this.drpUsingUnitTeam.DataSource = (from x in Funs.DB.JGZL_TeamWeldingInspection
where x.ProjectId == this.tvControlItem.SelectedNodeID
select x.UsingUnitTeam).Distinct().ToList();
this.drpUsingUnitTeam.DataBind();
Funs.FineUIPleaseSelect(this.drpUsingUnitTeam);
this.drpUsingUnitTeam.SelectedIndex = 0;
this.drpInstallationArea.Items.Clear();
this.drpInstallationArea.DataTextField = "InstallationArea";
this.drpInstallationArea.DataValueField = "InstallationArea";
this.drpInstallationArea.DataSource= (from x in Funs.DB.JGZL_TeamWeldingInspection
where x.ProjectId == this.tvControlItem.SelectedNodeID
select x.InstallationArea).Distinct().ToList();
this.drpInstallationArea.DataBind();
Funs.FineUIPleaseSelect(this.drpInstallationArea);
this.BindGrid();
} }
} }
#endregion #endregion
@ -129,58 +274,26 @@ namespace FineUIPro.Web.JGZL
/// <summary> /// <summary>
/// 数据绑定 /// 数据绑定
/// </summary> /// </summary>
private void BindGrid() //private void BindGrid()
{
//string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1");
string strSql = @"select i.TeamWeldingInspectionItemId,
i.TeamWeldingInspectionId,
i.CheckDate,
t.UsingUnitTeam,
t.InstallationArea,
i.PipelineNo,
i.WeldingJointNo,
iso.ISO_IsoNo,
joint.JOT_JointNo,
t.ProjectId
from JGZL_TeamWeldingInspectionItem i
left join JGZL_TeamWeldingInspection t on t.TeamWeldingInspectionId = i.TeamWeldingInspectionId
left join HJGL_PW_IsoInfo iso on iso.ISO_ID = i.PipelineNo
left join HJGL_PW_JointInfo joint on joint.JOT_ID= i.WeldingJointNo where 1=1";
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
strSql += " AND t.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
}
//else
//{ //{
// strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 "; //string strSql = @"select *
// listStr.Add(new SqlParameter("@ProjectId", projectIds)); // from JGZL_TeamWeldingInspectionItem i
// left join JGZL_TeamWeldingInspection t on t.TeamWeldingInspectionId = i.TeamWeldingInspectionId where 1=1";
//List<SqlParameter> listStr = new List<SqlParameter>();
//if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
//{
// strSql += " AND t.ProjectId = @ProjectId";
// listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
//} //}
if (this.drpUsingUnitTeam.SelectedValue!=BLL.Const._Null&&!string.IsNullOrEmpty(this.drpUsingUnitTeam.SelectedValue)) //SqlParameter[] parameter = listStr.ToArray();
{ //DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
strSql += " AND t.UsingUnitTeam = @UsingUnitTeam";
listStr.Add(new SqlParameter("@UsingUnitTeam", this.drpUsingUnitTeam.SelectedValue));
}
if (this.drpInstallationArea.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpInstallationArea.SelectedValue))
{
strSql += " AND t.InstallationArea = @InstallationArea";
listStr.Add(new SqlParameter("@InstallationArea", this.drpInstallationArea.SelectedValue));
}
if (!string.IsNullOrEmpty(this.txtCheckDate.Text))
{
strSql += " AND i.CheckDate = @checkDate";
listStr.Add(new SqlParameter("@checkDate", Funs.GetNewDateTime(this.txtCheckDate.Text)));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据 // 2.获取当前分页数据
Grid1.RecordCount = tb.Rows.Count; //Grid1.RecordCount = tb.Rows.Count;
//tb = GetFilteredTable(Grid1.FilteredData, tb); //tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb); //var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table; //Grid1.DataSource = table;
Grid1.DataBind(); //Grid1.DataBind();
} //}
#endregion #endregion
#region #region
@ -190,10 +303,10 @@ namespace FineUIPro.Web.JGZL
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) //protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{ //{
BindGrid(); // BindGrid();
} //}
#endregion #endregion
#region #region
@ -202,10 +315,10 @@ namespace FineUIPro.Web.JGZL
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e) //protected void Grid1_Sort(object sender, GridSortEventArgs e)
{ //{
BindGrid(); // BindGrid();
} //}
#endregion #endregion
#region #region
@ -214,11 +327,11 @@ namespace FineUIPro.Web.JGZL
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) //protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{ //{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); // Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid(); // BindGrid();
} //}
#endregion #endregion
#endregion #endregion
@ -230,8 +343,11 @@ namespace FineUIPro.Web.JGZL
///<param name="e"></param> ///<param name="e"></param>
protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e)
{ {
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
this.ProjectId = this.tvControlItem.SelectedNodeID;
this.InitTreeMenu(); this.InitTreeMenu();
this.BindGrid(); //this.BindGrid();
DataInfo();
} }
/// <summary> /// <summary>
@ -239,10 +355,10 @@ namespace FineUIPro.Web.JGZL
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e) //protected void TextBox_TextChanged(object sender, EventArgs e)
{ //{
this.BindGrid(); // this.BindGrid();
} //}
#endregion #endregion
#region #region
@ -254,19 +370,8 @@ namespace FineUIPro.Web.JGZL
protected void btnPrint_Click(object sender, EventArgs e) protected void btnPrint_Click(object sender, EventArgs e)
{ {
string projectId = this.tvControlItem.SelectedNodeID; string projectId = this.tvControlItem.SelectedNodeID;
if (projectId != null) if (projectId != null)
{ {
if (string.IsNullOrEmpty(this.drpUsingUnitTeam.SelectedText) || this.drpUsingUnitTeam.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择使用单位/班组!", MessageBoxIcon.Warning);
return;
}
if (string.IsNullOrEmpty(this.drpInstallationArea.SelectedText) || this.drpInstallationArea.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择装置名称/施工区域!", MessageBoxIcon.Warning);
return;
}
string initTemplatePath = ""; string initTemplatePath = "";
string rootPath = Server.MapPath("~/"); string rootPath = Server.MapPath("~/");
BLL.Common.FastReportService.ResetData(); BLL.Common.FastReportService.ResetData();
@ -278,8 +383,6 @@ namespace FineUIPro.Web.JGZL
t.InstallationArea, t.InstallationArea,
i.PipelineNo, i.PipelineNo,
i.WeldingJointNo, i.WeldingJointNo,
iso.ISO_IsoNo,
joint.JOT_JointNo,
t.ProjectId, t.ProjectId,
i.Material, i.Material,
(case when i.InstallationMethod='' then '√' else '' end) as InstallationMethod, (case when i.InstallationMethod='' then '√' else '' end) as InstallationMethod,
@ -296,21 +399,19 @@ namespace FineUIPro.Web.JGZL
i.VTInspector i.VTInspector
from JGZL_TeamWeldingInspectionItem i from JGZL_TeamWeldingInspectionItem i
left join JGZL_TeamWeldingInspection t on t.TeamWeldingInspectionId = i.TeamWeldingInspectionId left join JGZL_TeamWeldingInspection t on t.TeamWeldingInspectionId = i.TeamWeldingInspectionId
left join HJGL_PW_IsoInfo iso on iso.ISO_ID = i.PipelineNo where t.ProjectId=@ProjectId ";
left join HJGL_PW_JointInfo joint on joint.JOT_ID= i.WeldingJointNo where t.ProjectId=@ProjectId and t.UsingUnitTeam=@usingUnitTeam and t.InstallationArea=@installationArea ";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", projectId)); listStr.Add(new SqlParameter("@ProjectId", projectId));
listStr.Add(new SqlParameter("@usingUnitTeam", this.drpUsingUnitTeam.SelectedValue)); //if (!string.IsNullOrEmpty(this.txtCheckDate.Text))
listStr.Add(new SqlParameter("@installationArea", this.drpInstallationArea.SelectedValue)); //{
if (!string.IsNullOrEmpty(this.txtCheckDate.Text)) // strSql += " and i.CheckDate=@checkDate";
{ // listStr.Add(new SqlParameter("@checkDate", Funs.GetNewDateTime(this.txtCheckDate.Text.Trim())));
strSql += " and i.CheckDate=@checkDate"; //}
listStr.Add(new SqlParameter("@checkDate", Funs.GetNewDateTime(this.txtCheckDate.Text.Trim())));
}
SqlParameter[] parameter = listStr.ToArray(); SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
if (tb.Rows.Count == itemLists.Count)
{
DataTable dt = new DataTable(); DataTable dt = new DataTable();
dt.TableName = "Data"; dt.TableName = "Data";
dt.Columns.Add("Num"); dt.Columns.Add("Num");
@ -332,7 +433,7 @@ namespace FineUIPro.Web.JGZL
dt.Columns.Add("VTInspector"); dt.Columns.Add("VTInspector");
DataView dv = tb.DefaultView;//获取表视图 DataView dv = tb.DefaultView;//获取表视图
dv.Sort = "CheckDate ASC";//按照ID倒序排序 dv.Sort = "PipelineNo,WeldingJointNo ASC";//按照ID倒序排序
tb = dv.ToTable();//转为表 tb = dv.ToTable();//转为表
DataRow[] rows = tb.DefaultView.ToTable().Select(); DataRow[] rows = tb.DefaultView.ToTable().Select();
int i = 0; int i = 0;
@ -342,8 +443,8 @@ namespace FineUIPro.Web.JGZL
newRow["Num"] = (i + 1).ToString(); newRow["Num"] = (i + 1).ToString();
string CheckDate = string.Format("{0:yyyy-MM-dd}", row["CheckDate"]); string CheckDate = string.Format("{0:yyyy-MM-dd}", row["CheckDate"]);
newRow["CheckDate"] = CheckDate; newRow["CheckDate"] = CheckDate;
newRow["ISO_IsoNo"] = row["ISO_IsoNo"].ToString(); newRow["ISO_IsoNo"] = row["PipelineNo"].ToString();
newRow["JOT_JointNo"] = row["JOT_JointNo"].ToString(); newRow["JOT_JointNo"] = row["WeldingJointNo"].ToString();
newRow["Material"] = row["Material"].ToString(); newRow["Material"] = row["Material"].ToString();
newRow["InstallationMethod"] = row["InstallationMethod"].ToString(); newRow["InstallationMethod"] = row["InstallationMethod"].ToString();
newRow["InstallationMethod2"] = row["InstallationMethod2"].ToString(); newRow["InstallationMethod2"] = row["InstallationMethod2"].ToString();
@ -365,8 +466,8 @@ namespace FineUIPro.Web.JGZL
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>(); Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName); keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
keyValuePairs.Add("ProjectCode", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectCode); keyValuePairs.Add("ProjectCode", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectCode);
keyValuePairs.Add("UsingUnitTeam", this.drpUsingUnitTeam.SelectedText); keyValuePairs.Add("UsingUnitTeam", this.txtUsingUnitTeam.Text);
keyValuePairs.Add("InstallationArea", this.drpInstallationArea.SelectedText); keyValuePairs.Add("InstallationArea", this.txtInstallationArea.Text);
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
initTemplatePath = "File\\Fastreport\\JGZL\\支管连接焊接接头、角焊接头组对焊接检查记录.frx"; initTemplatePath = "File\\Fastreport\\JGZL\\支管连接焊接接头、角焊接头组对焊接检查记录.frx";
@ -376,6 +477,12 @@ namespace FineUIPro.Web.JGZL
} }
} }
else else
{
Alert.ShowInTop("请先保存数据!", MessageBoxIcon.Warning);
return;
}
}
else
{ {
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return; return;
@ -393,7 +500,44 @@ namespace FineUIPro.Web.JGZL
{ {
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{ {
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TeamWeldingInspectionEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - "))); JArray teamGroupData = Grid1.GetMergedData();
List<JObject> list = new List<JObject>();
foreach (JObject teamGroupRow in teamGroupData)
{
JObject values = teamGroupRow.Value<JObject>("values");
list.Add(values);
}
JObject defaultObj = new JObject
{
{ "TeamWeldingInspectionItemId", Guid.NewGuid() },
{ "TeamWeldingInspectionId", this.TeamWeldingInspectionId },
{ "CheckDate", "" },
{ "Material", "" },
{ "PipelineNo", "" },
{ "WeldingJointNo", "" },
{ "InstallationMethod", "" },
{ "WeldingWire", "" },
{ "WeldingRod", "" },
{ "TeamGap", "" },
{ "TeamPlumber", "" },
{ "TeamWelder", "" },
{ "TeamInspector", "" },
{ "GTAWWelder", "" },
{ "GTAWInspector", "" },
{ "SMAWWelder", "" },
{ "VTInspector", "" },
{
"Delete3",
String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>",
GetDeleteScriptGrid1(), IconHelper.GetResolvedIconUrl(Icon.Delete))
}
};
list.Add(defaultObj);
Grid1.DataSource = list;
Grid1.DataBind();
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TeamWeldingInspectionEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - ")));
} }
else else
{ {
@ -402,136 +546,153 @@ namespace FineUIPro.Web.JGZL
} }
} }
protected void Grid1_PreDataBound(object sender, EventArgs e)
{
// 设置LinkButtonField的点击客户端事件
LinkButtonField deleteField = Grid1.FindColumn("Delete3") as LinkButtonField;
deleteField.OnClientClick = GetDeleteScriptGrid1();
}
/// <summary>
/// 删除提示
/// </summary>
/// <returns></returns>
private string GetDeleteScriptGrid1()
{
return Confirm.GetShowReference("删除选中行?", String.Empty, MessageBoxIcon.Question,
Grid1.GetDeleteSelectedRowsReference(), String.Empty);
}
/// <summary> /// <summary>
/// 双击编辑 /// 双击编辑
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) //protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{ //{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_TeamWeldingInspectionMenuId, BLL.Const.BtnModify)) // if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_TeamWeldingInspectionMenuId, BLL.Const.BtnModify))
{ // {
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{ // {
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) // if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
{ // {
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TeamWeldingInspectionEdit.aspx?teamWeldingInspectionItemId={0}", this.Grid1.SelectedRowID, "编辑 - "))); // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TeamWeldingInspectionEdit.aspx?teamWeldingInspectionItemId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
} // }
else // else
{ // {
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return; // return;
} // }
} // }
else // else
{ // {
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning); // Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return; // return;
} // }
} // }
else // else
{ // {
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); // ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
} // }
} //}
/// <summary> /// <summary>
/// 右键编辑 /// 右键编辑
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e) //protected void btnMenuEdit_Click(object sender, EventArgs e)
{ //{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_TeamWeldingInspectionMenuId, BLL.Const.BtnModify)) // if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_TeamWeldingInspectionMenuId, BLL.Const.BtnModify))
{ // {
if (Grid1.SelectedRowIndexArray.Length == 0) // if (Grid1.SelectedRowIndexArray.Length == 0)
{ // {
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return; // return;
} // }
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TeamWeldingInspectionEdit.aspx?teamWeldingInspectionItemId={0}", Grid1.SelectedRowID, "维护 - "))); // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TeamWeldingInspectionEdit.aspx?teamWeldingInspectionItemId={0}", Grid1.SelectedRowID, "维护 - ")));
} // }
else // else
{ // {
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); // Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
} // }
} //}
/// <summary> /// <summary>
/// 右键删除 /// 右键删除
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e) //protected void btnMenuDelete_Click(object sender, EventArgs e)
{ //{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_TeamWeldingInspectionMenuId, Const.BtnDelete)) // if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_TeamWeldingInspectionMenuId, Const.BtnDelete))
{ // {
if (Grid1.SelectedRowIndexArray.Length == 0) // if (Grid1.SelectedRowIndexArray.Length == 0)
{ // {
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return; // return;
} // }
bool isShow = true; // bool isShow = true;
if (Grid1.SelectedRowIndexArray.Length > 1) // if (Grid1.SelectedRowIndexArray.Length > 1)
{ // {
isShow = false; // isShow = false;
} // }
bool isDelete = false; // bool isDelete = false;
foreach (int rowIndex in Grid1.SelectedRowIndexArray) // foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{ // {
string rowID = Grid1.DataKeys[rowIndex][0].ToString(); // string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var item = BLL.TeamWeldingInspectionItemService.GetTeamWeldingInspectionItemById(rowID); // var item = BLL.TeamWeldingInspectionItemService.GetTeamWeldingInspectionItemById(rowID);
if (item != null) // if (item != null)
{ // {
if (judgementDelete(rowID, isShow)) // if (judgementDelete(rowID, isShow))
{ // {
string id = item.TeamWeldingInspectionId; // string id = item.TeamWeldingInspectionId;
isDelete = true; // isDelete = true;
BLL.TeamWeldingInspectionItemService.DeleteTeamWeldingInspectionItemById(rowID); // BLL.TeamWeldingInspectionItemService.DeleteTeamWeldingInspectionItemById(rowID);
var lists = BLL.TeamWeldingInspectionItemService.GetTeamWeldingInspectionItemList(id); // var lists = BLL.TeamWeldingInspectionItemService.GetTeamWeldingInspectionItemList(id);
if (lists.Count == 0) // if (lists.Count == 0)
{ // {
BLL.TeamWeldingInspectionService.DeleteTeamWeldingInspectionById(id); // BLL.TeamWeldingInspectionService.DeleteTeamWeldingInspectionById(id);
} // }
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除支管连接焊接接头、角焊接头组对焊接检查记录"); // BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除支管连接焊接接头、角焊接头组对焊接检查记录");
} // }
} // }
} // }
if (isDelete) // if (isDelete)
{ // {
ShowNotify("删除成功!", MessageBoxIcon.Success); // ShowNotify("删除成功!", MessageBoxIcon.Success);
} // }
this.BindGrid(); // this.BindGrid();
} // }
else // else
{ // {
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); // Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
} // }
} //}
#region #region
/// <summary> /// <summary>
/// 判断是否可以删除 /// 判断是否可以删除
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
private bool judgementDelete(string id, bool isShow) //private bool judgementDelete(string id, bool isShow)
{ //{
string content = string.Empty; // string content = string.Empty;
if (string.IsNullOrEmpty(content)) // if (string.IsNullOrEmpty(content))
{ // {
return true; // return true;
} // }
else // else
{ // {
if (isShow) // if (isShow)
{ // {
Alert.ShowInTop(content, MessageBoxIcon.Error); // Alert.ShowInTop(content, MessageBoxIcon.Error);
} // }
return false; // return false;
} // }
} //}
#endregion #endregion
#endregion #endregion
@ -541,29 +702,29 @@ namespace FineUIPro.Web.JGZL
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e) //protected void Window1_Close(object sender, WindowCloseEventArgs e)
{ //{
this.InitTreeMenu();//加载树 // this.InitTreeMenu();//加载树
this.BindGrid(); // this.BindGrid();
this.drpUsingUnitTeam.Items.Clear(); // this.drpUsingUnitTeam.Items.Clear();
this.drpUsingUnitTeam.DataTextField = "UsingUnitTeam"; // this.drpUsingUnitTeam.DataTextField = "UsingUnitTeam";
this.drpUsingUnitTeam.DataValueField = "UsingUnitTeam"; // this.drpUsingUnitTeam.DataValueField = "UsingUnitTeam";
this.drpUsingUnitTeam.DataSource = (from x in Funs.DB.JGZL_TeamWeldingInspection // this.drpUsingUnitTeam.DataSource = (from x in Funs.DB.JGZL_TeamWeldingInspection
where x.ProjectId == this.tvControlItem.SelectedNodeID // where x.ProjectId == this.tvControlItem.SelectedNodeID
select x.UsingUnitTeam).Distinct().ToList(); // select x.UsingUnitTeam).Distinct().ToList();
this.drpUsingUnitTeam.DataBind(); // this.drpUsingUnitTeam.DataBind();
Funs.FineUIPleaseSelect(this.drpUsingUnitTeam); // Funs.FineUIPleaseSelect(this.drpUsingUnitTeam);
this.drpUsingUnitTeam.SelectedIndex = 0; // this.drpUsingUnitTeam.SelectedIndex = 0;
this.drpInstallationArea.Items.Clear(); // this.drpInstallationArea.Items.Clear();
this.drpInstallationArea.DataTextField = "InstallationArea"; // this.drpInstallationArea.DataTextField = "InstallationArea";
this.drpInstallationArea.DataValueField = "InstallationArea"; // this.drpInstallationArea.DataValueField = "InstallationArea";
this.drpInstallationArea.DataSource = (from x in Funs.DB.JGZL_TeamWeldingInspection // this.drpInstallationArea.DataSource = (from x in Funs.DB.JGZL_TeamWeldingInspection
where x.ProjectId == this.tvControlItem.SelectedNodeID // where x.ProjectId == this.tvControlItem.SelectedNodeID
select x.InstallationArea).Distinct().ToList(); // select x.InstallationArea).Distinct().ToList();
this.drpInstallationArea.DataBind(); // this.drpInstallationArea.DataBind();
Funs.FineUIPleaseSelect(this.drpInstallationArea); // Funs.FineUIPleaseSelect(this.drpInstallationArea);
} //}
#endregion #endregion
#region #region
@ -572,10 +733,100 @@ namespace FineUIPro.Web.JGZL
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
protected void drpUsingUnitTeam_SelectedIndexChanged(object sender, EventArgs e) //protected void drpUsingUnitTeam_SelectedIndexChanged(object sender, EventArgs e)
//{
// BindGrid();
//}
#endregion
#region
/// <summary>
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{ {
BindGrid(); if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId,
Const.JGZL_TeamWeldingInspectionMenuId, Const.BtnSave))
{
Model.JGZL_TeamWeldingInspection newTeamWeldingInspection = new JGZL_TeamWeldingInspection();
newTeamWeldingInspection.UsingUnitTeam = this.txtUsingUnitTeam.Text;
newTeamWeldingInspection.InstallationArea = this.txtInstallationArea.Text;
if (!string.IsNullOrEmpty(this.TeamWeldingInspectionId))
{
newTeamWeldingInspection.TeamWeldingInspectionId = this.TeamWeldingInspectionId;
BLL.TeamWeldingInspectionService.UpdateTeamWeldingInspection(newTeamWeldingInspection);
}
else
{
newTeamWeldingInspection.ProjectId = this.tvControlItem.SelectedNodeID;
newTeamWeldingInspection.CompileMan = this.CurrUser.UserId;
newTeamWeldingInspection.CompileDate = DateTime.Now;
newTeamWeldingInspection.TeamWeldingInspectionId = SQLHelper.GetNewID(typeof(Model.JGZL_TeamWeldingInspection));
this.TeamWeldingInspectionId = newTeamWeldingInspection.TeamWeldingInspectionId;
BLL.TeamWeldingInspectionService.AddTeamWeldingInspection(newTeamWeldingInspection);
}
saveItem();
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
void saveItem()
{
BLL.TeamWeldingInspectionItemService.DeleteTeamWeldingInspectionItem(this.TeamWeldingInspectionId);
itemLists.Clear();
JArray teamGroupData = Grid1.GetMergedData();
foreach (JObject teamGroupRow in teamGroupData)
{
JObject values = teamGroupRow.Value<JObject>("values");
int rowIndex = teamGroupRow.Value<int>("index");
Model.JGZL_TeamWeldingInspectionItem newDetail = new Model.JGZL_TeamWeldingInspectionItem
{
TeamWeldingInspectionItemId = values.Value<string>("TeamWeldingInspectionItemId"),
TeamWeldingInspectionId = this.TeamWeldingInspectionId,
CheckDate =Funs.GetNewDateTime( values.Value<string>("CheckDate")),
Material = values.Value<string>("Material"),
PipelineNo = values.Value<string>("PipelineNo"),
WeldingJointNo = values.Value<string>("WeldingJointNo"),
InstallationMethod = values.Value<string>("InstallationMethod"),
WeldingWire = values.Value<string>("WeldingWire"),
WeldingRod = values.Value<string>("WeldingRod"),
TeamGap = values.Value<string>("TeamGap"),
TeamPlumber = values.Value<string>("TeamPlumber"),
TeamWelder = values.Value<string>("TeamWelder"),
TeamInspector = values.Value<string>("TeamInspector"),
GTAWWelder = values.Value<string>("GTAWWelder"),
GTAWInspector = values.Value<string>("GTAWInspector"),
SMAWWelder = values.Value<string>("SMAWWelder"),
VTInspector = values.Value<string>("VTInspector"),
};
itemLists.Add(newDetail);
}
try
{
if (itemLists.Count > 0)
{
Funs.DB.JGZL_TeamWeldingInspectionItem.InsertAllOnSubmit(itemLists);
}
Funs.DB.SubmitChanges();
}
catch (Exception)
{
return;
}
} }
#endregion #endregion
protected void txtIsoNoS_TextChanged(object sender, EventArgs e)
{
DataInfo();
}
} }
} }

View File

@ -95,6 +95,15 @@ namespace FineUIPro.Web.JGZL
/// </remarks> /// </remarks>
protected global::FineUIPro.Toolbar Toolbar2; protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// txtIsoNoS 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtIsoNoS;
/// <summary> /// <summary>
/// ToolbarFill1 控件。 /// ToolbarFill1 控件。
/// </summary> /// </summary>
@ -113,6 +122,15 @@ namespace FineUIPro.Web.JGZL
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnAdd; protected global::FineUIPro.Button btnAdd;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary> /// <summary>
/// btnPrint 控件。 /// btnPrint 控件。
/// </summary> /// </summary>
@ -141,31 +159,40 @@ namespace FineUIPro.Web.JGZL
protected global::FineUIPro.Toolbar Toolbar3; protected global::FineUIPro.Toolbar Toolbar3;
/// <summary> /// <summary>
/// drpUsingUnitTeam 控件。 /// txtUsingUnitTeam 控件。
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// 自动生成的字段。 /// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpUsingUnitTeam; protected global::FineUIPro.TextBox txtUsingUnitTeam;
/// <summary> /// <summary>
/// drpInstallationArea 控件。 /// txtInstallationArea 控件。
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// 自动生成的字段。 /// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpInstallationArea; protected global::FineUIPro.TextBox txtInstallationArea;
/// <summary> /// <summary>
/// txtCheckDate 控件。 /// txtProjectName 控件。
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// 自动生成的字段。 /// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DatePicker txtCheckDate; protected global::FineUIPro.TextBox txtProjectName;
/// <summary>
/// txtProjectCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtProjectCode;
/// <summary> /// <summary>
/// ToolbarFill2 控件。 /// ToolbarFill2 控件。
@ -177,40 +204,139 @@ namespace FineUIPro.Web.JGZL
protected global::FineUIPro.ToolbarFill ToolbarFill2; protected global::FineUIPro.ToolbarFill ToolbarFill2;
/// <summary> /// <summary>
/// ToolbarSeparator1 控件。 /// txtCheckDate 控件。
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// 自动生成的字段。 /// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; protected global::FineUIPro.DatePicker txtCheckDate;
/// <summary> /// <summary>
/// ToolbarText1 控件。 /// txtMaterial 控件。
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// 自动生成的字段。 /// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1; protected global::FineUIPro.TextBox txtMaterial;
/// <summary> /// <summary>
/// ddlPageSize 控件。 /// txtPipelineNo 控件。
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// 自动生成的字段。 /// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize; protected global::FineUIPro.TextBox txtPipelineNo;
/// <summary> /// <summary>
/// Window1 控件。 /// txtWeldingJointNo 控件。
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// 自动生成的字段。 /// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Window Window1; protected global::FineUIPro.TextBox txtWeldingJointNo;
/// <summary>
/// drpInstallationMethod 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpInstallationMethod;
/// <summary>
/// txtWeldingWire 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtWeldingWire;
/// <summary>
/// txtWeldingRod 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtWeldingRod;
/// <summary>
/// txtTeamGap 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTeamGap;
/// <summary>
/// txtTeamPlumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTeamPlumber;
/// <summary>
/// txtTeamWelder 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTeamWelder;
/// <summary>
/// txtTeamInspector 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTeamInspector;
/// <summary>
/// txtGTAWWelder 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtGTAWWelder;
/// <summary>
/// txtGTAWInspector 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtGTAWInspector;
/// <summary>
/// txtSMAWWelder 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSMAWWelder;
/// <summary>
/// txtVTInspector 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtVTInspector;
/// <summary> /// <summary>
/// WindowPrint 控件。 /// WindowPrint 控件。
@ -220,32 +346,5 @@ namespace FineUIPro.Web.JGZL
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Window WindowPrint; protected global::FineUIPro.Window WindowPrint;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDelete;
} }
} }