This commit is contained in:
李超 2026-04-12 10:24:35 +08:00
parent 11d1cc99e1
commit 22b0c68cb4
13 changed files with 2984 additions and 23 deletions

View File

@ -108,6 +108,9 @@
<Reference Include="NPOI.OpenXmlFormats, Version=2.5.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
<HintPath>..\packages\NPOI.2.5.5\lib\net45\NPOI.OpenXmlFormats.dll</HintPath>
</Reference>
<Reference Include="Spire.Pdf, Version=12.2.6.0, Culture=neutral, PublicKeyToken=663f351905198cb3, processorArchitecture=MSIL">
<HintPath>..\packages\Spire.PDF.12.2.6\lib\net40\Spire.Pdf.dll</HintPath>
</Reference>
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data.Linq" />
<Reference Include="System.DirectoryServices" />
@ -1082,7 +1085,10 @@
<Content Include="HJGL\DataIn\DataIn.aspx" />
<Content Include="HJGL\DataIn\DataInEdit.aspx" />
<Content Include="HJGL\DataIn\JointIn.aspx" />
<Content Include="HJGL\DataIn\PipelineGrid.aspx" />
<Content Include="HJGL\DataIn\PipeLineInAuto.aspx" />
<Content Include="HJGL\DataIn\PipeLineIn.aspx" />
<Content Include="HJGL\DataIn\PipelineInEdit.aspx" />
<Content Include="HJGL\DataIn\ShowErr.aspx" />
<Content Include="HJGL\DataIn\WeldReportIn.aspx" />
<Content Include="HJGL\FileControl\CompanyStandardsView.aspx" />
@ -5590,6 +5596,20 @@
<Compile Include="HJGL\DataIn\JointIn.aspx.designer.cs">
<DependentUpon>JointIn.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\DataIn\PipelineGrid.aspx.cs">
<DependentUpon>PipelineGrid.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\DataIn\PipelineGrid.aspx.designer.cs">
<DependentUpon>PipelineGrid.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\DataIn\PipeLineInAuto.aspx.cs">
<DependentUpon>PipeLineInAuto.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\DataIn\PipeLineInAuto.aspx.designer.cs">
<DependentUpon>PipeLineInAuto.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\DataIn\PipeLineIn.aspx.cs">
<DependentUpon>PipeLineIn.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -5597,6 +5617,13 @@
<Compile Include="HJGL\DataIn\PipeLineIn.aspx.designer.cs">
<DependentUpon>PipeLineIn.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\DataIn\PipelineInEdit.aspx.cs">
<DependentUpon>PipelineInEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\DataIn\PipelineInEdit.aspx.designer.cs">
<DependentUpon>PipelineInEdit.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\DataIn\ShowErr.aspx.cs">
<DependentUpon>ShowErr.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -8183,6 +8210,7 @@
<Folder Include="App_Themes\Default\Images\" />
<Folder Include="common\ReportPrint\upload\" />
<Folder Include="File\Image\" />
<Folder Include="HJGL\JoinMarking\" />
<Folder Include="SeetaFaceDir\modelimages\" />
<Folder Include="tmpupload\" />
<Folder Include="WeldMat\res\js\vendor\" />

View File

@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.DataIn {
public partial class PipeLineIn {
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class PipeLineIn
{
/// <summary>
/// Head1 控件。
/// </summary>
@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// form1 控件。
/// </summary>
@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// FileExcel 控件。
/// </summary>
@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload FileExcel;
/// <summary>
/// btnAudit 控件。
/// </summary>
@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAudit;
/// <summary>
/// imgbtnImport 控件。
/// </summary>
@ -92,7 +94,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button imgbtnImport;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@ -101,7 +103,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// imgbtnUpload 控件。
/// </summary>
@ -110,7 +112,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button imgbtnUpload;
/// <summary>
/// hdFileName 控件。
/// </summary>
@ -119,7 +121,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdFileName;
/// <summary>
/// Grid1 控件。
/// </summary>
@ -128,7 +130,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@ -137,7 +139,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@ -146,7 +148,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@ -155,7 +157,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@ -164,7 +166,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu1 控件。
/// </summary>
@ -173,7 +175,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>

View File

@ -0,0 +1,35 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PipeLineInAuto.aspx.cs" Inherits="FineUIPro.Web.HJGL.DataIn.PipeLineInAuto" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管线导入</title>
<style>
.f-grid-row-summary .f-grid-cell-inner {
font-weight: bold;
color: red;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="RegionPanel1" />
<f:Panel ID="RegionPanel1" ShowBorder="false" runat="server" Margin="5px" EnableIFrame="true" ShowHeader="false" IFrameUrl="PipelineGrid.aspx">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="TOP" runat="server" ToolbarAlign="Left">
<Items>
<f:HiddenField ID="hdId" runat="server"></f:HiddenField>
<f:CheckBox ID="ckbSkipFirst" runat="server" Checked="true" Label="跳过首页" LabelAlign="Right"></f:CheckBox>
<f:FileUpload ID="FileExcel" runat="server" Label="数据文件" EmptyText="请上传EXCEl格式文件" Width="350px" LabelWidth="90px" LabelAlign="Right"></f:FileUpload>
<f:Button ID="imgbtnImport" runat="server" Text="上传" ToolTip="文件上传" OnClick="imgbtnImport_Click"></f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Panel>
</form>
</body>
</html>

View File

@ -0,0 +1,88 @@
using Aspose.Words;
using BLL;
using BLL.Common;
using NPOI.SS.Formula.Functions;
using Spire.Pdf;
using Spire.Pdf.Utilities;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Web.UI.DataVisualization.Charting;
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class PipeLineInAuto : PageBase
{
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
}
}
#endregion
#region
/// <summary>
/// 文件上传
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void imgbtnImport_Click(object sender, EventArgs e)
{
try
{
if (this.FileExcel.HasFile == false)
{
Response.Write("<script>alert('请您选择pdf文件')</script> ");
return;
}
string IsXls = Path.GetExtension(FileExcel.FileName).ToString().Trim().ToLower();
if (IsXls != ".pdf")
{
Response.Write("\"<script>alert('请您选择pdf文件')</script> ");
return;
}
string rootPath = Server.MapPath("~/");
string initFullPath = rootPath + Const.ExcelUrl;
if (!Directory.Exists(initFullPath))
{
Directory.CreateDirectory(initFullPath);
}
string fileUrl = initFullPath + BLL.Funs.GetNewFileName() + IsXls;
this.FileExcel.PostedFile.SaveAs(fileUrl);
if (ckbSkipFirst.Checked)
{
RegionPanel1.IFrameUrl = "./PipelineGrid.aspx?ckbSkipFirst=" + 1 + "&&fileUrl=" + fileUrl;
}
else
{
RegionPanel1.IFrameUrl = "./PipelineGrid.aspx?ckbSkipFirst=" + 0 + "&&fileUrl=" + fileUrl;
}
}
catch (Exception ex)
{
ShowNotify(ex.Message, MessageBoxIcon.Warning);
return;
}
}
#endregion
}
}

View File

@ -0,0 +1,89 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class PipeLineInAuto
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// RegionPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel RegionPanel1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// hdId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdId;
/// <summary>
/// ckbSkipFirst 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckbSkipFirst;
/// <summary>
/// FileExcel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload FileExcel;
/// <summary>
/// imgbtnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button imgbtnImport;
}
}

View File

@ -0,0 +1,177 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PipelineGrid.aspx.cs" Inherits="FineUIPro.Web.HJGL.DataIn.PipelineGrid" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PDF导入</title>
<style>
.f-grid-row-summary .f-grid-cell-inner {
font-weight: bold;
color: red;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="RegionPanel1" />
<f:HiddenField ID="hdIds" runat="server"></f:HiddenField>
<f:TabStrip ID="TabStrip1" ShowBorder="true" TabPosition="Top" Height="700"
EnableTabCloseMenu="false" ActiveTabIndex="0" runat="server">
<Tabs>
<f:Tab Title="PDF解析表格" BodyPadding="10px" Layout="Fit" runat="server" >
<Items>
<f:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server" Margin="5px">
<Regions>
<f:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center" AutoScroll="true" EnableAjax="true" MinHeight="100px"
BoxConfigAlign="Stretch" BoxConfigPosition="Left" runat="server">
<Items>
</Items>
</f:Region>
</Regions>
</f:RegionPanel>
</Items>
</f:Tab>
<f:Tab Title="大模型优化后" BodyPadding="10px" Layout="Fit" runat="server" >
<Items>
<f:RegionPanel ID="RegionPanel2" ShowBorder="false" runat="server" Margin="5px">
<Regions>
<f:Region ID="Region1" ShowBorder="false" ShowHeader="false" Position="Center" AutoScroll="true" EnableAjax="true" MinHeight="100px"
BoxConfigAlign="Stretch" BoxConfigPosition="Left" runat="server">
<Items>
</Items>
</f:Region>
</Regions>
</f:RegionPanel>
</Items>
</f:Tab>
<f:Tab Title="管道数据" BodyPadding="10px" Layout="Fit" runat="server">
<Items>
<f:RegionPanel ID="RegionPanel3" ShowBorder="false" runat="server" Margin="5px">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" runat="server" ToolbarAlign="Right">
<Items>
<f:HiddenField ID="HiddenField2" runat="server"></f:HiddenField>
<f:Button ID="btnImport" ToolTip="导入数据库" Text="导入数据库" OnClick="btnImport_Click" Icon="SystemSave" runat="server" >
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Regions>
<f:Region ID="Region4" ShowBorder="false" ShowHeader="false" Position="Center" AutoScroll="true" EnableAjax="true" MinHeight="100px"
BoxConfigAlign="Stretch" BoxConfigPosition="Left" runat="server">
<Items>
<f:Grid ID="IsoGrid" ShowBorder="true" ShowHeader="false" Title="管线信息" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ISO_ID" EnableColumnLines="true" DataIDField="ISO_ID"
EnableTextSelection="True" EnableRowDoubleClickEvent="true" OnRowDoubleClick="IsoGrid_RowDoubleClick" AllowColumnLocking="true">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" Locked="true"/>
<f:RenderField HeaderText="单线图号" ColumnID="ISO_IsoNo" DataField="ISO_IsoNo" SortField="ISO_IsoNo"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px" Locked="true">
</f:RenderField>
<f:RenderField HeaderText="管道等级" ColumnID="IDName" DataField="IDName" SortField="IDName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px" Locked="true">
</f:RenderField>
<f:TemplateField Width="90px" HeaderText="管道等级" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# ConvertIsoClass(Eval("ISC_ID")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField Width="90px" HeaderText="执行标准" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# ConvertISOExecutive(Eval("ISO_Executive")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField Width="90px" HeaderText="材质" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# ConvertSteel(Eval("STE_ID")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField Width="90px" HeaderText="材质标准" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# ConvertMaterialStandard(Eval("MaterialStandardId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField Width="90px" HeaderText="介质" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label5" runat="server" Text='<%# ConvertHJGLBSService(Eval("SER_ID")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="90px" ColumnID="ISO_Dia" DataField="ISO_Dia" FieldType="Double"
HeaderText="外径" HeaderTextAlign="Center" TextAlign="Right">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="ISO_Sch" DataField="ISO_Sch" FieldType="Double"
HeaderText="壁厚" HeaderTextAlign="Center" TextAlign="Right">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="PressureTestPackageNo" DataField="PressureTestPackageNo"
SortField="PressureTestPackageNo" FieldType="String" HeaderText="试压包号" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="OperatingPressure" DataField="OperatingPressure"
SortField="OperatingPressure" FieldType="String" HeaderText="操作压力" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="OperatingTemperature" DataField="OperatingTemperature"
SortField="OperatingTemperature" FieldType="String" HeaderText="操作温度" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="PipeLineClass" DataField="PipeLineClass" SortField="PipeLineClass"
FieldType="String" HeaderText="管道类别" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="PipeLineLength" DataField="PipeLineLength"
SortField="PipeLineLength" FieldType="Float" HeaderText="管线长度" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="ISO_Paint" DataField="ISO_Paint" SortField="ISO_Paint"
FieldType="String" HeaderText="涂漆类别" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField ColumnID="ISO_Insulator" DataField="ISO_Insulator" SortField="ISO_Insulator"
FieldType="String" HeaderText="绝热类别" HeaderTextAlign="Center" TextAlign="Left"
Width="100px">
</f:RenderField>
<f:RenderField HeaderText="设计压力" ColumnID="ISO_DesignPress" DataField="ISO_DesignPress"
FieldType="Double" HeaderTextAlign="Center" TextAlign="Right" Width="90px">
</f:RenderField>
<f:RenderField HeaderText="设计温度" ColumnID="ISO_DesignTemperature" DataField="ISO_DesignTemperature"
FieldType="Double" HeaderTextAlign="Center" TextAlign="Right" Width="90px">
</f:RenderField>
<f:RenderField HeaderText="耐压试验" ColumnID="ISO_TestPress" DataField="ISO_TestPress"
FieldType="Double" HeaderTextAlign="Center" TextAlign="Right" Width="90px">
</f:RenderField>
<f:RenderField HeaderText="泄露性试验" ColumnID="LeakageTest" DataField="LeakageTest"
FieldType="String" HeaderTextAlign="Center" TextAlign="Right" Width="90px">
</f:RenderField>
<f:RenderField HeaderText="检测类别序号" ColumnID="TestCategoryNum" DataField="TestCategoryNum"
SortField="TestCategoryNum" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="100px">
</f:RenderField>
<f:RenderField HeaderText="备注" ColumnID="ISO_Remark" DataField="ISO_Remark" SortField="ISO_Remark"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
</f:Region>
</Regions>
</f:RegionPanel>
</Items>
</f:Tab>
</Tabs>
</f:TabStrip>
</form>
<f:Window ID="Window1" Title="管线信息维护" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Width="1000px" Height="600px">
</f:Window>
</body>
</html>

View File

@ -0,0 +1,770 @@
using BLL;
using FineUIPro.Web.HJGL.WeldingManage;
using FineUIPro.Web.HJGLServer.BaseInfo;
using Model;
using Newtonsoft.Json.Linq;
using Org.BouncyCastle.Asn1.Tsp;
using Spire.Pdf;
using Spire.Pdf.Utilities;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class PipelineGrid : PageBase
{
public string fileUrl
{
get
{
return (string)ViewState["fileUrl"];
}
set
{
ViewState["fileUrl"] = value;
}
}
public string ckbSkipFirst
{
get
{
return (string)ViewState["ckbSkipFirst"];
}
set
{
ViewState["ckbSkipFirst"] = value;
}
}
private string IsPDMS
{
get
{
return (string)ViewState["IsPDMS"];
}
set
{
ViewState["IsPDMS"] = value;
}
}
public DataSet set
{
get
{
return (DataSet)ViewState["set"];
}
set
{
ViewState["set"] = value;
}
}
public DataSet setAfterProcess
{
get
{
return (DataSet)ViewState["setAfterProcess"];
}
set
{
ViewState["setAfterProcess"] = value;
}
}
public List<Model.HJGL_PW_IsoInfo> isoList
{
get
{
return (List<Model.HJGL_PW_IsoInfo>)Session["isoList"];
}
set
{
Session["isoList"] = value;
}
}
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
fileUrl = Request.Params["fileUrl"];
ckbSkipFirst = Request.Params["ckbSkipFirst"];
set = new DataSet();
setAfterProcess = new DataSet();
isoList = new List<HJGL_PW_IsoInfo>();
InitGrid();
}
}
#endregion
/// <summary>
/// 关闭弹出窗
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void InitGrid()
{
// 加载PDF文档
PdfDocument pdf = new PdfDocument();
if (!File.Exists(fileUrl))
{
return;
}
pdf.LoadFromFile(fileUrl);
PdfTableExtractor extractor = new PdfTableExtractor(pdf);
// 遍历每一页
int i = 0;
if (ckbSkipFirst == "1")
{
i = 1;
}
var units = from x in Funs.DB.Base_Unit
join y in Funs.DB.Project_Unit on x.UnitId equals y.UnitId
where y.ProjectId == CurrUser.LoginProjectId
select x;
var installs = from x in Funs.DB.Project_Installation where x.ProjectId == this.CurrUser.LoginProjectId select x;
var steels = from x in Funs.DB.HJGL_BS_Steel select x;
var materialStandards = from x in Funs.DB.HJGL_BS_MaterialStandard select x;
var rates = from x in Funs.DB.HJGL_BS_NDTRate select x;
var types = from x in Funs.DB.HJGL_BS_JointType select x;
var methods = from x in Funs.DB.HJGL_BS_WeldMethod select x;
var materials = from x in Funs.DB.HJGL_BS_WeldMaterial select x;
var services = from x in Funs.DB.HJGL_BS_Service select x;
var slopeTypes = from x in Funs.DB.HJGL_BS_SlopeType select x;
var isoClasss = from x in Funs.DB.HJGL_BS_IsoClass select x;
var components = from x in Funs.DB.HJGL_BS_Component select x;
var dns = from x in Funs.DB.HJGL_BS_SchTab select x;
var execStandards = from x in Funs.DB.HJGL_BS_ExecStandard select x;
var dataInTemp = from x in Funs.DB.HJGL_Sys_DataInTemp
where x.ProjectId == this.CurrUser.LoginProjectId && x.UserId == this.CurrUser.UserId && x.Type == this.IsPDMS
select x;
var users = from x in Funs.DB.Sys_User select x;
for (; i < pdf.Pages.Count; i++)
{
PdfPageBase page = pdf.Pages[i];
// 提取页面中的表格
PdfTable[] tables = extractor.ExtractTable(i);
// 输出找到的表格数量
Console.WriteLine($"第 {i + 1} 页找到 {tables.Length} 个表格");
// 遍历提取到的表格
for (int j = 0; j < tables.Length; j++)
{
PdfTable table = tables[j];
DataTable dtTemp = new DataTable();
for (int col = 0; col < table.GetColumnCount(); col++)
{
dtTemp.Columns.Add("col" + col);
}
// 遍历表格的行列
for (int row = 0; row < table.GetRowCount(); row++)
{
DataRow rowData = dtTemp.NewRow();
dtTemp.Rows.Add(rowData);
for (int col = 0; col < table.GetColumnCount(); col++)
{
string text = table.GetText(row, col);
rowData[col] = table.GetText(row, col);
Console.Write($"{text}\t");
}
Console.WriteLine(); // 换行
}
if (dtTemp.Rows.Count > 0 && dtTemp.Columns.Count > 1)
{// 2. 转换为CSV
string csvContent = ConvertDataTableToCsv(dtTemp);
Console.WriteLine("生成的CSV内容");
Console.WriteLine(csvContent);
// 3. 上传到服务器
string uploadUrl = "http://localhost:8000/api/table/clean"; // 替换为实际上传地址
string fileName = $"data_{DateTime.Now:yyyyMMddHHmmss}.csv";
//"管线号", "公称直径", "管道等级", "管道材料", "主要介质", "起止点", "操作参数温度", "操作参数压力", "设计参数温度", "设计参数压力", "隔热工程代号", "隔热材料", "厚度", "介质", "压力", "比例", "方法", "合格等级", "PID尾号", "压力管道类别", "应力分析题号", "备注"
try
{
Grid grid = new Grid();
grid.ShowGridHeader = true;
grid.Title = dtTemp.TableName;
grid.AllowColumnLocking = true;
grid.DataKeyNames = new string[] { "Id" };
foreach (DataColumn dc in dtTemp.Columns)
{
grid.Columns.Add(new BoundField() { DataField = dc.ColumnName, HeaderText = dc.ColumnName });
}
grid.DataSource = dtTemp;
grid.DataBind();
Region2.Items.Add(grid);
set.Tables.Add(dtTemp);
string response = UploadCsvFile(csvContent, uploadUrl, fileName);
Grid grid1 = new Grid();
grid1.ShowGridHeader = true;
grid1.Title = dtTemp.TableName;
grid1.AllowColumnLocking = true;
grid1.DataKeyNames = new string[] { "Id" };
JObject dynamicObj = JObject.Parse(response);
DataTable dtAfterProcess = new DataTable();
foreach (JToken employeeToken in dynamicObj["headers"])
{
dtAfterProcess.Columns.Add(employeeToken.ToString());
grid1.Columns.Add(new BoundField() { DataField = employeeToken.ToString(), HeaderText = employeeToken.ToString() });
}
dtAfterProcess.Columns.Add("Id");
foreach (JToken rowData in dynamicObj["rows"])
{
int index = 0;
var row = dtAfterProcess.NewRow();
var datas = rowData.ToList();
row["Id"] = Guid.NewGuid().ToString();
foreach (var d in datas)
{
row[index] = d.ToString(); index++;
}
dtAfterProcess.Rows.Add(row);
}
grid1.DataSource = dtAfterProcess;
grid1.DataBind();
Region1.Items.Add(grid1);
setAfterProcess.Tables.Add(dtAfterProcess);
string urlHeaderCorrespondence = "http://localhost:8000/api/table/head";
string data = @"{
""source_headers"": " + dynamicObj["headers"].ToString() + @" ,
""target_fields"": [
""线"",
"""",
"""",
"""",
"""",
"""",
"""",
"""",
"""",
"""",
"""",
"""",
"""",
"""",
"""",
"""",
"""",
""线"",
"""",
"""",
""""
],
""extra_instructions"": ""线线 Main Fluid ""
}
";
string resHeaderCorrespondence = HeaderCorrespondence(urlHeaderCorrespondence, data, "POST", "application/json;charset=utf-8");
if (!string.IsNullOrEmpty(resHeaderCorrespondence))
{
JObject dynamicHeaderCorrespondence = JObject.Parse(resHeaderCorrespondence);
Dictionary<string, string> headerCorrespondenceDic = new Dictionary<string, string>();
foreach (JToken employeeToken in dynamicHeaderCorrespondence["mapping"])
{
headerCorrespondenceDic.Add(employeeToken["source_header"].ToString(), employeeToken["target_field"].ToString());
}
foreach (DataRow row in dtAfterProcess.Rows)
{
HJGL_PW_IsoInfo isoInfo = new HJGL_PW_IsoInfo();
isoInfo.ISO_ID = Guid.NewGuid().ToString();
isoInfo.ISO_CreateDate = DateTime.Now;
isoInfo.ISO_Creator = CurrUser.UserCode;
isoInfo.ProjectId = CurrUser.LoginProjectId;
isoInfo.BSU_ID = CurrUser.UnitId;
isoInfo.IsHot = "0";
foreach (DataColumn dataColumn in dtAfterProcess.Columns)
{
if (headerCorrespondenceDic.ContainsKey(dataColumn.ColumnName))
switch (headerCorrespondenceDic[dataColumn.ColumnName])
{
case "管线号":
isoInfo.ISO_IsoNo = row[dataColumn.ColumnName].ToString();
break;
case "管道等级":
isoInfo.ISC_ID = isoClasss.Where(x=>x.ISC_IsoName==row[dataColumn.ColumnName].ToString()|| x.ISC_IsoCode == row[dataColumn.ColumnName].ToString()).Select(x=>x.ISC_ID).FirstOrDefault();
break;
case "执行标准":
isoInfo.ISO_Executive = execStandards.Where(x=>x.ExecStandardName== row[dataColumn.ColumnName].ToString()).Select(x=>x.ExecStandardId).FirstOrDefault();
break;
case "材质":
isoInfo.STE_ID = steels.Where(x => x.STE_Code == row[dataColumn.ColumnName].ToString()).Select(x => x.STE_ID).FirstOrDefault();
break;
case "材质标准":
isoInfo.MaterialStandardId = materialStandards.Where(x => x.MaterialStandardName == row[dataColumn.ColumnName].ToString()||x.MaterialStandardCode == row[dataColumn.ColumnName].ToString()).Select(x => x.MaterialStandardId).FirstOrDefault();
break;
case "介质":
isoInfo.SER_ID = services.Where(x => x.SER_Name == row[dataColumn.ColumnName].ToString() || x.SER_Code == row[dataColumn.ColumnName].ToString()).Select(x => x.SER_ID).FirstOrDefault();
break;
case "管道类别":
isoInfo.PipeLineClass = row[dataColumn.ColumnName].ToString();
break;
case "涂漆类别":
isoInfo.ISO_Paint = row[dataColumn.ColumnName].ToString();
break;
case "绝热类别":
isoInfo.ISO_Insulator = row[dataColumn.ColumnName].ToString();
break;
case "操作压力":
isoInfo.OperatingPressure = row[dataColumn.ColumnName].ToString();
break;
case "操作温度":
isoInfo.OperatingTemperature = row[dataColumn.ColumnName].ToString();
break;
case "泄露性试验":
isoInfo.LeakageTest = row[dataColumn.ColumnName].ToString();
break;
case "设计压力":
isoInfo.ISO_DesignPress = Funs.GetNewDecimal(row[dataColumn.ColumnName].ToString());
break;
case "设计温度":
isoInfo.ISO_DesignTemperature = Funs.GetNewDecimal(row[dataColumn.ColumnName].ToString());
break;
case "耐压试验":
isoInfo.ISO_TestPress = Funs.GetNewDecimal(row[dataColumn.ColumnName].ToString());
break;
case "外径":
isoInfo.ISO_Dia = Funs.GetNewDecimal(row[dataColumn.ColumnName].ToString());
break;
case "壁厚":
isoInfo.ISO_Sch = Funs.GetNewDecimal(row[dataColumn.ColumnName].ToString());
break;
case "管线长度":
isoInfo.PipeLineLength = Funs.GetNewDecimal(row[dataColumn.ColumnName].ToString());
break;
case "检测类别序号":
isoInfo.TestCategoryNum = row[dataColumn.ColumnName].ToString();
break;
case "热处理类型":
{
if (!string.IsNullOrEmpty(row[dataColumn.ColumnName].ToString()))
{
isoInfo.IsHotType = row[dataColumn.ColumnName].ToString();
isoInfo.IsHot = "1";
}
}
break;
case "备注":
isoInfo.ISO_Remark = row[dataColumn.ColumnName].ToString();
break;
}
}
isoList.Add(isoInfo);
}
}
}
catch (Exception e11)
{
}
}
Console.WriteLine($"\n--- 表格 {j + 1} ---");
}
}
this.IsoGrid.DataSource = this.isoList;
this.IsoGrid.DataBind();
}
/// <summary>
/// 将DataTable转换为标准CSV格式字符串
/// </summary>
/// <param name="dt">待转换的DataTable</param>
/// <returns>CSV格式字符串</returns>
public static string ConvertDataTableToCsv(DataTable dt)
{
if (dt == null || dt.Rows.Count == 0)
throw new ArgumentNullException(nameof(dt), "DataTable不能为空或无数据");
StringBuilder csvBuilder = new StringBuilder();
// 1. 写入表头(列名)
for (int i = 0; i < dt.Columns.Count; i++)
{
// 处理表头中的特殊字符
csvBuilder.Append(EscapeCsvValue(dt.Columns[i].ColumnName));
if (i < dt.Columns.Count - 1)
csvBuilder.Append(",");
}
csvBuilder.AppendLine();
// 2. 写入数据行
foreach (DataRow row in dt.Rows)
{
for (int i = 0; i < dt.Columns.Count; i++)
{
// 处理单元格中的特殊字符
string cellValue = row[i] == DBNull.Value ? "" : row[i].ToString();
csvBuilder.Append(EscapeCsvValue(cellValue));
if (i < dt.Columns.Count - 1)
csvBuilder.Append(",");
}
csvBuilder.AppendLine();
}
return csvBuilder.ToString();
}
/// <summary>
/// 转义CSV中的特殊字符处理逗号、换行、引号
/// </summary>
/// <param name="value">原始值</param>
/// <returns>转义后的值</returns>
private static string EscapeCsvValue(string value)
{
if (string.IsNullOrEmpty(value))
return "";
// 如果包含逗号、换行符、双引号,需要用双引号包裹,并将内部双引号替换为两个双引号
if (value.Contains(",") || value.Contains("\n") || value.Contains("\r") || value.Contains("\""))
{
return "\"" + value.Replace("\"", "\"\"") + "\"";
}
return value;
}
/// <summary>
/// 将CSV字符串保存为临时文件并上传到指定服务器
/// </summary>
/// <param name="csvContent">CSV内容</param>
/// <param name="uploadUrl">服务器上传接口地址</param>
/// <param name="fileName">上传的文件名</param>
/// <param name="timeout">超时时间毫秒默认30秒</param>
/// <returns>服务器返回的响应内容</returns>
public static string UploadCsvFile(string csvContent, string uploadUrl, string fileName, int timeout = 300000)
{
// 定义分隔符(随机生成避免冲突)
string boundary = "----WebKitFormBoundary" + Guid.NewGuid().ToString("N");
byte[] boundaryBytes = Encoding.UTF8.GetBytes("\r\n--" + boundary + "\r\n");
// 创建内存流存储请求内容
using (MemoryStream ms = new MemoryStream())
{
// 1. 写入表单字段头
ms.Write(boundaryBytes, 0, boundaryBytes.Length);
// 2. 写入文件内容头
string fileHeader =
$"Content-Disposition: form-data; name=\"file\"; filename=\"{fileName}\"\r\n" +
"Content-Type: text/csv; charset=utf-8\r\n\r\n";
byte[] fileHeaderBytes = Encoding.UTF8.GetBytes(fileHeader);
ms.Write(fileHeaderBytes, 0, fileHeaderBytes.Length);
// 3. 写入CSV内容
byte[] csvBytes = Encoding.UTF8.GetBytes(csvContent);
ms.Write(csvBytes, 0, csvBytes.Length);
// 4. 写入结束边界
byte[] endBoundaryBytes = Encoding.UTF8.GetBytes("\r\n--" + boundary + "--\r\n");
ms.Write(endBoundaryBytes, 0, endBoundaryBytes.Length);
// 5. 创建HTTP请求
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uploadUrl);
request.Method = "POST";
request.ContentType = "multipart/form-data; boundary=" + boundary;
request.ContentLength = ms.Length;
request.Timeout = timeout;
request.KeepAlive = true;
// 6. 写入请求数据
using (Stream requestStream = request.GetRequestStream())
{
ms.Position = 0;
ms.CopyTo(requestStream);
}
// 7. 获取响应
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
using (Stream responseStream = response.GetResponseStream())
using (StreamReader reader = new StreamReader(responseStream, Encoding.UTF8))
{
return reader.ReadToEnd();
}
}
}
public static string HeaderCorrespondence(string uploadUrl, string data, string method, string contenttype)
{
// 5. 创建HTTP请求
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uploadUrl);
request.Method = string.IsNullOrEmpty(method) ? "GET" : method;
request.ContentType = string.IsNullOrEmpty(contenttype) ? "application/json;charset=utf-8" : contenttype;
if (uploadUrl.IndexOf("https") >= 0)
{
request.ProtocolVersion = HttpVersion.Version10;
}
if (!string.IsNullOrEmpty(data))
{
Stream RequestStream = request.GetRequestStream();
byte[] bytes = Encoding.UTF8.GetBytes(data);
RequestStream.Write(bytes, 0, bytes.Length);
RequestStream.Close();
}
HttpWebResponse response = null;
Stream ResponseStream = null;
StreamReader StreamReader = null;
try
{
response = (HttpWebResponse)request.GetResponse();
ResponseStream = response.GetResponseStream();
StreamReader = new StreamReader(ResponseStream, Encoding.GetEncoding("utf-8"));
string re = StreamReader.ReadToEnd();
StreamReader.Close();
ResponseStream.Close();
return re;
}
catch (WebException ex)
{
response = (HttpWebResponse)ex.Response;
ResponseStream = response.GetResponseStream();
StreamReader = new StreamReader(ResponseStream, Encoding.GetEncoding("utf-8"));
string re = StreamReader.ReadToEnd();
return re;
}
finally
{
if (StreamReader != null)
{
StreamReader.Close();
}
if (ResponseStream != null)
{
ResponseStream.Close();
}
if (response != null)
{
response.Close();
}
}
}
protected void IsoGrid_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
HJGL_PW_IsoInfo iso = null;
foreach (var item in isoList)
{
if (item.ISO_ID == IsoGrid.SelectedRowID)
{
iso = item;
break;
}
}
if (PipelineInEdit.dic.ContainsKey(IsoGrid.SelectedRowID))
{
PipelineInEdit.dic[IsoGrid.SelectedRowID] = iso;
}
else
{
PipelineInEdit.dic.Add(IsoGrid.SelectedRowID, iso);
}
hdIds.Text = "";
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(hdIds.ClientID) + Window1.GetShowReference(String.Format("PipelineInEdit.aspx?ISO_ID={0}", IsoGrid.SelectedRowID, "编辑 - ")));
}
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
if (!string.IsNullOrEmpty(hdIds.Text))
{
HJGL_PW_IsoInfo iso = null;
foreach (var item in isoList)
{
if (item.ISO_ID == hdIds.Text)
{
iso = item;
break;
}
}
for (int i = 0; i < isoList.Count; i++)
{
isoList[i].ISO_Remark = iso.ISO_Remark;
isoList[i].ISO_ID = iso.ISO_ID;
isoList[i].ProjectId = iso.ProjectId;
isoList[i].BSU_ID = iso.BSU_ID;
isoList[i].SER_ID = iso.SER_ID;
isoList[i].BAW_ID = iso.BAW_ID;
isoList[i].ISO_IsoNo = iso.ISO_IsoNo;
isoList[i].ISO_TotalDin = iso.ISO_TotalDin;
isoList[i].ISO_Paint = iso.ISO_Paint;
isoList[i].ISO_Insulator = iso.ISO_Insulator;
isoList[i].STE_ID = iso.STE_ID;
isoList[i].ISO_Executive = iso.ISO_Executive;
isoList[i].ISO_Dia = iso.ISO_Dia;
isoList[i].ISO_Sch = iso.ISO_Sch;
isoList[i].ISO_Modifier = iso.ISO_Modifier;
isoList[i].ISO_ModifyDate = iso.ISO_ModifyDate;
isoList[i].ISO_Creator = iso.ISO_Creator;
isoList[i].ISO_CreateDate = iso.ISO_CreateDate;
isoList[i].ISO_DesignPress = iso.ISO_DesignPress;
isoList[i].ISO_DesignTemperature = iso.ISO_DesignTemperature;
isoList[i].ISO_TestPress = iso.ISO_TestPress;
isoList[i].ISO_TestTemperature = iso.ISO_TestTemperature;
isoList[i].ISC_ID = iso.ISC_ID;
isoList[i].ISO_Remark = iso.ISO_Remark;
isoList[i].MaterialStandardId = iso.MaterialStandardId;
isoList[i].PressureTestPackageNo = iso.PressureTestPackageNo;
isoList[i].OperatingPressure = iso.OperatingPressure;
isoList[i].OperatingTemperature = iso.OperatingTemperature;
isoList[i].PipeLineClass = iso.PipeLineClass;
isoList[i].PipeLineLength = iso.PipeLineLength;
isoList[i].LeakageTest = iso.LeakageTest;
isoList[i].TestCategoryNum = iso.TestCategoryNum;
isoList[i].IsHot = iso.IsHot;
isoList[i].IsHotType = iso.IsHotType;
isoList[i].Joty_B_Rate = iso.Joty_B_Rate;
isoList[i].Joty_C_Rate = iso.Joty_C_Rate;
isoList[i].Joty_D_Rate = iso.Joty_D_Rate;
isoList[i].Joty_B_Level = iso.Joty_B_Level;
isoList[i].Joty_C_Level = iso.Joty_C_Level;
isoList[i].Joty_D_Level = iso.Joty_D_Level;
isoList[i].Specification = iso.Specification;
}
}
this.IsoGrid.DataSource = this.isoList;
this.IsoGrid.DataBind();
}
public static string ConvertSteel(object STE_ID)
{
if (STE_ID != null)
{
var steel= Funs.DB.HJGL_BS_Steel.FirstOrDefault(x => x.STE_ID == STE_ID.ToString());
if (steel != null)
{
return steel.STE_Code;
}
}
return null;
}
public static string ConvertISOExecutive(object ExecStandardId)
{
if (ExecStandardId != null)
{
var execStandard = Funs.DB.HJGL_BS_ExecStandard.FirstOrDefault(x => x.ExecStandardId == ExecStandardId.ToString());
if (execStandard != null)
{
return execStandard.ExecStandardName;
}
}
return null;
}
public static string ConvertMaterialStandard(object MaterialStandardId)
{
if (MaterialStandardId != null)
{
var materialStandard = Funs.DB.HJGL_BS_MaterialStandard.FirstOrDefault(x => x.MaterialStandardId == MaterialStandardId.ToString());
if (materialStandard != null)
{
return materialStandard.MaterialStandardName;
}
}
return null;
}
public static string ConvertHJGLBSService(object SER_ID)
{
if (SER_ID != null)
{
var service = Funs.DB.HJGL_BS_Service.FirstOrDefault(x => x.SER_ID == SER_ID.ToString());
if (service != null)
{
return service.SER_Name;
}
}
return null;
}
public static string ConvertIsoClass(object ISC_ID)
{
if (ISC_ID != null)
{
var isoClass = Funs.DB.HJGL_BS_IsoClass.FirstOrDefault(x => x.ISC_ID == ISC_ID.ToString());
if (isoClass != null)
{
return isoClass.ISC_IsoName;
}
}
return null;
}
protected void btnImport_Click(object sender, EventArgs e)
{
try
{
if (isoList.Count() > 0)
{
Funs.DB.HJGL_PW_IsoInfo.InsertAllOnSubmit(isoList);
Funs.DB.SubmitChanges();
}
isoList.Clear();
this.IsoGrid.DataSource = this.isoList;
this.IsoGrid.DataBind();
Alert.ShowInTop("导入成功!", MessageBoxIcon.Success);
}
catch (SqlException ex)
{
throw;
}
}
}
}

View File

@ -0,0 +1,197 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class PipelineGrid
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// hdIds 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdIds;
/// <summary>
/// TabStrip1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TabStrip TabStrip1;
/// <summary>
/// RegionPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RegionPanel RegionPanel1;
/// <summary>
/// Region2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Region Region2;
/// <summary>
/// RegionPanel2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RegionPanel RegionPanel2;
/// <summary>
/// Region1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Region Region1;
/// <summary>
/// RegionPanel3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RegionPanel RegionPanel3;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// HiddenField2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField HiddenField2;
/// <summary>
/// btnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary>
/// Region4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Region Region4;
/// <summary>
/// IsoGrid 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid IsoGrid;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label1;
/// <summary>
/// Label2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label2;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label3;
/// <summary>
/// Label4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label4;
/// <summary>
/// Label5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label5;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
}
}

View File

@ -0,0 +1,209 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PipelineInEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.DataIn.PipelineInEdit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</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="VBox"
AutoScroll="false">
<Items>
<f:TabStrip ID="TabStrip1" CssClass="f-tabstrip-theme-simple" ShowBorder="false"
Height="430px" TabPosition="Top" MarginBottom="5px" EnableTabCloseMenu="false"
runat="server" OnTabIndexChanged="TabStrip1_TabIndexChanged" AutoPostBack="true">
<Tabs>
<f:Tab ID="Tab1" Title="单线图号" BodyPadding="5px" Layout="VBox" IconFont="Bookmark"
runat="server" AutoScroll="true">
<Items>
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BodyPadding="10px"
runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:TextBox ID="txtISO_IsoNoS" runat="server" Label="单线图号" LabelAlign="Right" Width="320px">
</f:TextBox>
<f:Button ID="btnCopy" Icon="DiskDownload" runat="server" Text="引用" OnClick="btnCopy_Click">
</f:Button>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="提交" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtISO_IsoNo" Label="单线图号" ShowRedStar="true" Required="true" runat="server"
FocusOnPageLoad="true" LabelWidth="100px">
</f:TextBox>
<f:DropDownList ID="drpBUS_ID" Label="单位" runat="server" Required="true" ShowRedStar="true"
EnableEdit="true" LabelWidth="100px">
</f:DropDownList>
<f:DropDownList ID="drpIDName" Label="管道等级" runat="server" EnableEdit="true" LabelWidth="100px"
Required="true" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="DrpList_SelectedIndexChanged">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpExecStandard" Label="执行标准" runat="server" ShowRedStar="true"
Required="true" EnableEdit="true" LabelWidth="100px" AutoPostBack="true" OnSelectedIndexChanged="DrpList_SelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="drpSTEName" Label="材质" runat="server" ShowRedStar="true" Required="true"
EnableEdit="true" LabelWidth="100px">
</f:DropDownList>
<f:DropDownList ID="drpMaterialStandardId" Label="材质标准" runat="server" EnableEdit="true"
LabelWidth="100px" Required="true" ShowRedStar="true">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpSER" Label="介质" runat="server" ShowRedStar="true" Required="true"
EnableEdit="true" LabelWidth="100px" AutoPostBack="true" OnSelectedIndexChanged="DrpList_SelectedIndexChanged">
</f:DropDownList>
<f:TextBox ID="txtServiceAbbreviate" Label="介质缩写" runat="server" LabelWidth="100px"
Readonly="true">
</f:TextBox>
<f:TextBox ID="txtPressureTestPackageNo" Label="试压包号" runat="server" LabelWidth="100px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpPipeLineClass" runat="server" Label="管道类别" LabelWidth="100px" Required="true" ShowRedStar="true">
</f:DropDownList>
<f:TextBox ID="txtISO_Paint" Label="涂漆类别" runat="server" LabelWidth="100px" Required="true" ShowRedStar="true">
</f:TextBox>
<f:TextBox ID="txtISO_Insulator" Label="绝热类别" runat="server" LabelWidth="100px" Required="true" ShowRedStar="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtOperatingPressure" Label="操作压力" runat="server" LabelWidth="100px" Required="true" ShowRedStar="true">
</f:TextBox>
<f:TextBox ID="txtOperatingTemperature" Label="操作温度" runat="server" LabelWidth="100px" Required="true" ShowRedStar="true">
</f:TextBox>
<f:TextBox ID="txtLeakageTest" Label="泄露性试验" runat="server" LabelWidth="100px" Required="true" ShowRedStar="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox ID="txtISO_DesignPress" Label="设计压力" runat="server" DecimalPrecision="4"
LabelWidth="100px" Required="true" ShowRedStar="true">
</f:NumberBox>
<f:NumberBox ID="txtISO_DesignTemperature" Label="设计温度" runat="server" DecimalPrecision="4"
LabelWidth="100px" Required="true" ShowRedStar="true">
</f:NumberBox>
<f:NumberBox ID="txtISO_TestPress" Label="耐压试验" runat="server" DecimalPrecision="4"
LabelWidth="100px" Required="true" ShowRedStar="true">
</f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox ID="txtDia" Label="外径" runat="server" LabelWidth="100px" DecimalPrecision="2"
NoNegative="true" Required="true" ShowRedStar="true">
</f:NumberBox>
<f:NumberBox ID="txtSch" Label="壁厚" runat="server" LabelWidth="100px" DecimalPrecision="2"
NoNegative="true" Required="true" ShowRedStar="true">
</f:NumberBox>
<f:NumberBox ID="txtPipeLineLength" Label="管线长度" runat="server" DecimalPrecision="4"
LabelWidth="100px" Required="true" ShowRedStar="true">
</f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtTestCategoryNum" Label="检测类别序号" runat="server" LabelWidth="100px" Readonly="true" Required="true" ShowRedStar="true">
</f:TextBox>
<f:DropDownList ID="drpIsHot" Label="是否热处理" runat="server" LabelWidth="100px" AutoPostBack="true"
OnSelectedIndexChanged="drpIsHot_SelectedIndexChanged">
<f:ListItem Value="0" Text="否" />
<f:ListItem Value="1" Text="是" />
</f:DropDownList>
<f:DropDownBox runat="server" Label="热处理类型" ID="drpIsHotType" DataControlID="RadioButtonList1"
EnableMultiSelect="true" Required="true" ShowRedStar="true" LabelAlign="Right"
Hidden="true">
<PopPanel>
<f:SimpleForm ID="SimpleForm3" BodyPadding="10px" runat="server" AutoScroll="true"
ShowBorder="True" ShowHeader="false" Hidden="true">
<Items>
<f:Label ID="Label10" runat="server" Text="请选择热处理类型:">
</f:Label>
<f:CheckBoxList ID="RadioButtonList1" ColumnNumber="1" runat="server">
<f:CheckItem Value="1" Text="预热" />
<f:CheckItem Value="2" Text="消氢" />
<f:CheckItem Value="3" Text="后热" />
<f:CheckItem Value="4" Text="消应力热处理" />
<f:CheckItem Value="5" Text="稳定化处理" />
</f:CheckBoxList>
</Items>
</f:SimpleForm>
</PopPanel>
</f:DropDownBox>
<f:CheckBox ID="ckAll" runat="server" Checked="true" Text="是否批量修改"></f:CheckBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtISO_Remark" Label="备注" runat="server" LabelWidth="100px">
</f:TextBox>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:Tab>
</Tabs>
</f:TabStrip>
</Items>
<Items>
<f:Form ID="Form2" runat="server" ShowHeader="false" ShowBorder="false" MarginRight="10px" Height="100px" RedStarPosition="BeforeText">
<Items>
<f:FormRow ColumnWidths="30% 20% 30% 20%">
<Items>
<f:DropDownList ID="drpJoty_B_Rate" runat="server" Label="对接焊缝检测比例" LabelWidth="160px" LabelAlign="Right" EnableEdit="true" Required="true" ShowRedStar="true">
</f:DropDownList>
<f:DropDownList ID="drpJoty_Level" Label="合格等级" runat="server" LabelAlign="Right" LabelWidth="90px" Required="true" ShowRedStar="true">
</f:DropDownList>
<%--<f:TextBox ID="txtJoty_Level" Label="合格等级" runat="server" LabelAlign="Right" Readonly="true">
</f:TextBox>--%>
<f:DropDownList ID="drpJoty_C_Rate" runat="server" Label="角焊缝检测比例" LabelWidth="160px" LabelAlign="Right" EnableEdit="true" Required="true" ShowRedStar="true">
</f:DropDownList>
<f:DropDownList ID="drpJoty_C_Level" Label="合格等级" runat="server" LabelAlign="Right" LabelWidth="90px" Required="true" ShowRedStar="true">
</f:DropDownList>
<%-- <f:TextBox ID="txtJoty_C_Level" Label="合格等级" runat="server" LabelAlign="Right" Readonly="true">
</f:TextBox>--%>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="30% 20% 50%">
<Items>
<f:DropDownList ID="drpJoty_D_Rate" runat="server" Label="支管连接接头检测比例" LabelWidth="160px" LabelAlign="Right" EnableEdit="true" Required="true" ShowRedStar="true">
</f:DropDownList>
<f:DropDownList ID="drpJoty_D_Level" Label="合格等级" runat="server" LabelAlign="Right" LabelWidth="90px" Required="true" ShowRedStar="true">
</f:DropDownList>
<%-- <f:TextBox ID="txtJoty_D_Level" Label="合格等级" runat="server" LabelAlign="Right" Readonly="true">
</f:TextBox>--%>
<f:Label ID="Label3" runat="server">
</f:Label>
</Items>
</f:FormRow>
</Items>
</f:Form>
</Items>
</f:Panel>
</form>
</body>
</html>

View File

@ -0,0 +1,915 @@
using BLL;
using FastReport.Editor;
using Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class PipelineInEdit : PageBase
{
public static Dictionary<string, HJGL_PW_IsoInfo> dic = new Dictionary<string, HJGL_PW_IsoInfo>();
private string ISO_ID
{
get
{
return (string)ViewState["ISO_ID"];
}
set
{
ViewState["ISO_ID"] = value;
}
}
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.ISO_ID = string.Empty;
if (!string.IsNullOrEmpty(Request.Params["ISO_ID"]))
{
this.ISO_ID = Request.Params["ISO_ID"];
}
if (Request.Params["type"] == "view")
{
this.btnSave.Hidden = true;
}
var isoInfo = dic[this.ISO_ID];
////初始化页面信息
this.PersonLoad(isoInfo);
}
}
#endregion
#region
/// <summary>
/// 初始化页面信息
/// </summary>
protected void PersonLoad(Model.HJGL_PW_IsoInfo isoInfo)
{
///介质
this.drpSER.DataTextField = "SER_Name";
this.drpSER.DataValueField = "SER_ID";
this.drpSER.DataSource = BLL.HJGL_MediumService.GetBSServiceList();
this.drpSER.DataBind();
Funs.FineUIPleaseSelect(this.drpSER);
///材质
this.drpSTEName.DataTextField = "STE_Code";
this.drpSTEName.DataValueField = "STE_ID";
this.drpSTEName.DataSource = BLL.HJGL_MaterialService.GetSteelList();
this.drpSTEName.DataBind();
Funs.FineUIPleaseSelect(this.drpSTEName);
// 执行标准
this.drpExecStandard.DataTextField = "ExecStandardName";
this.drpExecStandard.DataValueField = "ExecStandardId";
this.drpExecStandard.DataSource = BLL.HJGL_ExecStandardService.GetExecStandardNameList();
this.drpExecStandard.DataBind();
Funs.FineUIPleaseSelect(this.drpExecStandard);
///管道等级
this.drpIDName.DataTextField = "ISC_IsoName";
this.drpIDName.DataValueField = "ISC_ID";
this.drpIDName.DataSource = BLL.HJGL_PipingClassService.GetIsoClassNameList();
this.drpIDName.DataBind();
Funs.FineUIPleaseSelect(this.drpIDName);
this.drpMaterialStandardId.DataTextField = "MaterialStandardCode";
this.drpMaterialStandardId.DataValueField = "MaterialStandardId";
this.drpMaterialStandardId.DataSource = BLL.HJGL_MaterialStandardService.GetMaterialStandardList();
this.drpMaterialStandardId.DataBind();
Funs.FineUIPleaseSelect(this.drpMaterialStandardId);
this.drpPipeLineClass.DataTextField = "Text";
this.drpPipeLineClass.DataValueField = "Value";
this.drpPipeLineClass.DataSource = BLL.DropListService.HJGL_PipeLineClassItem();
this.drpPipeLineClass.DataBind();
Funs.FineUIPleaseSelect(this.drpPipeLineClass);
this.drpBUS_ID.DataTextField = "UnitName";
this.drpBUS_ID.DataValueField = "UnitId";
this.drpBUS_ID.DataSource = BLL.Base_UnitService.GetUnitCodeByProjectIdList(this.CurrUser.LoginProjectId);
this.drpBUS_ID.DataBind();
Funs.FineUIPleaseSelect(this.drpBUS_ID);
if (isoInfo != null)
{
if (CurrUser.Account != Const.Gly)
{
var que = from x in Funs.DB.HJGL_BO_QualityRating where x.ISO_ID == isoInfo.ISO_ID select x;
if (que.Count() > 0)
{
txtISO_IsoNo.Enabled = false;
}
}
this.txtISO_IsoNo.Text = isoInfo.ISO_IsoNo;
if (!string.IsNullOrEmpty(isoInfo.BSU_ID))
{
this.drpBUS_ID.SelectedValue = isoInfo.BSU_ID;
}
if (!string.IsNullOrEmpty(isoInfo.SER_ID))
{
this.drpSER.SelectedValue = isoInfo.SER_ID;
var ser = BLL.HJGL_MediumService.GetServiceBySERID(this.drpSER.SelectedValue);
if (ser != null)
{
this.txtServiceAbbreviate.Text = ser.SER_Abbreviate;
}
}
if (!string.IsNullOrEmpty(isoInfo.STE_ID))
{
this.drpSTEName.SelectedValue = isoInfo.STE_ID;
}
this.txtISO_Paint.Text = isoInfo.ISO_Paint;
this.txtISO_Insulator.Text = isoInfo.ISO_Insulator;
if (!string.IsNullOrEmpty(isoInfo.ISO_Executive))
{
this.drpExecStandard.SelectedValue = isoInfo.ISO_Executive;
}
this.txtISO_DesignPress.Text = isoInfo.ISO_DesignPress.ToString();
this.txtISO_DesignTemperature.Text = isoInfo.ISO_DesignTemperature.ToString();
this.txtISO_TestPress.Text = isoInfo.ISO_TestPress.ToString();
if (!string.IsNullOrEmpty(isoInfo.ISC_ID))
{
this.drpIDName.SelectedValue = isoInfo.ISC_ID;
}
this.txtISO_Remark.Text = isoInfo.ISO_Remark;
if (!string.IsNullOrEmpty(isoInfo.MaterialStandardId))
{
this.drpMaterialStandardId.SelectedValue = isoInfo.MaterialStandardId;
}
if (!string.IsNullOrEmpty(isoInfo.PressureTestPackageNo))
{
this.txtPressureTestPackageNo.Text = isoInfo.PressureTestPackageNo;
}
else
{
this.txtPressureTestPackageNo.Text = "/";
}
this.txtOperatingPressure.Text = isoInfo.OperatingPressure;
this.txtOperatingTemperature.Text = isoInfo.OperatingTemperature;
if (!string.IsNullOrEmpty(isoInfo.PipeLineClass))
{
this.drpPipeLineClass.SelectedValue = isoInfo.PipeLineClass;
}
if (isoInfo.PipeLineLength.HasValue)
{
this.txtPipeLineLength.Text = Convert.ToString(isoInfo.PipeLineLength);
}
this.txtLeakageTest.Text = isoInfo.LeakageTest;
this.txtTestCategoryNum.Text = isoInfo.TestCategoryNum;
if (!string.IsNullOrEmpty(isoInfo.Joty_B_Rate))
{
drpJoty_B_Rate.SelectedValue = isoInfo.Joty_B_Rate;
}
if (!string.IsNullOrEmpty(isoInfo.Joty_C_Rate))
{
drpJoty_C_Rate.SelectedValue = isoInfo.Joty_C_Rate;
}
if (!string.IsNullOrEmpty(isoInfo.Joty_D_Rate))
{
drpJoty_D_Rate.SelectedValue = isoInfo.Joty_D_Rate;
}
if (!string.IsNullOrEmpty(isoInfo.Joty_B_Level))
{
drpJoty_Level.SelectedValue = isoInfo.Joty_B_Level;
}
if (!string.IsNullOrEmpty(isoInfo.Joty_C_Level))
{
drpJoty_C_Level.SelectedValue = isoInfo.Joty_C_Level;
}
if (!string.IsNullOrEmpty(isoInfo.Joty_D_Level))
{
drpJoty_D_Level.SelectedValue = isoInfo.Joty_D_Level;
}
if (!string.IsNullOrEmpty(isoInfo.IsHot))
{
this.drpIsHot.SelectedValue = isoInfo.IsHot;
if (isoInfo.IsHot == "1")
{
this.drpIsHotType.Hidden = false;
if (!string.IsNullOrEmpty(isoInfo.IsHotType))
{
string[] proessTypes = isoInfo.IsHotType.Split('|');
this.drpIsHotType.Values = proessTypes;
}
}
}
if (isoInfo.ISO_Dia != null)
{
this.txtDia.Text = isoInfo.ISO_Dia.ToString();
}
if (isoInfo.ISO_Sch != null)
{
this.txtSch.Text = isoInfo.ISO_Sch.ToString();
}
var weldControl = BLL.HJGL_WeldControlService.GEtWeldControlByISCIDAndExecStandardId(this.drpIDName.SelectedValue, this.drpExecStandard.SelectedValue);
if (weldControl != null)
{
if (!string.IsNullOrEmpty(weldControl.Joty_Rate))
{
var rate = BLL.HJGL_DetectionService.GetNDTRateByNDTRID(weldControl.Joty_Rate);
if (rate != null)
{
this.txtTestCategoryNum.Text = rate.NDTR_Code;
}
drpJoty_B_Rate.SelectedValue = weldControl.Joty_Rate;
}
if (!string.IsNullOrEmpty(weldControl.Joty_Level))
{
this.drpJoty_Level.SelectedValue = weldControl.Joty_Level;
}
if (!string.IsNullOrEmpty(weldControl.Joty_C_Rate))
{
drpJoty_C_Rate.SelectedValue = weldControl.Joty_C_Rate;
}
if (!string.IsNullOrEmpty(weldControl.Joty_C_Level))
{
this.drpJoty_C_Level.SelectedValue = weldControl.Joty_C_Level;
}
if (!string.IsNullOrEmpty(weldControl.Joty_D_Rate))
{
drpJoty_D_Rate.SelectedValue = weldControl.Joty_D_Rate;
}
if (!string.IsNullOrEmpty(weldControl.Joty_D_Level))
{
this.drpJoty_D_Level.SelectedValue = weldControl.Joty_D_Level;
}
}
//txtPressureTestPackageNo.Text = "/";
}
else
{
//选择管道等级、执行标准时,自动添加对接焊缝检测比例、合格等级、支管连接接头检测比例、合格等级、角焊缝检测比例、合格等级
var weldControl = BLL.HJGL_WeldControlService.GEtWeldControlByISCIDAndExecStandardId(this.drpIDName.SelectedValue, this.drpExecStandard.SelectedValue);
if (weldControl != null)
{
if (!string.IsNullOrEmpty(weldControl.Joty_Rate))
{
var rate = BLL.HJGL_DetectionService.GetNDTRateByNDTRID(weldControl.Joty_Rate);
if (rate != null)
{
this.txtTestCategoryNum.Text = rate.NDTR_Code;
}
drpJoty_B_Rate.SelectedValue = weldControl.Joty_Rate;
}
if (!string.IsNullOrEmpty(weldControl.Joty_Level))
{
this.drpJoty_Level.SelectedValue = weldControl.Joty_Level;
}
if (!string.IsNullOrEmpty(weldControl.Joty_C_Rate))
{
drpJoty_C_Rate.SelectedValue = weldControl.Joty_C_Rate;
}
if (!string.IsNullOrEmpty(weldControl.Joty_C_Level))
{
this.drpJoty_C_Level.SelectedValue = weldControl.Joty_C_Level;
}
if (!string.IsNullOrEmpty(weldControl.Joty_D_Rate))
{
drpJoty_D_Rate.SelectedValue = weldControl.Joty_D_Rate;
}
if (!string.IsNullOrEmpty(weldControl.Joty_D_Level))
{
this.drpJoty_D_Level.SelectedValue = weldControl.Joty_D_Level;
}
}
txtPressureTestPackageNo.Text = "/";
}
}
#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.HJGL_PipelineManageMenuId, Const.BtnSave))
{
if (BLL.HJGL_PW_IsoInfoService.IsExistIsoInfoCode(this.txtISO_IsoNo.Text.Trim(), this.CurrUser.LoginProjectId, this.ISO_ID))
{
Alert.ShowInTop("该单线图号已存在!", MessageBoxIcon.Warning);
return;
}
Model.HJGL_PW_IsoInfo iso = dic[ISO_ID]; ;
iso.ProjectId = this.CurrUser.LoginProjectId;
if (this.drpBUS_ID.SelectedValue != BLL.Const._Null)
{
iso.BSU_ID = this.drpBUS_ID.SelectedValue;
}
else
{
Alert.ShowInTop("请选择单位!", MessageBoxIcon.Warning);
return;
}
if (this.drpExecStandard.SelectedValue != BLL.Const._Null)
{
iso.ISO_Executive = this.drpExecStandard.SelectedValue;
}
else
{
Alert.ShowInTop("请选择执行标准!", MessageBoxIcon.Warning);
return;
}
if (this.drpIDName.SelectedValue != BLL.Const._Null)
{
iso.ISC_ID = this.drpIDName.SelectedValue;
}
else
{
Alert.ShowInTop("请选择管道等级!", MessageBoxIcon.Warning);
return;
}
if (this.drpSTEName.SelectedValue != BLL.Const._Null)
{
iso.STE_ID = this.drpSTEName.SelectedValue;
}
else
{
Alert.ShowInTop("请选择材质!", MessageBoxIcon.Warning);
return;
}
if (this.drpSER.SelectedValue != BLL.Const._Null)
{
iso.SER_ID = this.drpSER.SelectedValue;
}
else
{
Alert.ShowInTop("请选择介质!", MessageBoxIcon.Warning);
return;
}
iso.ISO_IsoNo = this.txtISO_IsoNo.Text.Trim();
if (!string.IsNullOrEmpty(this.txtISO_Paint.Text.Trim()))
{
iso.ISO_Paint = this.txtISO_Paint.Text.Trim();
}
else
{
Alert.ShowInTop("请输入涂漆类别!", MessageBoxIcon.Warning);
return;
}
if (!string.IsNullOrEmpty(this.txtISO_Insulator.Text.Trim()))
{
iso.ISO_Insulator = this.txtISO_Insulator.Text.Trim();
}
else
{
Alert.ShowInTop("请输入绝热类别!", MessageBoxIcon.Warning);
return;
}
if (!string.IsNullOrEmpty(this.txtISO_DesignPress.Text))
{
iso.ISO_DesignPress = Funs.GetNewDecimal(this.txtISO_DesignPress.Text);
}
else
{
Alert.ShowInTop("请输入设计压力!", MessageBoxIcon.Warning);
return;
}
if (!string.IsNullOrEmpty(this.txtISO_DesignTemperature.Text))
{
iso.ISO_DesignTemperature = Funs.GetNewDecimal(this.txtISO_DesignTemperature.Text);
}
else
{
Alert.ShowInTop("请输入设计温度!", MessageBoxIcon.Warning);
return;
}
if (!string.IsNullOrEmpty(this.txtISO_TestPress.Text))
{
iso.ISO_TestPress = Funs.GetNewDecimal(this.txtISO_TestPress.Text);
}
else
{
Alert.ShowInTop("请输入耐压试验!", MessageBoxIcon.Warning);
return;
}
iso.ISO_Remark = this.txtISO_Remark.Text.Trim();
if (this.drpMaterialStandardId.SelectedValue != BLL.Const._Null)
{
iso.MaterialStandardId = this.drpMaterialStandardId.SelectedValue;
}
else
{
Alert.ShowInTop("请选择材质标准!", MessageBoxIcon.Warning);
return;
}
iso.PressureTestPackageNo = this.txtPressureTestPackageNo.Text.Trim();
if (!string.IsNullOrEmpty(this.txtOperatingPressure.Text.Trim()))
{
iso.OperatingPressure = this.txtOperatingPressure.Text.Trim();
}
else
{
Alert.ShowInTop("请输入操作压力!", MessageBoxIcon.Warning);
return;
}
if (!string.IsNullOrEmpty(this.txtOperatingTemperature.Text.Trim()))
{
iso.OperatingTemperature = this.txtOperatingTemperature.Text.Trim();
}
else
{
Alert.ShowInTop("请输入操作温度!", MessageBoxIcon.Warning);
return;
}
if (this.drpPipeLineClass.SelectedValue != BLL.Const._Null)
{
iso.PipeLineClass = this.drpPipeLineClass.SelectedValue;
}
else
{
Alert.ShowInTop("请选择管道类别!", MessageBoxIcon.Warning);
return;
}
if (!string.IsNullOrEmpty(this.txtPipeLineLength.Text.Trim()))
{
iso.PipeLineLength = Funs.GetNewDecimal(this.txtPipeLineLength.Text.Trim());
}
else
{
Alert.ShowInTop("请输入管线长度!", MessageBoxIcon.Warning);
return;
}
if (!string.IsNullOrEmpty(this.txtLeakageTest.Text.Trim()))
{
iso.LeakageTest = this.txtLeakageTest.Text.Trim();
}
else
{
Alert.ShowInTop("请输入泄露性试验!", MessageBoxIcon.Warning);
return;
}
if (!string.IsNullOrEmpty(this.txtTestCategoryNum.Text.Trim()))
{
iso.TestCategoryNum = this.txtTestCategoryNum.Text.Trim();
}
else
{
Alert.ShowInTop("请输入检测类别序号!", MessageBoxIcon.Warning);
return;
}
if (this.drpIsHot.SelectedValue != BLL.Const._Null)
{
iso.IsHot = this.drpIsHot.SelectedValue;
if (this.drpIsHot.SelectedValue == "1")
{
if (this.drpIsHotType.Values.Length > 0)
{
iso.IsHotType = String.Join("|", drpIsHotType.Values);
}
else
{
Alert.ShowInTop("请选择热处理类型!", MessageBoxIcon.Warning);
return;
}
}
}
if (!string.IsNullOrEmpty(this.txtSch.Text))
{
iso.ISO_Sch = Convert.ToDecimal(this.txtSch.Text);
}
else
{
Alert.ShowInTop("请输入壁厚!", MessageBoxIcon.Warning);
return;
}
if (!string.IsNullOrEmpty(this.txtDia.Text))
{
iso.ISO_Dia = Convert.ToDecimal(this.txtDia.Text);
}
else
{
Alert.ShowInTop("请输入外径!", MessageBoxIcon.Warning);
return;
}
if (drpJoty_B_Rate.SelectedValue == Const._Null)
{
Alert.ShowInTop("对接焊缝检测比例不能为空!", MessageBoxIcon.Warning);
return;
}
else
{
iso.Joty_B_Rate = drpJoty_B_Rate.SelectedValue;
}
if (drpJoty_Level.SelectedValue == Const._Null)
{
Alert.ShowInTop("对接焊缝合格等级不能为空!", MessageBoxIcon.Warning);
return;
}
else
{
iso.Joty_B_Level = drpJoty_Level.SelectedValue;
}
if (drpJoty_C_Rate.SelectedValue == Const._Null)
{
Alert.ShowInTop("角焊缝检测比例不能为空!", MessageBoxIcon.Warning);
return;
}
else
{
iso.Joty_C_Rate = drpJoty_C_Rate.SelectedValue;
}
if (this.drpJoty_C_Level.SelectedValue == Const._Null)
{
Alert.ShowInTop("角焊缝合格等级不能为空!", MessageBoxIcon.Warning);
return;
}
else
{
iso.Joty_C_Level = drpJoty_C_Level.SelectedValue;
}
if (drpJoty_D_Rate.SelectedValue == Const._Null)
{
Alert.ShowInTop("支管链接接头检测比例不能为空!", MessageBoxIcon.Warning);
return;
}
else
{
iso.Joty_D_Rate = drpJoty_D_Rate.SelectedValue;
}
if (drpJoty_D_Level.SelectedValue == Const._Null)
{
Alert.ShowInTop("支管链接焊缝合格等级不能为空!", MessageBoxIcon.Warning);
return;
}
else
{
iso.Joty_D_Level = drpJoty_D_Level.SelectedValue;
}
dic.Remove(ISO_ID);
ShowNotify("保存成功!", MessageBoxIcon.Success);
if (ckAll.Checked)
{
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(ISO_ID) + ActiveWindow.GetHidePostBackReference());
}
else
{
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference("") + ActiveWindow.GetHidePostBackReference());
}
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
#endregion
#region
/// <summary>
/// 根据单线图号拷贝到下列文本中
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnCopy_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.txtISO_IsoNoS.Text.Trim()))
{
var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoNo(this.txtISO_IsoNoS.Text.Trim(), this.CurrUser.LoginProjectId);
if (isoInfo != null)
{
this.txtISO_IsoNo.Text = string.Empty;
if (!string.IsNullOrEmpty(isoInfo.BSU_ID))
{
this.drpBUS_ID.SelectedValue = isoInfo.BSU_ID;
}
if (!string.IsNullOrEmpty(isoInfo.ISC_ID))
{
this.drpIDName.SelectedValue = isoInfo.ISC_ID;
}
if (!string.IsNullOrEmpty(isoInfo.ISO_Executive))
{
this.drpExecStandard.SelectedValue = isoInfo.ISO_Executive;
}
if (!string.IsNullOrEmpty(isoInfo.STE_ID))
{
this.drpSTEName.SelectedValue = isoInfo.STE_ID;
}
if (!string.IsNullOrEmpty(isoInfo.MaterialStandardId))
{
this.drpMaterialStandardId.SelectedValue = isoInfo.MaterialStandardId;
}
if (!string.IsNullOrEmpty(isoInfo.SER_ID))
{
this.drpSER.SelectedValue = isoInfo.SER_ID;
var ser = BLL.HJGL_MediumService.GetServiceBySERID(this.drpSER.SelectedValue);
if (ser != null)
{
this.txtServiceAbbreviate.Text = ser.SER_Abbreviate;
}
}
this.txtPressureTestPackageNo.Text = isoInfo.PressureTestPackageNo;
this.txtISO_Paint.Text = isoInfo.ISO_Paint;
this.txtISO_Insulator.Text = isoInfo.ISO_Insulator;
this.txtOperatingPressure.Text = isoInfo.OperatingPressure;
this.txtOperatingTemperature.Text = isoInfo.OperatingTemperature;
if (!string.IsNullOrEmpty(isoInfo.PipeLineClass))
{
this.drpPipeLineClass.SelectedValue = isoInfo.PipeLineClass;
}
if (isoInfo.PipeLineLength.HasValue)
{
this.txtPipeLineLength.Text = isoInfo.PipeLineLength.ToString();
}
this.txtLeakageTest.Text = isoInfo.LeakageTest;
if (isoInfo.ISO_DesignPress.HasValue)
{
this.txtISO_DesignPress.Text = isoInfo.ISO_DesignPress.ToString();
}
if (isoInfo.ISO_DesignTemperature.HasValue)
{
this.txtISO_DesignTemperature.Text = isoInfo.ISO_DesignTemperature.ToString();
}
if (isoInfo.ISO_TestPress.HasValue)
{
this.txtISO_TestPress.Text = isoInfo.ISO_TestPress.ToString();
}
this.txtTestCategoryNum.Text = isoInfo.TestCategoryNum;
this.txtISO_Remark.Text = isoInfo.ISO_Remark;
if (isoInfo.ISO_Dia != null)
{
this.txtDia.Text = isoInfo.ISO_Dia.ToString();
}
if (isoInfo.ISO_Sch != null)
{
this.txtSch.Text = isoInfo.ISO_Sch.ToString();
}
if (!string.IsNullOrEmpty(isoInfo.Joty_B_Rate))
{
drpJoty_B_Rate.SelectedValue = isoInfo.Joty_B_Rate;
}
if (!string.IsNullOrEmpty(isoInfo.Joty_C_Rate))
{
drpJoty_C_Rate.SelectedValue = isoInfo.Joty_C_Rate;
}
if (!string.IsNullOrEmpty(isoInfo.Joty_D_Rate))
{
drpJoty_D_Rate.SelectedValue = isoInfo.Joty_D_Rate;
}
if (!string.IsNullOrEmpty(isoInfo.Joty_B_Level))
{
drpJoty_Level.SelectedValue = isoInfo.Joty_B_Level;
}
if (!string.IsNullOrEmpty(isoInfo.Joty_C_Level))
{
drpJoty_C_Level.SelectedValue = isoInfo.Joty_C_Level;
}
if (!string.IsNullOrEmpty(isoInfo.Joty_D_Level))
{
drpJoty_D_Level.SelectedValue = isoInfo.Joty_D_Level;
}
//选择管道等级、执行标准时,自动添加对接焊缝检测比例、合格等级、支管连接接头检测比例、合格等级、角焊缝检测比例、合格等级
//var weldControl = BLL.HJGL_WeldControlService.GEtWeldControlByISCIDAndExecStandardId(this.drpIDName.SelectedValue, this.drpExecStandard.SelectedValue);
//if (weldControl != null)
//{
// if (!string.IsNullOrEmpty(weldControl.Joty_Rate))
// {
// var rate = BLL.HJGL_DetectionService.GetNDTRateByNDTRID(weldControl.Joty_Rate);
// if (rate != null)
// {
// this.txtTestCategoryNum.Text = rate.NDTR_Code;
// if (drpJoty_B_Rate.SelectedValue == Const._Null || string.IsNullOrEmpty(drpJoty_B_Rate.SelectedValue))
// {
// drpJoty_B_Rate.SelectedValue = weldControl.Joty_Rate;
// }
// }
// }
// this.txtJoty_Level.Text = weldControl.Joty_Level;
// if (!string.IsNullOrEmpty(weldControl.Joty_C_Rate))
// {
// if (drpJoty_C_Rate.SelectedValue == Const._Null || string.IsNullOrEmpty(drpJoty_C_Rate.SelectedValue))
// {
// drpJoty_C_Rate.SelectedValue = weldControl.Joty_C_Rate;
// }
// }
// this.txtJoty_C_Level.Text = weldControl.Joty_C_Level;
// if (!string.IsNullOrEmpty(weldControl.Joty_D_Rate))
// {
// if (drpJoty_D_Rate.SelectedValue == Const._Null || string.IsNullOrEmpty(drpJoty_D_Rate.SelectedValue))
// {
// drpJoty_D_Rate.SelectedValue = weldControl.Joty_D_Rate;
// }
// }
// this.txtJoty_D_Level.Text = weldControl.Joty_D_Level;
//}
}
else
{
this.txtISO_IsoNo.Text = string.Empty;
this.drpBUS_ID.SelectedValue = BLL.Const._Null;
this.drpIDName.SelectedValue = BLL.Const._Null;
this.drpExecStandard.SelectedValue = BLL.Const._Null;
this.drpSTEName.SelectedValue = BLL.Const._Null;
this.drpMaterialStandardId.SelectedValue = BLL.Const._Null;
this.drpSER.SelectedValue = BLL.Const._Null;
this.txtPressureTestPackageNo.Text = string.Empty;
this.txtISO_Paint.Text = string.Empty;
this.txtISO_Insulator.Text = string.Empty;
this.txtOperatingPressure.Text = string.Empty;
this.txtOperatingTemperature.Text = string.Empty;
this.drpPipeLineClass.SelectedValue = BLL.Const._Null;
this.txtPipeLineLength.Text = string.Empty;
this.txtLeakageTest.Text = string.Empty;
this.txtServiceAbbreviate.Text = string.Empty;
this.txtISO_DesignPress.Text = string.Empty;
this.txtISO_DesignTemperature.Text = string.Empty;
this.txtISO_TestPress.Text = string.Empty;
this.txtTestCategoryNum.Text = string.Empty;
}
}
}
#endregion
#region DropDownList下拉选择
/// <summary>
/// DropDownList下拉选择
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void DrpList_SelectedIndexChanged(object sender, EventArgs e)
{
///选择介质时自动加载介质缩写
var ser = BLL.HJGL_MediumService.GetServiceBySERID(this.drpSER.SelectedValue);
if (ser != null)
{
this.txtServiceAbbreviate.Text = ser.SER_Abbreviate;
}
else
{
this.txtServiceAbbreviate.Text = string.Empty;
}
//选择管道等级、执行标准时,自动添加对接焊缝检测比例、合格等级、支管连接接头检测比例、合格等级、角焊缝检测比例、合格等级
var weldControl = BLL.HJGL_WeldControlService.GEtWeldControlByISCIDAndExecStandardId(this.drpIDName.SelectedValue, this.drpExecStandard.SelectedValue);
if (weldControl != null)
{
if (!string.IsNullOrEmpty(weldControl.Joty_Rate))
{
var rate = BLL.HJGL_DetectionService.GetNDTRateByNDTRID(weldControl.Joty_Rate);
if (rate != null)
{
this.txtTestCategoryNum.Text = rate.NDTR_Code;
}
drpJoty_B_Rate.SelectedValue = weldControl.Joty_Rate;
}
if (!string.IsNullOrEmpty(weldControl.Joty_Level))
{
this.drpJoty_Level.SelectedValue = weldControl.Joty_Level;
}
if (!string.IsNullOrEmpty(weldControl.Joty_C_Rate))
{
drpJoty_C_Rate.SelectedValue = weldControl.Joty_C_Rate;
}
if (!string.IsNullOrEmpty(weldControl.Joty_C_Level))
{
this.drpJoty_C_Level.SelectedValue = weldControl.Joty_C_Level;
}
if (!string.IsNullOrEmpty(weldControl.Joty_D_Rate))
{
drpJoty_D_Rate.SelectedValue = weldControl.Joty_D_Rate;
}
if (!string.IsNullOrEmpty(weldControl.Joty_D_Level))
{
this.drpJoty_D_Level.SelectedValue = weldControl.Joty_D_Level;
}
}
else
{
this.drpJoty_B_Rate.SelectedValue = Const._Null;
drpJoty_Level.SelectedValue = Const._Null;
this.drpJoty_C_Rate.SelectedValue = Const._Null;
this.drpJoty_C_Level.Text = Const._Null;
this.drpJoty_D_Rate.SelectedValue = Const._Null;
this.drpJoty_D_Level.Text = Const._Null;
}
}
/// <summary>
/// 是否显示热处理类型
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void drpIsHot_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.drpIsHot.SelectedValue == "1")
{
this.drpIsHotType.Hidden = false;
}
else
{
this.drpIsHotType.Hidden = true;
}
}
#endregion
#region
/// <summary>
/// 选项卡切换事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TabStrip1_TabIndexChanged(object sender, EventArgs e)
{
if (TabStrip1.ActiveTabIndex == 1)
{
this.Form2.Hidden = true;
}
else
{
this.Form2.Hidden = false;
}
}
#endregion
#region
/// <summary>
/// 得到热处理类型
/// </summary>
/// <param name="bigType"></param>
/// <returns></returns>
protected string ConvertCheckState(object checkState)
{
string str = string.Empty;
if (checkState != null)
{
if (checkState.ToString() == "1")
{
str = "待检测";
}
if (checkState.ToString() == "2")
{
str = "检测合格";
}
if (checkState.ToString() == "3")
{
str = "待重检";
}
if (checkState.ToString() == "4")
{
str = "待返修";
}
}
return str;
}
#endregion
}
}

View File

@ -0,0 +1,449 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class PipelineInEdit
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// TabStrip1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TabStrip TabStrip1;
/// <summary>
/// Tab1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tab Tab1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtISO_IsoNoS 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtISO_IsoNoS;
/// <summary>
/// btnCopy 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnCopy;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// txtISO_IsoNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtISO_IsoNo;
/// <summary>
/// drpBUS_ID 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpBUS_ID;
/// <summary>
/// drpIDName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpIDName;
/// <summary>
/// drpExecStandard 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpExecStandard;
/// <summary>
/// drpSTEName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpSTEName;
/// <summary>
/// drpMaterialStandardId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpMaterialStandardId;
/// <summary>
/// drpSER 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpSER;
/// <summary>
/// txtServiceAbbreviate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtServiceAbbreviate;
/// <summary>
/// txtPressureTestPackageNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPressureTestPackageNo;
/// <summary>
/// drpPipeLineClass 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpPipeLineClass;
/// <summary>
/// txtISO_Paint 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtISO_Paint;
/// <summary>
/// txtISO_Insulator 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtISO_Insulator;
/// <summary>
/// txtOperatingPressure 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtOperatingPressure;
/// <summary>
/// txtOperatingTemperature 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtOperatingTemperature;
/// <summary>
/// txtLeakageTest 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtLeakageTest;
/// <summary>
/// txtISO_DesignPress 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtISO_DesignPress;
/// <summary>
/// txtISO_DesignTemperature 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtISO_DesignTemperature;
/// <summary>
/// txtISO_TestPress 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtISO_TestPress;
/// <summary>
/// txtDia 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtDia;
/// <summary>
/// txtSch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtSch;
/// <summary>
/// txtPipeLineLength 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtPipeLineLength;
/// <summary>
/// txtTestCategoryNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTestCategoryNum;
/// <summary>
/// drpIsHot 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpIsHot;
/// <summary>
/// drpIsHotType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownBox drpIsHotType;
/// <summary>
/// SimpleForm3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.SimpleForm SimpleForm3;
/// <summary>
/// Label10 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label10;
/// <summary>
/// RadioButtonList1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList RadioButtonList1;
/// <summary>
/// ckAll 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckAll;
/// <summary>
/// txtISO_Remark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtISO_Remark;
/// <summary>
/// Form2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form2;
/// <summary>
/// drpJoty_B_Rate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpJoty_B_Rate;
/// <summary>
/// drpJoty_Level 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpJoty_Level;
/// <summary>
/// drpJoty_C_Rate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpJoty_C_Rate;
/// <summary>
/// drpJoty_C_Level 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpJoty_C_Level;
/// <summary>
/// drpJoty_D_Rate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpJoty_D_Rate;
/// <summary>
/// drpJoty_D_Level 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpJoty_D_Level;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label3;
}
}

View File

@ -268,3 +268,4 @@
</form>
</body>
</html>

View File

@ -5,4 +5,5 @@
<package id="NPOI" version="2.5.5" targetFramework="net461" />
<package id="Portable.BouncyCastle" version="1.8.9" targetFramework="net461" />
<package id="SharpZipLib" version="1.3.2" targetFramework="net461" />
<package id="Spire.PDF" version="12.2.6" targetFramework="net461" />
</packages>