20260313 钢管检查验收记录

This commit is contained in:
毕文静 2026-03-13 13:17:09 +08:00
parent 518e3e7148
commit 5e156bd0a1
10 changed files with 1381 additions and 679 deletions

View File

@ -94,5 +94,16 @@ namespace BLL
db.SubmitChanges();
}
}
public static void DeleteListsByProjectId(string projectId)
{
SGGLDB db = Funs.DB;
var q = (from x in db.JGZL_PipeFittingInspectionRecord where x.ProjectId == projectId select x).ToList();
if (q.Count > 0)
{
db.JGZL_PipeFittingInspectionRecord.DeleteAllOnSubmit(q);
db.SubmitChanges();
}
}
}
}

View File

@ -17,6 +17,12 @@ namespace BLL
e.RecordId == recordId);
}
public static Model.JGZL_SteelPipeCheckRecord GetSteelPipeReportByProjectId(string projectId)
{
return Funs.DB.JGZL_SteelPipeCheckRecord.FirstOrDefault(e =>
e.ProjectId == projectId);
}
/// <summary>
/// 添加钢管检查验收记录
/// </summary>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="01/27/2026 14:57:52" ReportInfo.Modified="02/24/2026 14:26:53" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="01/27/2026 14:57:52" ReportInfo.Modified="03/13/2026 13:09:15" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
@ -42,7 +42,7 @@ namespace FastReport
}
</ScriptText>
<Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QFgk51HFbtKmHAHknppoo29w==">
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QFnLKDaocXR5epOSosKSnTcQ==">
<TableDataSource Name="Data" DataType="System.Int32" PropName="Attach_Image" Enabled="true" TableName="Data">
<Column Name="Name" DataType="System.String" PropName="attach_image_id"/>
<Column Name="ContractNo" DataType="System.String" PropName="image_series"/>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="01/28/2026 09:20:32" ReportInfo.Modified="02/24/2026 14:21:54" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="01/28/2026 09:20:32" ReportInfo.Modified="03/13/2026 11:25:11" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
@ -72,7 +72,7 @@ namespace FastReport
}
</ScriptText>
<Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QFAd1wZgMe+eLzu4DLDBXKWw==">
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QF0vrjqw4AHv0MUA8eCRim2w==">
<TableDataSource Name="Data" DataType="System.Int32" PropName="Attach_Image" Enabled="true" TableName="Data">
<Column Name="Name" DataType="System.String" PropName="attach_image_id"/>
<Column Name="Material" DataType="System.String" PropName="image_series"/>
@ -95,8 +95,17 @@ namespace FastReport
</TableDataSource>
</MsSqlDataConnection>
<MsSqlDataConnection Name="Connection1" ConnectionString="rijcmlqM3/HbiZANEYP3Y6oNtE7mqsCE0NW5tkXiWL0RJsdm/BnXhHrIFd8DaTyqYvkCZwzaaQipsiBeb+lBhzIDpDvfvxDsovr3/ckbYEBSCcpPFiH7Npcn4kPkDoxtl7XrCt1j63ma3mCLcLPN9o74aBqqd1WZsaEs7MLRtSWt4L/IDLoaEYKi0euV49rY12ECZLm">
<TableDataSource Name="ImageData" DataType="System.Int32" PropName="Attach_Image" Enabled="true" TableName="ImageData">
<Column Name="ImageUrl" DataType="System.String" PropName="attach_image_id"/>
<TableDataSource Name="MData" DataType="System.Int32" PropName="Attach_Image" Enabled="true" TableName="MData">
<Column Name="ProjectName" DataType="System.String" PropName="attach_image_id"/>
<Column Name="ContractCode" DataType="System.String" PropName="Column"/>
<Column Name="ArrivalDate" DataType="System.String" PropName="Column"/>
<Column Name="ExecutionStandard" DataType="System.String" PropName="Column"/>
<Column Name="Crack" DataType="System.String" PropName="Column"/>
<Column Name="SlagInclusion" DataType="System.String" PropName="Column"/>
<Column Name="ShrinkageHole" DataType="System.String" PropName="Column"/>
<Column Name="HeavyLeather" DataType="System.String" PropName="Column"/>
<Column Name="Other" DataType="System.String" PropName="Column"/>
<Column Name="ImageUrl" DataType="System.String" PropName="Column"/>
</TableDataSource>
</MsSqlDataConnection>
<Parameter Name="ProjectName" DataType="System.String"/>
@ -110,7 +119,7 @@ namespace FastReport
<Parameter Name="Other" DataType="System.String"/>
<Parameter Name="Remark" DataType="System.String"/>
</Dictionary>
<ReportPage Name="Page1" RawPaperSize="9" LeftMargin="22" TopMargin="13.3" RightMargin="17" BottomMargin="16.5" Guides="0,646.4,161.6,80.8,404,388.4,482.9,99.7,43,118.6,61.9,527.8,223.5,304.3,484.8,646.38,82.89,203.58,314.82,369.36,461.7,554.04,565.6,242.4,323.2,200.88,312.66,367.74,460.62,553.5,170.1,444.15,111.78,55.08,92.88,323.19">
<ReportPage Name="Page1" RawPaperSize="9" LeftMargin="22" TopMargin="13.3" RightMargin="17" BottomMargin="16.5" Guides="0,646.4,161.6,80.8,404,397.85,492.35,99.7,43,118.6,61.9,527.8,223.5,304.3,484.8,646.38,82.89,203.58,314.82,369.36,461.7,554.04,565.6,242.4,323.2,200.88,312.66,367.74,460.62,553.5,170.1,444.15,111.78,55.08,92.88,323.19">
<PageHeaderBand Name="PageHeader1" Width="646.38" Height="132.3" Guides="0,132.3,97.65,63,9.45,28.35,34.65">
<TableObject Name="Table1" Width="646.4" Height="132.3">
<TableColumn Name="Column1" Width="80.8"/>
@ -125,11 +134,11 @@ namespace FastReport
<TableCell Name="Cell1" Border.Lines="All" Text="SH/T 3543—G411" HorzAlign="Center" VertAlign="Center" Font="黑体, 10.5pt" ColSpan="2" RowSpan="2"/>
<TableCell Name="Cell2" Border.Lines="All"/>
<TableCell Name="Cell3" Border.Lines="All" Text="钢管检查验收记录" HorzAlign="Center" VertAlign="Center" Font="思源宋体 CN, 16pt, style=Bold" ColSpan="3" RowSpan="2">
<TextObject Name="Text1" Left="226.8" Top="9.45" Width="94.5" Height="18.9" Text="工程名称:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text1" Left="236.25" Top="9.45" Width="94.5" Height="18.9" Text="工程名称:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableCell>
<TableCell Name="Cell4" Border.Lines="All"/>
<TableCell Name="Cell5" Border.Lines="All"/>
<TableCell Name="Cell26" Border.Lines="Left, Right, Top" Text=" [ProjectName]" Padding="2, 9, 2, 1" Font="楷体, 10.5pt" ColSpan="3"/>
<TableCell Name="Cell26" Border.Lines="Left, Right, Top" Text=" [MData.ProjectName]" Padding="2, 9, 2, 1" Font="楷体, 10.5pt" ColSpan="3"/>
<TableCell Name="Cell27" Border.Lines="All" Font="宋体, 10.5pt"/>
<TableCell Name="Cell28" Border.Lines="All" Font="宋体, 10.5pt"/>
</TableRow>
@ -145,12 +154,12 @@ namespace FastReport
</TableRow>
<TableRow Name="Row3" Height="34.65">
<TableCell Name="Cell32" Border.Lines="All" Text="合同编号" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell33" Border.Lines="All" Text="[ContractCode]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/>
<TableCell Name="Cell33" Border.Lines="All" Text="[MData.ContractCode]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/>
<TableCell Name="Cell34" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell35" Border.Lines="All" Text="到货日期" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell36" Border.Lines="All" Text="[ArrivalDate]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell36" Border.Lines="All" Text="[MData.ArrivalDate]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell37" Border.Lines="All" Text="执行标准" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell38" Border.Lines="All" Text="[ExecutionStandard]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/>
<TableCell Name="Cell38" Border.Lines="All" Text="[MData.ExecutionStandard]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/>
<TableCell Name="Cell39" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableRow>
</TableObject>
@ -242,15 +251,15 @@ namespace FastReport
</TableRow>
<TableRow Name="Row7" Height="30.7">
<TableCell Name="Cell74" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell75" Border.Lines="All" Text="[Crack]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell76" Border.Lines="All" Text="[SlagInclusion]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell77" Border.Lines="All" Text="[HeavyLeather]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell78" Border.Lines="All" Text="[HeavyLeather]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell95" Border.Lines="All" Text="[Other]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell75" Border.Lines="All" Text="[MData.Crack]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell76" Border.Lines="All" Text="[MData.SlagInclusion]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell77" Border.Lines="All" Text="[MData.ShrinkageHole]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell78" Border.Lines="All" Text="[MData.HeavyLeather]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell95" Border.Lines="All" Text="[MData.Other]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
</TableRow>
<TableRow Name="Row8" Height="106.3">
<TableCell Name="Cell79" ColSpan="6">
<PictureObject Name="Picture1" Left="170.1" Top="18.9" Width="274.05" Height="85.05" DataColumn="ImageData.ImageUrl"/>
<PictureObject Name="Picture1" Left="170.1" Top="18.9" Width="274.05" Height="85.05" DataColumn="MData.ImageUrl"/>
</TableCell>
<TableCell Name="Cell80"/>
<TableCell Name="Cell81"/>
@ -278,7 +287,7 @@ namespace FastReport
<TableCell Name="Cell162" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableRow>
<TableRow Name="Row17" Height="37.79">
<TableCell Name="Cell166" Border.Lines="Bottom" Text="[Remark]" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/>
<TableCell Name="Cell166" Border.Lines="Bottom" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/>
<TableCell Name="Cell167" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableRow>
<TableRow Name="Row18" Height="28.34">

View File

@ -40,6 +40,7 @@
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<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>
</Items>
@ -51,67 +52,108 @@
EnableColumnLines="true" ClicksToEdit="1" DataIDField="RecordId" AllowSorting="true"
SortField="ContractNo" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="True" AutoScroll="true" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
EnableTextSelection="True" AutoScroll="true" OnPreDataBound="Grid1_PreDataBound">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
TextAlign="Center" />
<f:RenderField HeaderText="合同编号" ColumnID="ContractNo" DataField="ContractNo" SortField="ContractNo"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="160px">
</f:RenderField>
<f:RenderField HeaderText="名称" ColumnID="Name" DataField="Name" SortField="Name"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="180px">
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<Editor>
<f:TextBox ID="txtName" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="合同编号" ColumnID="ContractNo" DataField="ContractNo" SortField="ContractNo"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<Editor>
<f:TextBox ID="txtContractNo" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:GroupField EnableLock="true" HeaderText="到货数量" TextAlign="Center">
<Columns>
<f:RenderField HeaderText="单位" ColumnID="ArrivalUnit" DataField="ArrivalUnit" SortField="ArrivalUnit"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="80px">
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="60px">
<Editor>
<f:TextBox ID="txtArrivalUnit" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="数量" ColumnID="ArrivalNum" DataField="ArrivalNum" SortField="ArrivalNum"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="80px">
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="60px">
<Editor>
<f:NumberBox ID="txtArrivalNum" runat="server" NoDecimal="true" NoNegative="true"></f:NumberBox>
</Editor>
</f:RenderField>
</Columns>
</f:GroupField>
<f:RenderField HeaderText="材质证编号" ColumnID="MaterialCertificateNumber" DataField="MaterialCertificateNumber" SortField="MaterialCertificateNumber"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="160px">
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<Editor>
<f:TextBox ID="txtMaterialCertificateNumber" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="材质" ColumnID="Material" DataField="Material" SortField="Material"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="160px">
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
<Editor>
<f:TextBox ID="txtMaterial" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="规格" ColumnID="Specifications" DataField="Specifications" SortField="Specifications"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="200px">
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<Editor>
<f:TextBox ID="txtSpecifications" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="检验数量" ColumnID="InspectionNum" DataField="InspectionNum" SortField="InspectionNum"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="120px">
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
<Editor>
<f:NumberBox ID="txtInspectionNum" runat="server" NoDecimal="true" NoNegative="true"></f:NumberBox>
</Editor>
</f:RenderField>
<f:GroupField EnableLock="true" HeaderText="几何尺寸" TextAlign="Center">
<Columns>
<f:RenderField HeaderText="外径偏差" ColumnID="ODVariation" DataField="ODVariation" SortField="ODVariation"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="80px">
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
<Editor>
<f:TextBox ID="txtODVariation" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="内径偏差" ColumnID="IDVariation" DataField="IDVariation" SortField="IDVariation"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="80px">
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
<Editor>
<f:TextBox ID="txtIDVariation" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="壁厚偏差" ColumnID="WallVariation" DataField="WallVariation" SortField="WallVariation"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="80px">
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
<Editor>
<f:TextBox ID="txtWallVariation" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="其他" ColumnID="OtherVariation" DataField="OtherVariation" SortField="OtherVariation"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="80px">
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
<Editor>
<f:TextBox ID="txtOtherVariation" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
</Columns>
</f:GroupField>
<f:RenderField HeaderText="外观质量" ColumnID="AppearanceQuality" DataField="AppearanceQuality" SortField="AppearanceQuality"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="180px">
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
<Editor>
<f:TextBox ID="txtAppearanceQuality" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="结果" ColumnID="Result" DataField="Result" SortField="Result"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" MinWidth="120px">
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
<Editor>
<f:TextBox ID="txtResult" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:LinkButtonField ColumnID="Delete3" Width="50px" EnablePostBack="false" Icon="Delete"
HeaderTextAlign="Center" HeaderText="删除" />
<f:RenderField HeaderText="主键" ColumnID="RecordId" DataField="RecordId" SortField="RecordId"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="140px" Hidden="true">
</f:RenderField>
<%--<f:RenderField HeaderText="备注" ColumnID="Remark" DataField="Remark" SortField="Remark"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="180px">
</f:RenderField>--%>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
@ -130,30 +172,10 @@
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="管件宏观检查记录表" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Width="900px" Height="600px">
</f:Window>
<f:Window ID="WindowPrint" Title="打印管件宏观检查记录表" Hidden="true" EnableIFrame="true" EnableMaximize="false"
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1024px"
Height="600px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Icon="TableEdit">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="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;
}
</script>
</body>
</html>

View File

@ -1,18 +1,53 @@
using BLL;
using Model;
using Newtonsoft.Json.Linq;
using NPOI.SS.UserModel;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
namespace FineUIPro.Web.JGZL
{
public partial class PipeFittingInspectionRecord : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
private string RecordId
{
get
{
return (string)ViewState["RecordId"];
}
set
{
ViewState["RecordId"] = value;
}
}
/// <summary>
/// 项目Id
/// </summary>
private string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -34,6 +69,7 @@ namespace FineUIPro.Web.JGZL
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
this.InitTreeMenu();//加载树
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
this.ProjectId = this.tvControlItem.SelectedNodeID;
this.BindGrid();
}
}
@ -82,6 +118,7 @@ namespace FineUIPro.Web.JGZL
{
if (this.tvControlItem.SelectedNodeID != "0")
{
this.ProjectId = this.tvControlItem.SelectedNodeID;
this.BindGrid();
}
}
@ -93,24 +130,13 @@ namespace FineUIPro.Web.JGZL
/// </summary>
private void BindGrid()
{
//string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1");
string strSql = @"SELECT * from JGZL_PipeFittingInspectionRecord where 1=1";
string strSql = @"SELECT * from JGZL_PipeFittingInspectionRecord where ProjectId=@projectId";
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
strSql += " AND ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
}
//else
//{
// strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 ";
// listStr.Add(new SqlParameter("@ProjectId", projectIds));
//}
listStr.Add(new SqlParameter("@projectId", this.ProjectId));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
Grid1.RecordCount = tb.Rows.Count;
//tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
@ -164,7 +190,9 @@ namespace FineUIPro.Web.JGZL
///<param name="e"></param>
protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e)
{
this.ProjectId = this.drpProjectId.SelectedValue;
this.InitTreeMenu();
this.tvControlItem.SelectedNodeID = this.ProjectId;
this.BindGrid();
}
@ -187,9 +215,7 @@ namespace FineUIPro.Web.JGZL
/// <param name="e"></param>
protected void btnPrint_Click(object sender, EventArgs e)
{
string projectId = this.tvControlItem.SelectedNodeID;
if (projectId != null)
if (!string.IsNullOrEmpty(this.ProjectId))
{
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
@ -197,7 +223,7 @@ namespace FineUIPro.Web.JGZL
string strSql = @"SELECT * from JGZL_PipeFittingInspectionRecord where ProjectId = @ProjectId order by CompileDate ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", projectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@ -241,7 +267,7 @@ namespace FineUIPro.Web.JGZL
BLL.Common.FastReportService.AddFastreportTable(dt);
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName);
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
initTemplatePath = "File\\Fastreport\\JGZL\\管件宏观检查记录表.frx";
@ -268,7 +294,40 @@ namespace FineUIPro.Web.JGZL
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipeFittingInspectionRecordEdit.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
{
{ "RecordId", Guid.NewGuid() },
{ "Name", ""},
{ "ContractNo", "" },
{ "ArrivalUnit", "" },
{ "ArrivalNum", "" },
{ "MaterialCertificateNumber", "" },
{ "Material", "" },
{ "Specifications", "" },
{ "InspectionNum", "" },
{ "ODVariation", "" },
{ "IDVariation", "" },
{ "WallVariation", "" },
{ "OtherVariation", "" },
{ "AppearanceQuality", "" },
{ "Result", "" },
{
"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();
}
else
{
@ -277,139 +336,82 @@ namespace FineUIPro.Web.JGZL
}
}
/// <summary>
/// 双击编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
protected void Grid1_PreDataBound(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_PipeFittingInspectionRecordMenuId, BLL.Const.BtnModify))
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipeFittingInspectionRecordEdit.aspx?recordId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
}
else
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
}
else
{
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return;
}
}
else
{
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
// 设置LinkButtonField的点击客户端事件
LinkButtonField deleteField = Grid1.FindColumn("Delete3") as LinkButtonField;
deleteField.OnClientClick = GetDeleteScriptGrid1();
}
/// <summary>
/// 右键编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_PipeFittingInspectionRecordMenuId, BLL.Const.BtnModify))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipeFittingInspectionRecordEdit.aspx?recordId={0}", Grid1.SelectedRowID, "维护 - ")));
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
/// <summary>
/// 右键删除
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_PipeFittingInspectionRecordMenuId, Const.BtnDelete))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
bool isShow = true;
if (Grid1.SelectedRowIndexArray.Length > 1)
{
isShow = false;
}
bool isDelete = false;
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
if (judgementDelete(rowID, isShow))
{
isDelete = true;
BLL.PipeFittingInspectionRecordService.DeletePipeFittingInspectionRecordById(rowID);
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除管件宏观检查验收记录表");
}
}
if (isDelete)
{
ShowNotify("删除成功!", MessageBoxIcon.Success);
}
this.BindGrid();
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
#region
/// <summary>
/// 判断是否可以删除
/// 删除提示
/// </summary>
/// <returns></returns>
private bool judgementDelete(string id, bool isShow)
private string GetDeleteScriptGrid1()
{
string content = string.Empty;
if (string.IsNullOrEmpty(content))
{
return true;
}
else
{
if (isShow)
{
Alert.ShowInTop(content, MessageBoxIcon.Error);
}
return false;
}
return Confirm.GetShowReference("删除选中行?", String.Empty, MessageBoxIcon.Question,
Grid1.GetDeleteSelectedRowsReference(), String.Empty);
}
#endregion
#endregion
#region
#region
/// <summary>
/// 关闭弹出窗口
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
protected void btnSave_Click(object sender, EventArgs e)
{
this.InitTreeMenu();//加载树
this.BindGrid();
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId,
Const.JGZL_PipeFittingInspectionRecordMenuId, Const.BtnSave))
{
BLL.PipeFittingInspectionRecordService.DeleteListsByProjectId(this.ProjectId);
List<Model.JGZL_PipeFittingInspectionRecord> lists = new List<JGZL_PipeFittingInspectionRecord>();
JArray teamGroupData = Grid1.GetMergedData();
foreach (JObject teamGroupRow in teamGroupData)
{
JObject values = teamGroupRow.Value<JObject>("values");
int rowIndex = teamGroupRow.Value<int>("index");
Model.JGZL_PipeFittingInspectionRecord newDetail = new Model.JGZL_PipeFittingInspectionRecord
{
RecordId = values.Value<string>("RecordId"),
ProjectId = this.ProjectId,
Name = values.Value<string>("Name"),
ContractNo = values.Value<string>("ContractNo"),
ArrivalUnit = values.Value<string>("ArrivalUnit"),
ArrivalNum = Funs.GetNewInt(values.Value<string>("ArrivalNum")),
MaterialCertificateNumber = values.Value<string>("MaterialCertificateNumber"),
Material = values.Value<string>("Material"),
Specifications = values.Value<string>("Specifications"),
InspectionNum = Funs.GetNewInt(values.Value<string>("InspectionNum")),
ODVariation = values.Value<string>("ODVariation"),
IDVariation = values.Value<string>("IDVariation"),
WallVariation = values.Value<string>("WallVariation"),
OtherVariation = values.Value<string>("OtherVariation"),
AppearanceQuality = values.Value<string>("AppearanceQuality"),
Result = values.Value<string>("Result"),
};
lists.Add(newDetail);
}
try
{
if (lists.Count > 0)
{
Funs.DB.JGZL_PipeFittingInspectionRecord.InsertAllOnSubmit(lists);
ShowNotify("保存成功!", MessageBoxIcon.Success);
}
Funs.DB.SubmitChanges();
}
catch (Exception)
{
return;
}
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
#endregion
}

View File

@ -113,6 +113,15 @@ namespace FineUIPro.Web.JGZL
/// </remarks>
protected global::FineUIPro.Button btnAdd;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnPrint 控件。
/// </summary>
@ -131,6 +140,132 @@ namespace FineUIPro.Web.JGZL
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// txtName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtName;
/// <summary>
/// txtContractNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtContractNo;
/// <summary>
/// txtArrivalUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtArrivalUnit;
/// <summary>
/// txtArrivalNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtArrivalNum;
/// <summary>
/// txtMaterialCertificateNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMaterialCertificateNumber;
/// <summary>
/// txtMaterial 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMaterial;
/// <summary>
/// txtSpecifications 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSpecifications;
/// <summary>
/// txtInspectionNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtInspectionNum;
/// <summary>
/// txtODVariation 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtODVariation;
/// <summary>
/// txtIDVariation 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtIDVariation;
/// <summary>
/// txtWallVariation 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtWallVariation;
/// <summary>
/// txtOtherVariation 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtOtherVariation;
/// <summary>
/// txtAppearanceQuality 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtAppearanceQuality;
/// <summary>
/// txtResult 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtResult;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@ -158,15 +293,6 @@ namespace FineUIPro.Web.JGZL
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// WindowPrint 控件。
/// </summary>
@ -175,32 +301,5 @@ namespace FineUIPro.Web.JGZL
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
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;
}
}

View File

@ -4,134 +4,252 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>钢管检查验收记录</title>
</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="220px" Title="钢管检查验收记录" ShowBorder="true" Layout="VBox"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpProjectId" runat="server" Label="项目" LabelAlign="Right" AutoPostBack="true" EnableEdit="true"
OnSelectedIndexChanged="drpProjectId_SelectedIndexChanged" LabelWidth="50px">
</f:DropDownList>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Tree ID="tvControlItem" ShowHeader="false" Title="钢管检查验收记录节点树" OnNodeCommand="tvControlItem_NodeCommand"
<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="220px" Title="钢管检查验收记录" ShowBorder="true" Layout="VBox"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpProjectId" runat="server" Label="项目" LabelAlign="Right" AutoPostBack="true" EnableEdit="true"
OnSelectedIndexChanged="drpProjectId_SelectedIndexChanged" LabelWidth="50px">
</f:DropDownList>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Tree ID="tvControlItem" ShowHeader="false" Title="钢管检查验收记录节点树" OnNodeCommand="tvControlItem_NodeCommand"
runat="server" ShowBorder="false" EnableCollapse="true" EnableSingleClickExpand="true"
AutoLeafIdentification="true" EnableSingleExpand="true" EnableTextSelection="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="钢管检查验收记录"
TitleToolTip="钢管检查验收记录" AutoScroll="true">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>
<f:Button ID="btnPrint" Text="钢管检查验收记录打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="钢管检查验收记录" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="RecordId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="RecordId" AllowSorting="true"
SortField="CompileDate" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="True" AutoScroll="true" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
TextAlign="Center"/>
<f:RenderField HeaderText="合同编号" ColumnID="ContractCode" DataField="ContractCode" SortField="ContractCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="300px" ExpandUnusedSpace="true">
</f:RenderField>
<f:RenderField HeaderText="到货日期" ColumnID="ArrivalDate" DataField="ArrivalDate" SortField="ArrivalDate" ExpandUnusedSpace="true"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="执行标准" ColumnID="ExecutionStandard" DataField="ExecutionStandard" SortField="ExecutionStandard"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="300px" ExpandUnusedSpace="true">
</f:RenderField>
<f:GroupField ColumnID="GroupField1" HeaderText="外观检查" HeaderTextAlign="Center" TextAlign="Center">
<Columns>
<f:RenderField HeaderText="裂纹" ColumnID="Crack" DataField="Crack"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="夹渣" ColumnID="SlagInclusion" DataField="SlagInclusion"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="缩孔" ColumnID="ShrinkageHole" DataField="ShrinkageHole"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="重皮" ColumnID="HeavyLeather" DataField="HeavyLeather"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="其他" ColumnID="Other" DataField="Other"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="80px">
</f:RenderField>
</Columns>
</f:GroupField>
<f:RenderField HeaderText="备注" ColumnID="Remark" DataField="Remark" SortField="Remark"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="300px" ExpandUnusedSpace="true">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu"/>
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10"/>
<f:ListItem Text="15" Value="15"/>
<f:ListItem Text="20" Value="20"/>
<f:ListItem Text="25" Value="25"/>
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="钢管检查验收记录" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Width="1100px" Height="800px">
</f:Window>
<f:Window ID="WindowPrint" Title="打印钢管检查验收记录" Hidden="true" EnableIFrame="true" EnableMaximize="false"
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1024px"
Height="600px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Icon="TableEdit">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="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;
}
</script>
</f:Tree>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="钢管检查验收记录"
TitleToolTip="钢管检查验收记录" AutoScroll="true">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<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>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="钢管检查验收记录" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="RecordItemId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="RecordItemId"
EnableTextSelection="True" AutoScroll="true" OnPreDataBound="Grid1_PreDataBound">
<Toolbars>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:TextBox ID="txtContractCode" runat="server" Label="合同编号" LabelAlign="Right"></f:TextBox>
<f:DatePicker ID="txtArrivalDate" runat="server" Label="到货日期" LabelAlign="Right"></f:DatePicker>
<f:TextBox ID="txtExecutionStandard" runat="server" Label="执行标准" LabelAlign="Right"></f:TextBox>
<f:ToolbarFill ID="ToolbarFill2" runat="server">
</f:ToolbarFill>
<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
TextAlign="Center" />
<f:RenderField HeaderText="名称" ColumnID="Name" DataField="Name" SortField="Name"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<Editor>
<f:TextBox ID="txtName" runat="server"></f:TextBox>
</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="Specifications" DataField="Specifications" SortField="Specifications"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<Editor>
<f:TextBox ID="txtSpecifications" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="数量" ColumnID="Quantity" DataField="Quantity" SortField="Quantity"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
<Editor>
<f:TextBox ID="txtQuantity" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="材质证编号" ColumnID="MaterialCertificateCode" DataField="MaterialCertificateCode" SortField="MaterialCertificateCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="180px">
<Editor>
<f:TextBox ID="txtMaterialCertificateCode" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="炉批号" ColumnID="HeatCode" DataField="HeatCode" SortField="HeatCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="180px">
<Editor>
<f:TextBox ID="txtHeatCode" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="材质证件自编号" ColumnID="MaterialCertificateSelfNumber" DataField="MaterialCertificateSelfNumber" SortField="MaterialCertificateSelfNumber"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="180px">
<Editor>
<f:TextBox ID="txtMaterialCertificateSelfNumber" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:LinkButtonField ColumnID="Delete3" Width="50px" EnablePostBack="false" Icon="Delete"
HeaderTextAlign="Center" HeaderText="删除" />
<f:RenderField HeaderText="主键" ColumnID="RecordItemId" DataField="RecordItemId" SortField="RecordItemId"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="140px" Hidden="true">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
<Items>
<f:Form runat="server" ShowBorder="true" ShowHeader="true" Title="外观检查">
<Items>
<f:FormRow>
<Items>
<f:DropDownList ID="drpCrack" runat="server" Label="裂纹" LabelAlign="Right">
<f:ListItem Value="合格" Text="合格" Selected="true" />
<f:ListItem Value="不合格" Text="不合格" />
<f:ListItem Value="/" Text="/" />
</f:DropDownList>
<f:DropDownList ID="drpSlagInclusion" runat="server" Label="夹渣" LabelAlign="Right">
<f:ListItem Value="合格" Text="合格" Selected="true" />
<f:ListItem Value="不合格" Text="不合格" />
<f:ListItem Value="/" Text="/" />
</f:DropDownList>
<f:DropDownList ID="drpShrinkageHole" runat="server" Label="缩孔" LabelAlign="Right">
<f:ListItem Value="合格" Text="合格" Selected="true" />
<f:ListItem Value="不合格" Text="不合格" />
<f:ListItem Value="/" Text="/" />
</f:DropDownList>
<f:DropDownList ID="drpHeavyLeather" runat="server" Label="重皮" LabelAlign="Right">
<f:ListItem Value="合格" Text="合格" Selected="true" />
<f:ListItem Value="不合格" Text="不合格" />
<f:ListItem Value="/" Text="/" />
</f:DropDownList>
<f:DropDownList ID="drpOther" runat="server" Label="其他" LabelAlign="Right">
<f:ListItem Value="合格" Text="合格" Selected="true" />
<f:ListItem Value="不合格" Text="不合格" />
<f:ListItem Value="/" Text="/" />
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Label ID="Label1" runat="server"></f:Label>
<f:Image ID="imgPicture" CssClass="userphoto" ImageUrl="" ImageWidth="350px" ImageHeight="120px"
runat="server" BoxFlex="1">
</f:Image>
<f:Label ID="Label2" runat="server"></f:Label>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="45% 10% 45%">
<Items>
<f:Label ID="Label3" runat="server"></f:Label>
<f:FileUpload ID="filePicture" runat="server" ButtonText="上传图片" ButtonOnly="true"
AutoPostBack="true" OnFileSelected="filePicture_FileSelected">
</f:FileUpload>
<f:Label ID="Label4" runat="server"></f:Label>
</Items>
</f:FormRow>
</Items>
</f:Form>
</Items>
<Items>
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="钢管检查验收记录" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="RecordItemId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="RecordItemId"
EnableTextSelection="True" AutoScroll="true" OnPreDataBound="Grid2_PreDataBound">
<Toolbars>
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:ToolbarFill ID="ToolbarFill3" runat="server">
</f:ToolbarFill>
<f:Button ID="btnAddItem2" runat="server" Icon="Add" Text="增加" OnClick="btnAddItem2_Click"></f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
TextAlign="Center" />
<f:GroupField HeaderText="厚度mm" HeaderTextAlign="Center" TextAlign="Center">
<Columns>
<f:RenderField HeaderText="位1" ColumnID="Part1" DataField="Part1" SortField="Part1"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="140px">
<Editor>
<f:TextBox ID="txtPart1" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="位2" ColumnID="Part2" DataField="Part2" SortField="Part2"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="140px">
<Editor>
<f:TextBox ID="txtPart2" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="位3" ColumnID="Part3" DataField="Part3" SortField="Part3"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="140px">
<Editor>
<f:TextBox ID="txtPart3" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="位4" ColumnID="Part4" DataField="Part4" SortField="Part4"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="140px">
<Editor>
<f:TextBox ID="txtPart4" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField HeaderText="管径mm" HeaderTextAlign="Center" TextAlign="Center">
<Columns>
<f:RenderField HeaderText="内径d" ColumnID="InnerDiameter" DataField="InnerDiameter" SortField="InnerDiameter"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="140px">
<Editor>
<f:TextBox ID="txtInnerDiameter" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="外径D" ColumnID="OuterDiameter" DataField="OuterDiameter" SortField="OuterDiameter"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="140px">
<Editor>
<f:TextBox ID="txtOuterDiameter" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
</Columns>
</f:GroupField>
<f:RenderField HeaderText="长度m" ColumnID="Lengths" DataField="Lengths" SortField="Lengths"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="140px">
<Editor>
<f:TextBox ID="txtLengths" runat="server"></f:TextBox>
</Editor>
</f:RenderField>
<f:LinkButtonField ColumnID="Delete2" Width="50px" EnablePostBack="false" Icon="Delete"
HeaderTextAlign="Center" HeaderText="删除" />
<f:RenderField HeaderText="主键" ColumnID="RecordItemId" DataField="RecordItemId" SortField="RecordItemId"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="140px" Hidden="true">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="WindowPrint" Title="打印钢管检查验收记录" Hidden="true" EnableIFrame="true" EnableMaximize="false"
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1024px"
Height="600px">
</f:Window>
</form>
</body>
</html>

View File

@ -1,14 +1,53 @@
using BLL;
using Model;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Data;
using System.Linq;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
namespace FineUIPro.Web.JGZL
{
public partial class SteelPipeCheckRecord : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
private string RecordId
{
get { return (string)ViewState["RecordId"]; }
set { ViewState["RecordId"] = value; }
}
/// <summary>
/// 项目Id
/// </summary>
private string ProjectId
{
get { return (string)ViewState["ProjectId"]; }
set { ViewState["ProjectId"] = value; }
}
/// <summary>
/// 附件路径
/// </summary>
public string FullAttachUrl
{
get
{
return (string)ViewState["FullAttachUrl"];
}
set
{
ViewState["FullAttachUrl"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -19,18 +58,15 @@ namespace FineUIPro.Web.JGZL
{
if (!IsPostBack)
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
//this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.drpProjectId.DataTextField = "ProjectCode";
this.drpProjectId.DataValueField = "ProjectId";
this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1");
this.drpProjectId.DataBind();
Funs.FineUIPleaseSelect(this.drpProjectId);
// 默认显示选中的项目
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
}
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
this.ProjectId = this.drpProjectId.SelectedValue;
this.InitTreeMenu();//加载树
}
@ -84,7 +120,7 @@ namespace FineUIPro.Web.JGZL
if (this.tvControlItem.SelectedNodeID != "0")
{
this.BindGrid();
DataInfo();
}
}
#endregion
@ -99,24 +135,59 @@ namespace FineUIPro.Web.JGZL
{
if (this.tvControlItem.SelectedNodeID != "0")
{
this.BindGrid();
this.ProjectId = this.tvControlItem.SelectedNodeID;
this.DataInfo();
}
}
#endregion
#region
private void DataInfo()
{
if (!string.IsNullOrEmpty(this.ProjectId))
{
var report = SteelPipeCheckRecordService.GetSteelPipeReportByProjectId(this.ProjectId);
if (report != null)
{
this.RecordId = report.RecordId;
this.txtContractCode.Text= report.ContractCode;
this.txtArrivalDate.Text =string.Format("{0:yyyy-MM-dd}",report.ArrivalDate);
this.txtExecutionStandard.Text = report.ExecutionStandard;
this.drpCrack.SelectedValue = report.Crack;
this.drpSlagInclusion.SelectedValue = report.SlagInclusion;
this.drpShrinkageHole.SelectedValue = report.ShrinkageHole;
this.drpHeavyLeather.SelectedValue = report.HeavyLeather;
this.drpOther.SelectedValue = report.Other;
this.imgPicture.ImageUrl = report.Remark;
}
else
{
//默认
this.RecordId = string.Empty;
this.txtContractCode.Text = string.Empty;
this.txtArrivalDate.Text = string.Empty;
this.txtExecutionStandard.Text = string.Empty;
this.drpCrack.SelectedValue = "合格";
this.drpSlagInclusion.SelectedValue = "合格";
this.drpShrinkageHole.SelectedValue = "合格";
this.drpHeavyLeather.SelectedValue = "合格";
this.drpOther.SelectedValue= "合格";
this.imgPicture.ImageUrl = string.Empty;
}
BindGrid();
BindGrid2();
}
}
/// <summary>
/// 数据绑定
/// </summary>
private void BindGrid()
{
string strSql = @"SELECT * from JGZL_SteelPipeCheckRecord where 1=1 ";
string strSql = @"SELECT * from JGZL_SteelPipeCheckRecordItem1 where RecordId=@recordId ";
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
strSql += " AND ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
}
listStr.Add(new SqlParameter("@recordId", this.RecordId));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@ -125,47 +196,22 @@ namespace FineUIPro.Web.JGZL
Grid1.DataSource = table;
Grid1.DataBind();
}
#endregion
#region
#region
/// <summary>
/// 页索引改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
private void BindGrid2()
{
BindGrid();
}
#endregion
string strSql = @"SELECT * from JGZL_SteelPipeCheckRecordItem2 where RecordId=@recordId ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@recordId", this.RecordId));
#region
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid2.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid2, tb);
Grid2.DataSource = table;
Grid2.DataBind();
}
#endregion
#region
/// <summary>
/// 分页选择下拉改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
#endregion
#endregion
#region
///<summary>
///查询
@ -174,8 +220,10 @@ namespace FineUIPro.Web.JGZL
///<param name="e"></param>
protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e)
{
this.ProjectId = this.drpProjectId.SelectedValue;
this.InitTreeMenu();
this.BindGrid();
this.tvControlItem.SelectedNodeID = this.ProjectId;
DataInfo();
}
/// <summary>
@ -183,10 +231,10 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
//protected void TextBox_TextChanged(object sender, EventArgs e)
//{
// this.BindGrid();
//}
#endregion
#region
@ -197,130 +245,150 @@ namespace FineUIPro.Web.JGZL
/// <param name="e"></param>
protected void btnPrint_Click(object sender, EventArgs e)
{
string projectId = this.tvControlItem.SelectedNodeID;
if (projectId != null)
if (!string.IsNullOrEmpty(this.ProjectId))
{
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
BLL.Common.FastReportService.ResetData();
var report = BLL.SteelPipeCheckRecordService.GetSteelPipeReportById(this.RecordId);
if (report != null)
{
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
BLL.Common.FastReportService.ResetData();
DataTable dtMainData = new DataTable();
dtMainData.TableName = "MData";
dtMainData.Columns.Add("ProjectName");
dtMainData.Columns.Add("ContractCode");
dtMainData.Columns.Add("ArrivalDate");
dtMainData.Columns.Add("ExecutionStandard");
dtMainData.Columns.Add("Crack");
dtMainData.Columns.Add("SlagInclusion");
dtMainData.Columns.Add("ShrinkageHole");
dtMainData.Columns.Add("HeavyLeather");
dtMainData.Columns.Add("Other");
dtMainData.Columns.Add("ImageUrl");
var report = BLL.SteelPipeCheckRecordService.GetSteelPipeReportById(this.Grid1.SelectedRowID);
if (report != null)
var newMainData = dtMainData.NewRow();
newMainData["ProjectName"] = BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName;
newMainData["ContractCode"] = report.ContractCode;
string arrivalDate = report.ArrivalDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.ArrivalDate) : "";
newMainData["ArrivalDate"] = arrivalDate;
newMainData["ExecutionStandard"] = report.ExecutionStandard;
newMainData["Crack"] = report.Crack;
newMainData["SlagInclusion"] = report.SlagInclusion;
newMainData["ShrinkageHole"] = report.ShrinkageHole;
newMainData["HeavyLeather"] = report.HeavyLeather;
newMainData["Other"] = report.Other;
newMainData["ImageUrl"] = Funs.RootPath + report.Remark.Substring(report.Remark.IndexOf('/'));
dtMainData.Rows.Add(newMainData);
BLL.Common.FastReportService.AddFastreportTable(dtMainData);
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
//keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
//keyValuePairs.Add("ContractCode", report.ContractCode);
//keyValuePairs.Add("ArrivalDate", string.Format("{0:yyyy.MM.dd}", report.ArrivalDate));
//keyValuePairs.Add("ExecutionStandard", report.ExecutionStandard);
//keyValuePairs.Add("Crack", report.Crack);
//keyValuePairs.Add("SlagInclusion", report.SlagInclusion);
//keyValuePairs.Add("ShrinkageHole", report.ShrinkageHole);
//keyValuePairs.Add("HeavyLeather", report.HeavyLeather);
//keyValuePairs.Add("Other", report.Other);
//keyValuePairs.Add("Remark", report.Remark);
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
////加载图片
//var imageUrl = (from x in Funs.DB.AttachFile where x.ToKeyId == report.RecordId && x.MenuId == BLL.Const.JGZL_SteelPipeCheckRecordMenuId select x).FirstOrDefault();
//if (imageUrl != null)
//{
// DataTable imagedt = new DataTable();
// imagedt.TableName = "ImageData";
// imagedt.Columns.Add("ImageUrl");
// var newRowsImage = imagedt.NewRow();
// newRowsImage["ImageUrl"] = Funs.RootPath + imageUrl.AttachUrl;
// imagedt.Rows.Add(newRowsImage);
// BLL.Common.FastReportService.AddFastreportTable(imagedt);
//}
//明细表1
string strSql = @"SELECT * from JGZL_SteelPipeCheckRecordItem1 where RecordId=@recordId ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@recordId", this.RecordId));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
DataTable dt = new DataTable();
dt.TableName = "Data";
dt.Columns.Add("Name");
dt.Columns.Add("Material");
dt.Columns.Add("Specifications");
dt.Columns.Add("Quantity");
dt.Columns.Add("MaterialCertificateCode");
dt.Columns.Add("HeatCode");
dt.Columns.Add("MaterialCertificateSelfNumber");
DataRow[] rows = tb.DefaultView.ToTable().Select();
foreach (var row in rows)
{
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
keyValuePairs.Add("ContractCode", report.ContractCode);
keyValuePairs.Add("ArrivalDate", string.Format("{0:yyyy.MM.dd}", report.ArrivalDate));
keyValuePairs.Add("ExecutionStandard", report.ExecutionStandard);
keyValuePairs.Add("Crack", report.Crack);
keyValuePairs.Add("SlagInclusion", report.SlagInclusion);
keyValuePairs.Add("ShrinkageHole", report.ShrinkageHole);
keyValuePairs.Add("HeavyLeather", report.HeavyLeather);
keyValuePairs.Add("Other", report.Other);
keyValuePairs.Add("Remark", report.Remark);
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
var newRows = dt.NewRow();
newRows["Name"] = row["Name"].ToString();
newRows["Material"] = row["Material"].ToString();
newRows["Specifications"] = row["Specifications"].ToString();
newRows["Quantity"] = row["Quantity"].ToString();
newRows["MaterialCertificateCode"] = row["MaterialCertificateCode"].ToString();
newRows["HeatCode"] = row["HeatCode"].ToString();
newRows["MaterialCertificateSelfNumber"] = row["MaterialCertificateSelfNumber"].ToString();
//加载图片
var imageUrl = (from x in Funs.DB.AttachFile where x.ToKeyId == report.RecordId && x.MenuId == BLL.Const.JGZL_SteelPipeCheckRecordMenuId select x).FirstOrDefault();
if (imageUrl != null)
{
DataTable imagedt = new DataTable();
imagedt.TableName = "ImageData";
imagedt.Columns.Add("ImageUrl");
var newRowsImage = imagedt.NewRow();
newRowsImage["ImageUrl"] = Funs.RootPath + imageUrl.AttachUrl;
imagedt.Rows.Add(newRowsImage);
BLL.Common.FastReportService.AddFastreportTable(imagedt);
}
//明细表1
string strSql = @"SELECT * from JGZL_SteelPipeCheckRecordItem1 where RecordId=@recordId ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@recordId", this.Grid1.SelectedRowID));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
DataTable dt = new DataTable();
dt.TableName = "Data";
dt.Columns.Add("Name");
dt.Columns.Add("Material");
dt.Columns.Add("Specifications");
dt.Columns.Add("Quantity");
dt.Columns.Add("MaterialCertificateCode");
dt.Columns.Add("HeatCode");
dt.Columns.Add("MaterialCertificateSelfNumber");
DataRow[] rows = tb.DefaultView.ToTable().Select();
foreach (var row in rows)
{
var newRows = dt.NewRow();
newRows["Name"] = row["Name"].ToString();
newRows["Material"] = row["Material"].ToString();
newRows["Specifications"] = row["Specifications"].ToString();
newRows["Quantity"] = row["Quantity"].ToString();
newRows["MaterialCertificateCode"] = row["MaterialCertificateCode"].ToString();
newRows["HeatCode"] = row["HeatCode"].ToString();
newRows["MaterialCertificateSelfNumber"] = row["MaterialCertificateSelfNumber"].ToString();
dt.Rows.Add(newRows);
}
BLL.Common.FastReportService.AddFastreportTable(dt);
//明细表2
string strSql2 = @"SELECT * from JGZL_SteelPipeCheckRecordItem2 where RecordId=@recordId ";
List<SqlParameter> listStr2 = new List<SqlParameter>();
listStr2.Add(new SqlParameter("@recordId", this.Grid1.SelectedRowID));
SqlParameter[] parameter2 = listStr2.ToArray();
DataTable tb2 = SQLHelper.GetDataTableRunText(strSql2, parameter2);
DataTable dt2 = new DataTable();
dt2.TableName = "ItemData";
dt2.Columns.Add("Num");
dt2.Columns.Add("Part1");
dt2.Columns.Add("Part2");
dt2.Columns.Add("Part3");
dt2.Columns.Add("Part4");
dt2.Columns.Add("InnerDiameter");
dt2.Columns.Add("OuterDiameter");
dt2.Columns.Add("Lengths");
DataRow[] rows2 = tb2.DefaultView.ToTable().Select();
int i = 0;
foreach (var row in rows2)
{
var newRows = dt2.NewRow();
newRows["Num"] = (i + 1).ToString();
newRows["Part1"] = row["Part1"].ToString();
newRows["Part2"] = row["Part2"].ToString();
newRows["Part3"] = row["Part3"].ToString();
newRows["Part4"] = row["Part4"].ToString();
newRows["InnerDiameter"] = row["InnerDiameter"].ToString();
newRows["OuterDiameter"] = row["OuterDiameter"].ToString();
newRows["Lengths"] = row["Lengths"].ToString();
dt2.Rows.Add(newRows);
i++;
}
BLL.Common.FastReportService.AddFastreportTable(dt2);
dt.Rows.Add(newRows);
}
initTemplatePath = "File\\Fastreport\\JGZL\\钢管检查验收记录.frx";
if (File.Exists(rootPath + initTemplatePath))
BLL.Common.FastReportService.AddFastreportTable(dt);
//明细表2
string strSql2 = @"SELECT * from JGZL_SteelPipeCheckRecordItem2 where RecordId=@recordId ";
List<SqlParameter> listStr2 = new List<SqlParameter>();
listStr2.Add(new SqlParameter("@recordId", this.RecordId));
SqlParameter[] parameter2 = listStr2.ToArray();
DataTable tb2 = SQLHelper.GetDataTableRunText(strSql2, parameter2);
DataTable dt2 = new DataTable();
dt2.TableName = "ItemData";
dt2.Columns.Add("Num");
dt2.Columns.Add("Part1");
dt2.Columns.Add("Part2");
dt2.Columns.Add("Part3");
dt2.Columns.Add("Part4");
dt2.Columns.Add("InnerDiameter");
dt2.Columns.Add("OuterDiameter");
dt2.Columns.Add("Lengths");
DataRow[] rows2 = tb2.DefaultView.ToTable().Select();
int i = 0;
foreach (var row in rows2)
{
PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
var newRows = dt2.NewRow();
newRows["Num"] = (i + 1).ToString();
newRows["Part1"] = row["Part1"].ToString();
newRows["Part2"] = row["Part2"].ToString();
newRows["Part3"] = row["Part3"].ToString();
newRows["Part4"] = row["Part4"].ToString();
newRows["InnerDiameter"] = row["InnerDiameter"].ToString();
newRows["OuterDiameter"] = row["OuterDiameter"].ToString();
newRows["Lengths"] = row["Lengths"].ToString();
dt2.Rows.Add(newRows);
i++;
}
BLL.Common.FastReportService.AddFastreportTable(dt2);
}
else
initTemplatePath = "File\\Fastreport\\JGZL\\钢管检查验收记录.frx";
if (File.Exists(rootPath + initTemplatePath))
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
}
}
else
{
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
}
@ -336,7 +404,89 @@ namespace FineUIPro.Web.JGZL
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SteelPipeCheckRecordEdit.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
{
{ "RecordItemId", Guid.NewGuid() },
{ "Name", ""},
{ "Material", "" },
{ "Specifications", "" },
{ "Quantity", "" },
{ "MaterialCertificateCode", "" },
{ "HeatCode", "" },
{ "MaterialCertificateSelfNumber", "" },
{
"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();
}
else
{
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return;
}
}
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);
}
protected void btnAddItem2_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
JArray teamGroupData = Grid2.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
{
{ "RecordItemId", Guid.NewGuid() },
{ "Part1", ""},
{ "Part2", "" },
{ "Part3", "" },
{ "Part4", "" },
{ "InnerDiameter", "" },
{ "OuterDiameter", "" },
{ "Lengths", "" },
{
"Delete2",
String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>",
GetDeleteScriptGrid2(), IconHelper.GetResolvedIconUrl(Icon.Delete))
}
};
list.Add(defaultObj);
Grid2.DataSource = list;
Grid2.DataBind();
}
else
{
@ -345,144 +495,177 @@ namespace FineUIPro.Web.JGZL
}
}
protected void Grid2_PreDataBound(object sender, EventArgs e)
{
// 设置LinkButtonField的点击客户端事件
LinkButtonField deleteField = Grid2.FindColumn("Delete2") as LinkButtonField;
deleteField.OnClientClick = GetDeleteScriptGrid2();
}
/// <summary>
/// 双击编辑
/// 删除提示
/// </summary>
/// <returns></returns>
private string GetDeleteScriptGrid2()
{
return Confirm.GetShowReference("删除选中行?", String.Empty, MessageBoxIcon.Question,
Grid2.GetDeleteSelectedRowsReference(), String.Empty);
}
#endregion
#region
/// <summary>
/// 上传
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
protected void filePicture_FileSelected(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_SteelPipeCheckRecordMenuId, BLL.Const.BtnModify))
if (filePicture.HasFile)
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
string fileName = filePicture.ShortFileName;
if (!ValidateFileType(fileName))
{
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
ShowNotify("无效的文件类型!");
return;
}
fileName = fileName.Replace(":", "_").Replace(" ", "_").Replace("\\", "_").Replace("/", "_");
fileName = DateTime.Now.Ticks.ToString() + "_" + fileName;
filePicture.SaveAs(Server.MapPath("~/upload/" + fileName));
imgPicture.ImageUrl = "~/upload/" + fileName;
// 清空文件上传组件
filePicture.Reset();
}
}
#endregion
#region
/// <summary>
/// 保存按钮
/// </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.JGZL_SteelPipeCheckRecordMenuId, Const.BtnSave))
{
Model.JGZL_SteelPipeCheckRecord newReport = new JGZL_SteelPipeCheckRecord();
newReport.ContractCode = this.txtContractCode.Text.Trim();
newReport.ArrivalDate = Funs.GetNewDateTime(this.txtArrivalDate.Text);
newReport.ExecutionStandard = this.txtExecutionStandard.Text;
newReport.Crack = this.drpCrack.SelectedValue;
newReport.SlagInclusion = this.drpSlagInclusion.SelectedValue;
newReport.ShrinkageHole= this.drpShrinkageHole.SelectedValue;
newReport.HeavyLeather = this.drpHeavyLeather.SelectedValue;
newReport.Other = this.drpOther.SelectedValue;
newReport.Remark = imgPicture.ImageUrl;//图片
if (!string.IsNullOrEmpty(this.RecordId))
{
var r = BLL.SteelPipeCheckRecordService.GetSteelPipeReportById(this.RecordId);
if (r != null)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SteelPipeCheckRecordEdit.aspx?recordId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
}
else
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
string url = r.Remark.Substring(r.Remark.IndexOf('/'));
if (File.Exists(Funs.RootPath + url))
{
//删除被覆盖的图片
File.Delete(Funs.RootPath + url);
}
}
newReport.RecordId = this.RecordId;
BLL.SteelPipeCheckRecordService.UpdateSteelPipeReport(newReport);
}
else
{
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return;
}
}
else
{
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
/// <summary>
/// 右键编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_SteelPipeCheckRecordMenuId, BLL.Const.BtnModify))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SteelPipeCheckRecordEdit.aspx?recordId={0}", Grid1.SelectedRowID, "维护 - ")));
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
/// <summary>
/// 右键删除
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_SteelPipeCheckRecordMenuId, Const.BtnDelete))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
newReport.RecordId = SQLHelper.GetNewID(typeof(Model.JGZL_SteelPipeCheckRecord));
newReport.ProjectId = this.ProjectId;
newReport.CompileMan = this.CurrUser.UserId;
newReport.CompileDate = DateTime.Now;
this.RecordId = newReport.RecordId;
BLL.SteelPipeCheckRecordService.AddSteelPipeReport(newReport);
}
bool isShow = true;
if (Grid1.SelectedRowIndexArray.Length > 1)
BLL.SteelPipeCheckRecordItem1Service.DeleteSteelPipeItem1ByRecordId(this.RecordId);
List<Model.JGZL_SteelPipeCheckRecordItem1> lists = new List<JGZL_SteelPipeCheckRecordItem1>();
JArray teamGroupData = Grid1.GetMergedData();
foreach (JObject teamGroupRow in teamGroupData)
{
isShow = false;
}
bool isDelete = false;
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
if (judgementDelete(rowID, isShow))
JObject values = teamGroupRow.Value<JObject>("values");
int rowIndex = teamGroupRow.Value<int>("index");
Model.JGZL_SteelPipeCheckRecordItem1 newDetail = new Model.JGZL_SteelPipeCheckRecordItem1
{
isDelete = true;
//删除附件
AttachFileService.GetAttachFile(rowID, BLL.Const.JGZL_SteelPipeCheckRecordMenuId);
BLL.SteelPipeCheckRecordItem1Service.DeleteSteelPipeItem1ByRecordId(rowID);
BLL.SteelPipeCheckRecordItem2Service.DeleteSteelPipeItem2ByRecordId(rowID);
BLL.SteelPipeCheckRecordService.DeleteSteelPipeReportById(rowID);
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除钢管检查验收记录");
}
RecordItemId = values.Value<string>("RecordItemId"),
RecordId = this.RecordId,
Name = values.Value<string>("Name"),
Material = values.Value<string>("Material"),
Specifications = values.Value<string>("Specifications"),
Quantity = values.Value<string>("Quantity"),
MaterialCertificateCode = values.Value<string>("MaterialCertificateCode"),
HeatCode = values.Value<string>("HeatCode"),
MaterialCertificateSelfNumber = values.Value<string>("MaterialCertificateSelfNumber"),
};
lists.Add(newDetail);
}
if (isDelete)
try
{
ShowNotify("删除成功!", MessageBoxIcon.Success);
if (lists.Count > 0)
{
Funs.DB.JGZL_SteelPipeCheckRecordItem1.InsertAllOnSubmit(lists);
//ShowNotify("保存成功!", MessageBoxIcon.Success);
}
Funs.DB.SubmitChanges();
}
this.BindGrid();
catch (Exception)
{
return;
}
BLL.SteelPipeCheckRecordItem2Service.DeleteSteelPipeItem2ByRecordId(this.RecordId);
List<Model.JGZL_SteelPipeCheckRecordItem2> lists2 = new List<JGZL_SteelPipeCheckRecordItem2>();
JArray teamGroupData2 = Grid2.GetMergedData();
foreach (JObject teamGroupRow in teamGroupData2)
{
JObject values = teamGroupRow.Value<JObject>("values");
int rowIndex = teamGroupRow.Value<int>("index");
Model.JGZL_SteelPipeCheckRecordItem2 newDetai2 = new Model.JGZL_SteelPipeCheckRecordItem2
{
RecordItemId = values.Value<string>("RecordItemId"),
RecordId = this.RecordId,
Part1 = values.Value<string>("Part1"),
Part2 = values.Value<string>("Part2"),
Part3 = values.Value<string>("Part3"),
Part4 = values.Value<string>("Part4"),
InnerDiameter = values.Value<string>("InnerDiameter"),
OuterDiameter = values.Value<string>("OuterDiameter"),
Lengths = values.Value<string>("Lengths"),
};
lists2.Add(newDetai2);
}
try
{
if (lists2.Count > 0)
{
Funs.DB.JGZL_SteelPipeCheckRecordItem2.InsertAllOnSubmit(lists2);
}
Funs.DB.SubmitChanges();
}
catch (Exception)
{
return;
}
ShowNotify("保存成功!", MessageBoxIcon.Success);
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
#region
/// <summary>
/// 判断是否可以删除
/// </summary>
/// <returns></returns>
private bool judgementDelete(string id, bool isShow)
{
string content = string.Empty;
if (string.IsNullOrEmpty(content))
{
return true;
}
else
{
if (isShow)
{
Alert.ShowInTop(content, MessageBoxIcon.Error);
}
return false;
return;
}
}
#endregion
#endregion
#region
/// <summary>
/// 关闭弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
this.InitTreeMenu();//加载树
this.BindGrid();
}
#endregion
}
}

View File

@ -105,13 +105,13 @@ namespace FineUIPro.Web.JGZL
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnAdd 控件。
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAdd;
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnPrint 控件。
@ -132,40 +132,319 @@ namespace FineUIPro.Web.JGZL
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// ToolbarSeparator1 控件。
/// Toolbar3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// ToolbarText1 控件。
/// txtContractCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
protected global::FineUIPro.TextBox txtContractCode;
/// <summary>
/// ddlPageSize 控件。
/// txtArrivalDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
protected global::FineUIPro.DatePicker txtArrivalDate;
/// <summary>
/// Window1 控件。
/// txtExecutionStandard 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
protected global::FineUIPro.TextBox txtExecutionStandard;
/// <summary>
/// ToolbarFill2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill2;
/// <summary>
/// btnAdd 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAdd;
/// <summary>
/// txtName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtName;
/// <summary>
/// txtMaterial 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMaterial;
/// <summary>
/// txtSpecifications 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSpecifications;
/// <summary>
/// txtQuantity 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtQuantity;
/// <summary>
/// txtMaterialCertificateCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMaterialCertificateCode;
/// <summary>
/// txtHeatCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtHeatCode;
/// <summary>
/// txtMaterialCertificateSelfNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMaterialCertificateSelfNumber;
/// <summary>
/// drpCrack 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCrack;
/// <summary>
/// drpSlagInclusion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpSlagInclusion;
/// <summary>
/// drpShrinkageHole 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpShrinkageHole;
/// <summary>
/// drpHeavyLeather 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpHeavyLeather;
/// <summary>
/// drpOther 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpOther;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// imgPicture 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Image imgPicture;
/// <summary>
/// Label2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label2;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label3;
/// <summary>
/// filePicture 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload filePicture;
/// <summary>
/// Label4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label4;
/// <summary>
/// Grid2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid2;
/// <summary>
/// Toolbar4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar4;
/// <summary>
/// ToolbarFill3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill3;
/// <summary>
/// btnAddItem2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAddItem2;
/// <summary>
/// txtPart1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPart1;
/// <summary>
/// txtPart2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPart2;
/// <summary>
/// txtPart3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPart3;
/// <summary>
/// txtPart4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPart4;
/// <summary>
/// txtInnerDiameter 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtInnerDiameter;
/// <summary>
/// txtOuterDiameter 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtOuterDiameter;
/// <summary>
/// txtLengths 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtLengths;
/// <summary>
/// WindowPrint 控件。
@ -175,32 +454,5 @@ namespace FineUIPro.Web.JGZL
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
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;
}
}