20260723 焊口批量修改
This commit is contained in:
@@ -1358,5 +1358,23 @@ namespace BLL
|
||||
&& (y.JOTY_Name.Contains("支管连接焊缝") || y.JOTY_Name.Contains("角焊缝"))
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
public static string ConvertJointCodeString(string jotIdList)
|
||||
{
|
||||
string name = string.Empty;
|
||||
string[] list = jotIdList.Split(',');
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item))
|
||||
{
|
||||
name += GetJointInfoByJotID(item).JOT_JointNo + ",";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
{
|
||||
name = name.Substring(0, name.LastIndexOf(","));
|
||||
}
|
||||
return name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<PreferNativeArm64>false</PreferNativeArm64>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Aspose.Words, Version=21.8.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
|
||||
@@ -1304,6 +1305,7 @@
|
||||
<Content Include="HJGL\TrustManage\TrustManageItemEdit.aspx" />
|
||||
<Content Include="HJGL\WeldingManage\CompleteReportDateEdit.aspx" />
|
||||
<Content Include="HJGL\WeldingManage\DetectionPoint.aspx" />
|
||||
<Content Include="HJGL\WeldingManage\JointInfoBatchModity.aspx" />
|
||||
<Content Include="HJGL\WeldingManage\JointInfoBatchUpdate.aspx" />
|
||||
<Content Include="HJGL\WeldingManage\JointInfoCopy.aspx" />
|
||||
<Content Include="HJGL\WeldingManage\JointInfoOut.aspx" />
|
||||
@@ -6476,6 +6478,13 @@
|
||||
<Compile Include="HJGL\WeldingManage\DetectionPoint.aspx.designer.cs">
|
||||
<DependentUpon>DetectionPoint.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\WeldingManage\JointInfoBatchModity.aspx.cs">
|
||||
<DependentUpon>JointInfoBatchModity.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\WeldingManage\JointInfoBatchModity.aspx.designer.cs">
|
||||
<DependentUpon>JointInfoBatchModity.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\WeldingManage\JointInfoBatchUpdate.aspx.cs">
|
||||
<DependentUpon>JointInfoBatchUpdate.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<Use64BitIISExpress />
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<f:FileUpload ID="FileExcel" runat="server" Label="数据文件" EmptyText="请上传EXCEl格式文件" Width="400px" LabelWidth="70px"></f:FileUpload>
|
||||
<f:Button ID="btnAudit" runat="server" Text="审核" ToolTip="文件审核!" OnClick="btnAudit_Click"></f:Button>
|
||||
<f:Button ID="imgbtnImport" runat="server" Text="上传" ToolTip="文件上传!" OnClick="imgbtnImport_Click"></f:Button>
|
||||
<f:CheckBox ID="cbUpdateIn" runat="server" Text="更新导入"></f:CheckBox>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="imgbtnUpload" runat="server" Icon="DiskDownload" Text="模板下载" OnClick="imgbtnUpload_Click" EnableAjaxLoading="false"></f:Button>
|
||||
<f:HiddenField ID="hdFileName" runat="server">
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
using System;
|
||||
using BLL;
|
||||
using FastReport.Utils;
|
||||
using NPOI.POIFS.Crypt.Dsig;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
@@ -8,7 +12,6 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
namespace FineUIPro.Web.HJGL.DataIn
|
||||
{
|
||||
public partial class JointIn : PageBase
|
||||
@@ -940,7 +943,56 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
}
|
||||
else
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "该焊口已存在" + "\n";
|
||||
if (this.cbUpdateIn.Checked)
|
||||
{
|
||||
newJointInfo.JOT_JointNo = col2;
|
||||
if (col8 == "固定")
|
||||
{
|
||||
if (newJointInfo.JOT_JointNo.Last() != 'G')
|
||||
{
|
||||
newJointInfo.JOT_JointNo = newJointInfo.JOT_JointNo + "G";
|
||||
}
|
||||
}
|
||||
if (newJointInfo.IsGold == true)
|
||||
{
|
||||
if (newJointInfo.JOT_JointNo.Last() != 'H')
|
||||
{
|
||||
newJointInfo.JOT_JointNo = newJointInfo.JOT_JointNo + "H";
|
||||
}
|
||||
}
|
||||
newJointInfo.JOT_ID = getJoint.JOT_ID;
|
||||
BLL.HJGL_PW_JointInfoService.UpdateJointInfo(newJointInfo);
|
||||
|
||||
// 更新排序字段
|
||||
string strSort = @"UPDATE dbo.HJGL_PW_JointInfo SET
|
||||
Sort1=(case when PATINDEX('[A-Z]%',JOT_JointNo)>0 THEN 'B'
|
||||
WHEN ISNUMERIC(JOT_JointNo)=1 then 'C' ELSE 'C' END),
|
||||
Sort2=(CASE WHEN ISNUMERIC(JOT_JointNo)=1 then try_cast(REPLACE(JOT_JointNo,'.','') AS INT)
|
||||
WHEN ISNUMERIC(SUBSTRING(JOT_JointNo,0,CHARINDEX('Z',JOT_JointNo)))=1
|
||||
THEN TRY_CAST(SUBSTRING(JOT_JointNo,0,CHARINDEX('Z',JOT_JointNo)) as int)
|
||||
WHEN PATINDEX('[0-9]%',JOT_JointNo)>0 then
|
||||
TRY_CAST(left(JOT_JointNo,PATINDEX('%[^0-9]%',JOT_JointNo)-1) as int)
|
||||
ELSE 0 END),
|
||||
Sort3= SUBSTRING(JOT_JointNo,1,1),
|
||||
Sort4=(CASE WHEN CHARINDEX('Z',JOT_JointNo)>0 and SUBSTRING(JOT_JointNo,1,1)<>'Z'
|
||||
THEN ISNULL(TRY_CAST(SUBSTRING(replace(JOT_JointNo,'#',''),2,CHARINDEX('Z',JOT_JointNo)-2) as int),0)
|
||||
WHEN PATINDEX('%[A-G]%',SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)))>0
|
||||
THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,2,len(JOT_JointNo)-2) as int),0)
|
||||
ELSE ISNULL(TRY_CAST(SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)) as int),0) END),
|
||||
Sort5=(CASE WHEN CHARINDEX('Z',JOT_JointNo)>0
|
||||
THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,charindex('Z',JOT_JointNo)+1,len(JOT_JointNo)) AS INT),0)
|
||||
WHEN PATINDEX('%[A-Y]',SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)))>0
|
||||
THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,2,len(JOT_JointNo)-1) as int),0) ELSE 0 END)
|
||||
WHERE JOT_ID='" + newJointInfo.JOT_ID + "'";
|
||||
SQLHelper.ExecutSql(strSort);
|
||||
|
||||
//JOT_IDStr += Funs.DB.HJGL_PW_JointInfo.FirstOrDefault(x => x.ProjectId == getProject.ProjectId && x.ISO_ID == getPWisInfo.ISO_ID && x.JOT_JointNo == col2).JOT_ID + ",";
|
||||
JOT_IDStr += newJointInfo.JOT_ID + ",";
|
||||
}
|
||||
else
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "该焊口已存在" + "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
errorInfos += result;
|
||||
|
||||
+34
-23
@@ -7,11 +7,13 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.DataIn {
|
||||
|
||||
|
||||
public partial class JointIn {
|
||||
|
||||
namespace FineUIPro.Web.HJGL.DataIn
|
||||
{
|
||||
|
||||
|
||||
public partial class JointIn
|
||||
{
|
||||
|
||||
/// <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,16 @@ namespace FineUIPro.Web.HJGL.DataIn {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button imgbtnImport;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// cbUpdateIn 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox cbUpdateIn;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
@@ -101,7 +112,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// imgbtnUpload 控件。
|
||||
/// </summary>
|
||||
@@ -110,7 +121,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button imgbtnUpload;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
@@ -119,7 +130,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdFileName;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
@@ -128,7 +139,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
@@ -137,7 +148,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
@@ -146,7 +157,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
@@ -155,7 +166,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
@@ -164,7 +175,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
@@ -173,7 +184,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -71,15 +71,12 @@
|
||||
</f:Button>
|
||||
<f:Button ID="btnBatchAdd" Text="批量增加" ToolTip="批量增加" Icon="TableAdd" runat="server" OnClick="btnBatchAdd_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnBatchModify" Text="批量修改" ToolTip="批量修改焊口属性" Icon="TableAdd" runat="server" OnClick="btnBatchModify_Click">
|
||||
<f:Button ID="btnBatchUpdate" Text="批量修改" ToolTip="批量修改焊口信息" Icon="TableAdd" runat="server" OnClick="btnBatchModity_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnBatchDel" Text="批量删除" ToolTip="批量删除" Icon="Delete" runat="server" OnClick="btnBatchDel_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp" OnClick="btnOut_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnFileName" Text="文档名" ToolTip="文档名" Icon="TableEdit" runat="server" OnClick="btnFileName_Click">
|
||||
</f:Button>
|
||||
|
||||
<f:HiddenField ID="hdColumn" runat="server"></f:HiddenField>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
@@ -95,6 +92,8 @@
|
||||
<f:Label runat="server" Width="60px"></f:Label>
|
||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnBatchModify" Text="修改焊口属性" ToolTip="批量修改焊口属性" Icon="TableAdd" runat="server" OnClick="btnBatchModify_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPrint" Text="焊接记录打印" EnableAjax="false" Icon="Printer" Hidden="true" runat="server" OnClick="btnPrint_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPrintNew" Text="焊接记录打印" Icon="Printer" runat="server" OnClick="btnPrintNew_Click">
|
||||
@@ -102,6 +101,8 @@
|
||||
<f:Button ID="btnSelectColumn" Text="选择显示列" Icon="ShapesManySelect"
|
||||
runat="server" OnClick="btnSelectColumn_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnFileName" Text="文档名" ToolTip="文档名" Icon="TableEdit" runat="server" OnClick="btnFileName_Click">
|
||||
</f:Button>
|
||||
<%-- <f:CheckBox ID="ckALL" runat="server" Label="全部" LabelAlign="right" AutoPostBack="true"
|
||||
OnCheckedChanged="TextBox_TextChanged" Width="100px" LabelWidth="50px">
|
||||
</f:CheckBox>--%>
|
||||
@@ -172,8 +173,8 @@
|
||||
<%--<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />--%>
|
||||
<f:CheckBoxField ColumnID="ckbIsSelected" Width="80px" RenderAsStaticField="false" TextAlign="Center"
|
||||
AutoPostBack="true" CommandName="IsSelected" DataField="JOT_ID" HeaderText="选择删除" HeaderTextAlign="Center" Locked="true" />
|
||||
<f:WindowField ColumnID="JOT_JointNo" HeaderTextAlign="Center" TextAlign="Left" Width="100px"
|
||||
AutoPostBack="true" CommandName="IsSelected" DataField="JOT_ID" HeaderText="选择修改/删除" HeaderTextAlign="Center" Locked="true" />
|
||||
<f:WindowField ColumnID="JOT_JointNo" HeaderTextAlign="Center" TextAlign="Left" Width="100px"
|
||||
WindowID="Window1" HeaderText="焊口代号" DataTextField="JOT_JointNo" DataIFrameUrlFields="JOT_ID"
|
||||
DataIFrameUrlFormatString="JointInfoEdit.aspx?JOT_ID={0}" Title="焊口代号" ToolTip="着色表示该焊口已热处理或所在批已封,不能删除和修改!"
|
||||
SortField="JOT_JointNo" Locked="true">
|
||||
@@ -384,6 +385,10 @@
|
||||
Target="top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="800px" Height="650px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window10" Title="批量修改焊口信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="1200px" Height="650px">
|
||||
</f:Window>
|
||||
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||
|
||||
@@ -28,6 +28,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
public string SelectedType
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["SelectedType"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["SelectedType"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 定义集合
|
||||
@@ -115,6 +127,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
this.Grid1.Columns[35].Hidden = true;
|
||||
this.Grid1.Columns[36].Hidden = true;
|
||||
this.Grid1.Columns[37].Hidden = true;
|
||||
//this.Grid1.Columns[38].Hidden = true;
|
||||
|
||||
List<string> columns = column.Split(',').ToList();
|
||||
foreach (var item in columns)
|
||||
@@ -1350,7 +1363,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
list.Remove(rowID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1364,113 +1377,77 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnDelete))
|
||||
{
|
||||
// 第一次点击:只打开复选框
|
||||
if (this.Grid1.Columns[0].Hidden)
|
||||
if (this.Grid1.Columns[0].Hidden || SelectedType == "BatchModity")
|
||||
{
|
||||
list.Clear();
|
||||
SelectedType = "Delete";
|
||||
this.Grid1.Columns[0].Hidden = false;
|
||||
this.Grid1.Columns[0].HeaderText = "选择删除";
|
||||
this.BindGrid();
|
||||
return;
|
||||
}
|
||||
if (list.Count == 0)
|
||||
{
|
||||
Alert.ShowInTop("请勾选一条记录!", MessageBoxIcon.Warning);
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
bool isShow = true;
|
||||
if (list.Count > 1)
|
||||
if (SelectedType == "Delete")
|
||||
{
|
||||
isShow = false;
|
||||
}
|
||||
string err = string.Empty;
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
{
|
||||
string rowID = list[i];
|
||||
string content = judgementDelete(rowID, isShow);
|
||||
if (string.IsNullOrEmpty(content))
|
||||
bool isShow = true;
|
||||
if (list.Count > 1)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var hotProessTrustItem = db.HJGL_CH_HotProessTrustItem.FirstOrDefault(x => x.JOT_ID == rowID);
|
||||
if (hotProessTrustItem != null)
|
||||
isShow = false;
|
||||
}
|
||||
string err = string.Empty;
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
{
|
||||
string rowID = list[i];
|
||||
string content = judgementDelete(rowID, isShow);
|
||||
if (string.IsNullOrEmpty(content))
|
||||
{
|
||||
db.HJGL_CH_HotProessTrustItem.DeleteOnSubmit(hotProessTrustItem);
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var hotProessTrustItem = db.HJGL_CH_HotProessTrustItem.FirstOrDefault(x => x.JOT_ID == rowID);
|
||||
if (hotProessTrustItem != null)
|
||||
{
|
||||
db.HJGL_CH_HotProessTrustItem.DeleteOnSubmit(hotProessTrustItem);
|
||||
}
|
||||
var hotProessItem = db.HJGL_HotProessItem.FirstOrDefault(x => x.JOT_ID == rowID);
|
||||
if (hotProessItem != null)
|
||||
{
|
||||
db.HJGL_HotProessItem.DeleteOnSubmit(hotProessItem);
|
||||
}
|
||||
var hotProessResult = db.HJGL_CH_HotProessResult.FirstOrDefault(x => x.JOT_ID == rowID);
|
||||
if (hotProessResult != null)
|
||||
{
|
||||
db.HJGL_CH_HotProessResult.DeleteOnSubmit(hotProessResult);
|
||||
}
|
||||
db.SubmitChanges();
|
||||
BLL.HJGL_BO_BatchDetailService.DeleteBatchDetail(rowID); //删除批明细
|
||||
BLL.HJGL_PW_JointInfoService.DeleteJointInfo(rowID);
|
||||
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.ProjectId, this.CurrUser.UserId, "删除焊口信息");
|
||||
}
|
||||
var hotProessItem = db.HJGL_HotProessItem.FirstOrDefault(x => x.JOT_ID == rowID);
|
||||
if (hotProessItem != null)
|
||||
else
|
||||
{
|
||||
db.HJGL_HotProessItem.DeleteOnSubmit(hotProessItem);
|
||||
err += content;
|
||||
}
|
||||
var hotProessResult = db.HJGL_CH_HotProessResult.FirstOrDefault(x => x.JOT_ID == rowID);
|
||||
if (hotProessResult != null)
|
||||
{
|
||||
db.HJGL_CH_HotProessResult.DeleteOnSubmit(hotProessResult);
|
||||
}
|
||||
db.SubmitChanges();
|
||||
BLL.HJGL_BO_BatchDetailService.DeleteBatchDetail(rowID); //删除批明细
|
||||
BLL.HJGL_PW_JointInfoService.DeleteJointInfo(rowID);
|
||||
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.ProjectId, this.CurrUser.UserId, "删除焊口信息");
|
||||
}
|
||||
|
||||
list.Clear();
|
||||
|
||||
if (string.IsNullOrEmpty(err))
|
||||
{
|
||||
Alert.ShowInTop("删除成功!", MessageBoxIcon.Success);
|
||||
// 删除完成后,恢复按钮状态
|
||||
this.Grid1.Columns[0].Hidden = true;
|
||||
SelectedType = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
err += content;
|
||||
Alert.ShowInTop(err, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
//if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
//{
|
||||
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//bool isShow = true;
|
||||
//if (Grid1.SelectedRowIndexArray.Length > 1)
|
||||
//{
|
||||
// isShow = false;
|
||||
//}
|
||||
//string err = string.Empty;
|
||||
//foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
//{
|
||||
// string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
// string content = judgementDelete(rowID, isShow);
|
||||
// if (string.IsNullOrEmpty(content))
|
||||
// {
|
||||
// Model.SGGLDB db = Funs.DB;
|
||||
// var hotProessTrustItem = db.HJGL_CH_HotProessTrustItem.FirstOrDefault(x => x.JOT_ID == rowID);
|
||||
// if (hotProessTrustItem != null)
|
||||
// {
|
||||
// db.HJGL_CH_HotProessTrustItem.DeleteOnSubmit(hotProessTrustItem);
|
||||
// }
|
||||
// var hotProessItem = db.HJGL_HotProessItem.FirstOrDefault(x => x.JOT_ID == rowID);
|
||||
// if (hotProessItem != null)
|
||||
// {
|
||||
// db.HJGL_HotProessItem.DeleteOnSubmit(hotProessItem);
|
||||
// }
|
||||
// var hotProessResult = db.HJGL_CH_HotProessResult.FirstOrDefault(x => x.JOT_ID == rowID);
|
||||
// if (hotProessResult != null)
|
||||
// {
|
||||
// db.HJGL_CH_HotProessResult.DeleteOnSubmit(hotProessResult);
|
||||
// }
|
||||
// db.SubmitChanges();
|
||||
// BLL.HJGL_BO_BatchDetailService.DeleteBatchDetail(rowID); //删除批明细
|
||||
// BLL.HJGL_PW_JointInfoService.DeleteJointInfo(rowID);
|
||||
// BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除焊口信息");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// err += content;
|
||||
// }
|
||||
//}
|
||||
// 删除完成后,恢复按钮状态
|
||||
this.Grid1.Columns[0].Hidden = true;
|
||||
list.Clear();
|
||||
|
||||
if (string.IsNullOrEmpty(err))
|
||||
{
|
||||
Alert.ShowInTop("删除成功!", MessageBoxIcon.Success);
|
||||
this.BindGrid();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop(err, MessageBoxIcon.Warning);
|
||||
}
|
||||
|
||||
this.BindGrid();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1503,5 +1480,63 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量修改焊口信息
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnBatchModity_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnModify))
|
||||
{
|
||||
// 第一次点击:只打开复选框
|
||||
if (this.Grid1.Columns[0].Hidden || SelectedType == "Delete")
|
||||
{
|
||||
list.Clear();
|
||||
SelectedType = "BatchModity";
|
||||
this.Grid1.Columns[0].Hidden = false;
|
||||
this.Grid1.Columns[0].HeaderText = "选择修改";
|
||||
this.BindGrid();
|
||||
return;
|
||||
}
|
||||
if (SelectedType == "BatchModity")
|
||||
{
|
||||
if (list.Count == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string jotIdList = string.Join(",", list);
|
||||
PageContext.RegisterStartupScript(Window10.GetShowReference(String.Format("JointInfoBatchModity.aspx?jotIdList={0}", jotIdList, "批量修改 - ")));
|
||||
|
||||
}
|
||||
//bool isShow = true;
|
||||
//if (list.Count > 1)
|
||||
//{
|
||||
// isShow = false;
|
||||
//}
|
||||
//string err = string.Empty;
|
||||
//for (int i = 0; i < list.Count; i++)
|
||||
//{
|
||||
// string rowID = list[i];
|
||||
// string content = judgementDelete(rowID, isShow);
|
||||
// if (string.IsNullOrEmpty(content))
|
||||
// {
|
||||
// }
|
||||
//}
|
||||
|
||||
//if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
//{
|
||||
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//string jotIdList = string.Join(",", Grid1.SelectedRowIDArray);
|
||||
//PageContext.RegisterStartupScript(Window10.GetShowReference(String.Format("JointInfoBatchModity.aspx?jotIdList={0}", jotIdList, "批量修改 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+29
-11
@@ -195,13 +195,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
protected global::FineUIPro.Button btnBatchAdd;
|
||||
|
||||
/// <summary>
|
||||
/// btnBatchModify 控件。
|
||||
/// btnBatchUpdate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnBatchModify;
|
||||
protected global::FineUIPro.Button btnBatchUpdate;
|
||||
|
||||
/// <summary>
|
||||
/// btnBatchDel 控件。
|
||||
@@ -221,15 +221,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// btnFileName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnFileName;
|
||||
|
||||
/// <summary>
|
||||
/// hdColumn 控件。
|
||||
/// </summary>
|
||||
@@ -293,6 +284,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
||||
|
||||
/// <summary>
|
||||
/// btnBatchModify 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnBatchModify;
|
||||
|
||||
/// <summary>
|
||||
/// btnPrint 控件。
|
||||
/// </summary>
|
||||
@@ -320,6 +320,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSelectColumn;
|
||||
|
||||
/// <summary>
|
||||
/// btnFileName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnFileName;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar4 控件。
|
||||
/// </summary>
|
||||
@@ -536,6 +545,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window9;
|
||||
|
||||
/// <summary>
|
||||
/// Window10 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window10;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JointInfoBatchModity.aspx.cs" Inherits="FineUIPro.Web.HJGL.WeldingManage.JointInfoBatchModity" %>
|
||||
|
||||
<!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>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f: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:Label ID="txtJointNoS" runat="server" Label="修改的焊口" LabelAlign="Right">
|
||||
</f:Label>
|
||||
<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:DropDownList ID="drpInstallationId" Label="装置" runat="server" ShowRedStar="true"
|
||||
Required="true" EnableEdit="true" LabelWidth="100px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="ddlSTE1" Label="材质1" runat="server" ShowRedStar="true" Required="true"
|
||||
EnableEdit="true" LabelWidth="100px" AutoPostBack="true" OnSelectedIndexChanged="ddlSTE1_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="ddlSTE2" Label="材质2" runat="server" EnableEdit="true" LabelWidth="100px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="ddlJOTY_ID" Label="焊缝类型" runat="server" ShowRedStar="true" Required="true"
|
||||
EnableEdit="true" LabelWidth="100px" AutoPostBack="true" OnSelectedIndexChanged="ddlJOTY_ID_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="ddlJST_ID" Label="坡口类型" runat="server" ShowRedStar="true" Required="true"
|
||||
EnableEdit="true" LabelWidth="100px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="ddlJointAttribute" Label="焊口属性" runat="server" ShowRedStar="true"
|
||||
Required="true" EnableEdit="true" LabelWidth="100px" AutoPostBack="true" OnSelectedIndexChanged="ddlJointAttribute_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="ddlWME_ID" Label="焊接方法" runat="server" ShowRedStar="true" Required="true"
|
||||
EnableEdit="true" LabelWidth="100px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="ddlWLO_CODE" Label="焊接区域" runat="server" EnableEdit="true" LabelWidth="100px">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtJointDesc" Label="焊口规格" ShowRedStar="true" Required="true" runat="server"
|
||||
LabelWidth="100px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtDial" Label="外径" runat="server" LabelWidth="100px" ShowRedStar="true" Required="true" AutoPostBack="true" OnTextChanged="txtDial_TextChanged">
|
||||
</f:TextBox>
|
||||
<f:NumberBox ID="txtSch" Label="壁厚" runat="server" LabelWidth="100px" DecimalPrecision="2"
|
||||
NoNegative="true" ShowRedStar="true" Required="true" AutoPostBack="true" OnTextChanged="txtText_TextChanged">
|
||||
</f:NumberBox>
|
||||
<f:NumberBox ID="txtSize" Label="寸径" runat="server" LabelWidth="100px" DecimalPrecision="2"
|
||||
NoNegative="true" ShowRedStar="true" Required="true">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="ddlComponent1" Label="组件1号" runat="server" EnableEdit="true"
|
||||
LabelWidth="100px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="ddlComponent2" Label="组件2号" runat="server" EnableEdit="true"
|
||||
LabelWidth="100px">
|
||||
</f:DropDownList>
|
||||
<f:NumberBox ID="txtLastTemp" Label="后热温度" runat="server" LabelWidth="100px" DecimalPrecision="4"
|
||||
NoNegative="true">
|
||||
</f:NumberBox>
|
||||
<f:NumberBox ID="txtCellTemp" Label="层间温度" runat="server" LabelWidth="100px" DecimalPrecision="4"
|
||||
NoNegative="true">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="txtPrepareTemp" Label="预热温度" runat="server" LabelWidth="100px" DecimalPrecision="4"
|
||||
NoNegative="true">
|
||||
</f:NumberBox>
|
||||
<f:DropDownList ID="ddlWeldSilk" Label="焊丝牌号" runat="server" EnableEdit="true" LabelWidth="100px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="ddlWeldMat" Label="焊条牌号" runat="server" EnableEdit="true" LabelWidth="100px">
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtElectricity" Label="焊接电流" runat="server" LabelWidth="100px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ColumnWidths="25% 25% 25% 25%">
|
||||
<Items>
|
||||
<f:TextBox ID="txtVoltage" Label="焊接电压" runat="server" LabelWidth="100px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtPressureTestPackageNo" Label="试压包号" runat="server" LabelWidth="100px">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpIS_Proess" Label="是否热处理" runat="server" LabelWidth="100px"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="drpIS_Proess_SelectedIndexChanged">
|
||||
<f:ListItem Value="0" Text="否" />
|
||||
<f:ListItem Value="1" Text="是" />
|
||||
</f:DropDownList>
|
||||
<f:DropDownBox runat="server" Label="热处理类型" ID="drpProessTypes" DataControlID="RadioButtonList1"
|
||||
EnableMultiSelect="true" ShowRedStar="true" LabelAlign="Right"
|
||||
LabelWidth="100px" 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" AutoPostBack="true" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged">
|
||||
<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>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpNDTR_ID" runat="server" Label="探伤比例" LabelWidth="100px" EnableEdit="true" Required="true" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpJOT_QualifiedLevel" runat="server" Label="合格等级" LabelWidth="100px" EnableEdit="true" Required="true" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpIsGold" Label="是否黄金口" runat="server" LabelWidth="100px"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="drpIsGold_SelectedIndexChanged">
|
||||
<f:ListItem Value="0" Text="否" />
|
||||
<f:ListItem Value="1" Text="是" />
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpIsSpecial" Label="是否特殊" runat="server" LabelWidth="100px">
|
||||
<f:ListItem Value="0" Text="否" />
|
||||
<f:ListItem Value="1" Text="是" />
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ColumnWidths="25% 25% 50%">
|
||||
<Items>
|
||||
<f:TextBox ID="txtHardQuaStandard" runat="server" Label="硬度合格标准" LabelWidth="100px"></f:TextBox>
|
||||
<f:NumberBox ID="txtWeldL" Label="非常规焊缝:L(mm)" runat="server"
|
||||
AutoPostBack="true" OnTextChanged="txtWeldL_TextChanged" LabelWidth="100px" NoDecimal="true" NoNegative="true">
|
||||
</f:NumberBox>
|
||||
<f:Label ID="lbDef" runat="server" Label="备注" Text="非常规焊缝:仅限于支架、横缝、纵缝、环缝等焊口。非上述焊口请保持空白"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtRemark" Label="备注" runat="server" LabelWidth="100px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,899 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.HJGL.DataIn;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
public partial class JointInfoBatchModity : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 管线主键
|
||||
/// </summary>
|
||||
private string ISO_ID
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ISO_ID"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ISO_ID"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
///初始化下拉框
|
||||
this.LoadDropDownList();
|
||||
///初始化显示信息
|
||||
this.LoadShowInfo();
|
||||
}
|
||||
}
|
||||
|
||||
#region 加载下拉框
|
||||
/// <summary>
|
||||
/// 加载下拉框
|
||||
/// </summary>
|
||||
private void LoadDropDownList()
|
||||
{
|
||||
///材质1
|
||||
this.ddlSTE1.DataTextField = "STE_Code";
|
||||
this.ddlSTE1.DataValueField = "STE_ID";
|
||||
this.ddlSTE1.DataSource = BLL.HJGL_MaterialService.GetSteelList();
|
||||
this.ddlSTE1.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.ddlSTE1);
|
||||
|
||||
///材质2
|
||||
this.ddlSTE2.DataTextField = "STE_Code";
|
||||
this.ddlSTE2.DataValueField = "STE_ID";
|
||||
this.ddlSTE2.DataSource = BLL.HJGL_MaterialService.GetSteelList();
|
||||
this.ddlSTE2.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.ddlSTE2);
|
||||
|
||||
///焊缝类型
|
||||
this.ddlJOTY_ID.DataTextField = "JOTY_Name";
|
||||
this.ddlJOTY_ID.DataValueField = "JOTY_ID";
|
||||
this.ddlJOTY_ID.DataSource = BLL.HJGL_WeldService.GetJointTypeNameList("2");
|
||||
this.ddlJOTY_ID.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.ddlJOTY_ID);
|
||||
|
||||
///坡口类型
|
||||
this.ddlJST_ID.DataTextField = "JST_Name";
|
||||
this.ddlJST_ID.DataValueField = "JST_ID";
|
||||
this.ddlJST_ID.DataSource = BLL.HJGL_GrooveService.GetSlopeTypeNameList();
|
||||
this.ddlJST_ID.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.ddlJST_ID);
|
||||
|
||||
///焊口属性
|
||||
this.ddlJointAttribute.DataTextField = "Text";
|
||||
this.ddlJointAttribute.DataValueField = "Value";
|
||||
this.ddlJointAttribute.DataSource = BLL.DropListService.HJGL_JointAttributeItem();
|
||||
this.ddlJointAttribute.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.ddlJointAttribute);
|
||||
|
||||
///焊接方法
|
||||
this.ddlWME_ID.DataTextField = "WME_Name";
|
||||
this.ddlWME_ID.DataValueField = "WME_ID";
|
||||
this.ddlWME_ID.DataSource = BLL.HJGL_WeldingMethodService.GetWeldMethodNameList();
|
||||
this.ddlWME_ID.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.ddlWME_ID);
|
||||
|
||||
///焊接区域
|
||||
this.ddlWLO_CODE.DataTextField = "Text";
|
||||
this.ddlWLO_CODE.DataValueField = "Value";
|
||||
this.ddlWLO_CODE.DataSource = BLL.DropListService.HJGL_WLO_CODEItem();
|
||||
this.ddlWLO_CODE.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.ddlWLO_CODE);
|
||||
|
||||
///组件1号
|
||||
this.ddlComponent1.DataTextField = "COM_Name";
|
||||
this.ddlComponent1.DataValueField = "COM_ID";
|
||||
this.ddlComponent1.DataSource = BLL.HJGL_ComponentsService.GetComponentNameList();
|
||||
this.ddlComponent1.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.ddlComponent1);
|
||||
|
||||
///组件2号
|
||||
this.ddlComponent2.DataTextField = "COM_Name";
|
||||
this.ddlComponent2.DataValueField = "COM_ID";
|
||||
this.ddlComponent2.DataSource = BLL.HJGL_ComponentsService.GetComponentNameList();
|
||||
this.ddlComponent2.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.ddlComponent2);
|
||||
|
||||
///焊丝
|
||||
this.ddlWeldSilk.DataTextField = "WeldName";
|
||||
this.ddlWeldSilk.DataValueField = "WeldId";
|
||||
this.ddlWeldSilk.DataSource = from x in Funs.DB.View_WeldInfoDropDownLists
|
||||
where x.WeldTypeName.Contains("焊丝")
|
||||
select x; // BLL.HJGL_ConsumablesService.GetMaterialList("1");
|
||||
this.ddlWeldSilk.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.ddlWeldSilk);
|
||||
|
||||
///焊条
|
||||
this.ddlWeldMat.DataTextField = "WeldName";
|
||||
this.ddlWeldMat.DataValueField = "WeldId";
|
||||
this.ddlWeldMat.DataSource = from x in Funs.DB.View_WeldInfoDropDownLists
|
||||
where x.WeldTypeName.Contains("焊条")
|
||||
select x; //BLL.HJGL_ConsumablesService.GetMaterialList("2");
|
||||
this.ddlWeldMat.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.ddlWeldMat);
|
||||
|
||||
List<Model.HandleStep> myList = new List<Model.HandleStep>();
|
||||
myList = BLL.HJGL_PW_JointInfoService.GetProessTypes();
|
||||
RadioButtonList1.DataTextField = "Name";
|
||||
RadioButtonList1.DataValueField = "Id";
|
||||
RadioButtonList1.DataSource = myList;
|
||||
RadioButtonList1.DataBind();
|
||||
|
||||
this.drpInstallationId.DataTextField = "Text";
|
||||
this.drpInstallationId.DataValueField = "Value";
|
||||
this.drpInstallationId.DataSource = BLL.Project_InstallationService.GetInstallationList(this.CurrUser.LoginProjectId);
|
||||
this.drpInstallationId.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpInstallationId);
|
||||
|
||||
//探伤比例
|
||||
this.drpNDTR_ID.DataTextField = "NDTR_Name";
|
||||
this.drpNDTR_ID.DataValueField = "NDTR_ID";
|
||||
this.drpNDTR_ID.DataSource = BLL.HJGL_DetectionService.GetNDTRateNameList();
|
||||
this.drpNDTR_ID.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpNDTR_ID);
|
||||
|
||||
//合格等级
|
||||
this.drpJOT_QualifiedLevel.DataTextField = "Text";
|
||||
this.drpJOT_QualifiedLevel.DataValueField = "Value";
|
||||
this.drpJOT_QualifiedLevel.DataSource = BLL.DropListService.HJGL_NDTClassItem();
|
||||
this.drpJOT_QualifiedLevel.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpJOT_QualifiedLevel);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载页面显示信息
|
||||
/// <summary>
|
||||
/// 加载页面显示信息
|
||||
/// </summary>
|
||||
private void LoadShowInfo()
|
||||
{
|
||||
string jotIdStr = Request.Params["jotIdList"];
|
||||
if (!string.IsNullOrEmpty(jotIdStr))
|
||||
{
|
||||
var jotIdList = jotIdStr.Split(',');
|
||||
txtJointNoS.Text = BLL.HJGL_PW_JointInfoService.ConvertJointCodeString(jotIdStr);
|
||||
var jointInfo = BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(jotIdList[0]);
|
||||
this.ISO_ID = jointInfo.ISO_ID;
|
||||
if (jointInfo != null)
|
||||
{
|
||||
this.txtJointDesc.Text = jointInfo.JOT_JointDesc;
|
||||
if (!string.IsNullOrEmpty(jointInfo.DReportID))
|
||||
{
|
||||
this.drpNDTR_ID.Enabled = false;
|
||||
this.drpIsGold.Enabled = false;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(jointInfo.STE_ID))
|
||||
{
|
||||
this.ddlSTE1.SelectedValue = jointInfo.STE_ID;
|
||||
var ste = BLL.HJGL_MaterialService.GetSteelBySteID(jointInfo.STE_ID);
|
||||
if (ste != null)
|
||||
{
|
||||
this.txtHardQuaStandard.Text = ste.HardQuaStandard;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(jointInfo.STE_ID2))
|
||||
{
|
||||
this.ddlSTE2.SelectedValue = jointInfo.STE_ID2;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(jointInfo.JOTY_ID))
|
||||
{
|
||||
this.ddlJOTY_ID.SelectedValue = jointInfo.JOTY_ID;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(jointInfo.JST_ID))
|
||||
{
|
||||
this.ddlJST_ID.SelectedValue = jointInfo.JST_ID;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(jointInfo.JOT_JointAttribute))
|
||||
{
|
||||
this.ddlJointAttribute.SelectedValue = jointInfo.JOT_JointAttribute;
|
||||
//if (this.ddlJointAttribute.SelectedValue == "固定")
|
||||
//{
|
||||
// if (this.txtJointNo.Text.Trim().Last() != 'G')
|
||||
// {
|
||||
// this.txtJointNo.Text = this.txtJointNo.Text.Trim() + "G";
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// if (this.txtJointNo.Text.Trim().Last() == 'G')
|
||||
// {
|
||||
// this.txtJointNo.Text = this.txtJointNo.Text.Trim().Replace("G", "");
|
||||
// }
|
||||
//}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(jointInfo.WME_ID))
|
||||
{
|
||||
this.ddlWME_ID.SelectedValue = jointInfo.WME_ID;
|
||||
}
|
||||
this.txtSize.Text = Convert.ToString(jointInfo.JOT_Size);
|
||||
this.txtDial.Text = (jointInfo.JOT_Dia ?? 0).ToString("N2");
|
||||
this.txtSch.Text = jointInfo.JOT_Sch;
|
||||
if (!string.IsNullOrEmpty(jointInfo.WLO_Code))
|
||||
{
|
||||
this.ddlWLO_CODE.SelectedValue = jointInfo.WLO_Code;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(jointInfo.JOT_Component1))
|
||||
{
|
||||
this.ddlComponent1.SelectedValue = jointInfo.JOT_Component1;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(jointInfo.JOT_Component2))
|
||||
{
|
||||
this.ddlComponent2.SelectedValue = jointInfo.JOT_Component2;
|
||||
}
|
||||
this.txtLastTemp.Text = Convert.ToString(jointInfo.JOT_LastTemp);
|
||||
this.txtCellTemp.Text = Convert.ToString(jointInfo.JOT_CellTemp);
|
||||
this.txtPrepareTemp.Text = Convert.ToString(jointInfo.JOT_PrepareTemp);
|
||||
if (!string.IsNullOrEmpty(jointInfo.JOT_WeldSilk))
|
||||
{
|
||||
this.ddlWeldSilk.SelectedValue = jointInfo.JOT_WeldSilk;
|
||||
}
|
||||
if (jointInfo.WeldL != null)
|
||||
{
|
||||
this.txtWeldL.Text = jointInfo.WeldL.ToString();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(jointInfo.JOT_WeldMat))
|
||||
{
|
||||
this.ddlWeldMat.SelectedValue = jointInfo.JOT_WeldMat;
|
||||
}
|
||||
this.txtElectricity.Text = jointInfo.JOT_Electricity;
|
||||
this.txtVoltage.Text = jointInfo.JOT_Voltage;
|
||||
if (!string.IsNullOrEmpty(jointInfo.IS_Proess))
|
||||
{
|
||||
this.drpIS_Proess.SelectedValue = jointInfo.IS_Proess;
|
||||
if (jointInfo.IS_Proess == "1")
|
||||
{
|
||||
this.drpProessTypes.Hidden = false;
|
||||
if (!string.IsNullOrEmpty(jointInfo.ProessTypes))
|
||||
{
|
||||
string[] proessTypes = jointInfo.ProessTypes.Split('|');
|
||||
this.drpProessTypes.Values = proessTypes;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (jointInfo.IsSpecial == true)
|
||||
{
|
||||
this.drpIsSpecial.SelectedValue = "1";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpIsSpecial.SelectedValue = "0";
|
||||
}
|
||||
this.txtRemark.Text = jointInfo.JOT_Remark;
|
||||
if (!string.IsNullOrEmpty(jointInfo.InstallationId))
|
||||
{
|
||||
this.drpInstallationId.Items.Clear();
|
||||
this.drpInstallationId.DataTextField = "Text";
|
||||
this.drpInstallationId.DataValueField = "Value";
|
||||
this.drpInstallationId.DataSource = BLL.Project_InstallationService.GetInstallationList(jointInfo.ProjectId);
|
||||
this.drpInstallationId.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpInstallationId);
|
||||
this.drpInstallationId.SelectedValue = jointInfo.InstallationId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(jointInfo.NDTR_ID))
|
||||
{
|
||||
this.drpNDTR_ID.SelectedValue = jointInfo.NDTR_ID;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(jointInfo.JOT_QualifiedLevel))
|
||||
{
|
||||
this.drpJOT_QualifiedLevel.SelectedValue = jointInfo.JOT_QualifiedLevel;
|
||||
}
|
||||
this.txtPressureTestPackageNo.Text = jointInfo.PressureTestPackageNo;
|
||||
if (jointInfo.IsGold == true)
|
||||
{
|
||||
this.drpIsGold.SelectedValue = "1";
|
||||
this.drpNDTR_ID.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpIsGold.SelectedValue = "0";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 文本框是否可编辑
|
||||
/// <summary>
|
||||
/// 文本框是否可编辑
|
||||
/// </summary>
|
||||
/// <param name="readOnly"></param>
|
||||
private void TextIsReadOnly(bool readOnly)
|
||||
{
|
||||
//this.btnSave.Hidden = readOnly;
|
||||
//this.txtJointNo.Readonly = readOnly;
|
||||
this.ddlWLO_CODE.Enabled = !readOnly;
|
||||
this.ddlSTE1.Enabled = !readOnly;
|
||||
this.ddlSTE2.Enabled = !readOnly;
|
||||
this.ddlComponent1.Enabled = !readOnly;
|
||||
this.ddlComponent2.Enabled = !readOnly;
|
||||
this.txtJointDesc.Readonly = readOnly;
|
||||
this.ddlJOTY_ID.Enabled = !readOnly;
|
||||
this.txtSize.Readonly = readOnly;
|
||||
this.txtDial.Readonly = readOnly;
|
||||
this.ddlJST_ID.Enabled = !readOnly;
|
||||
this.txtSch.Readonly = readOnly;
|
||||
this.txtLastTemp.Readonly = readOnly;
|
||||
this.txtCellTemp.Readonly = readOnly;
|
||||
//this.txtPrepareTemp.Readonly = readOnly;
|
||||
this.ddlJointAttribute.Enabled = !readOnly;
|
||||
this.ddlWME_ID.Enabled = !readOnly;
|
||||
this.ddlWeldSilk.Enabled = !readOnly;
|
||||
this.ddlWeldMat.Enabled = !readOnly;
|
||||
this.txtElectricity.Readonly = readOnly;
|
||||
this.txtVoltage.Readonly = readOnly;
|
||||
this.txtRemark.Readonly = readOnly;
|
||||
this.drpInstallationId.Enabled = !readOnly;
|
||||
this.drpNDTR_ID.Enabled = !readOnly;
|
||||
this.drpJOT_QualifiedLevel.Enabled = !readOnly;
|
||||
this.drpIsSpecial.Enabled = !readOnly;
|
||||
this.txtHardQuaStandard.Readonly = readOnly;
|
||||
this.txtWeldL.Readonly = readOnly;
|
||||
}
|
||||
#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_JointInfoMenuId, Const.BtnSave))
|
||||
{
|
||||
if (this.drpInstallationId.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.drpInstallationId.SelectedValue))
|
||||
{
|
||||
Alert.ShowInTop("请选择装置!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.ddlSTE1.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.ddlSTE1.SelectedValue))
|
||||
{
|
||||
Alert.ShowInTop("请选择材质1!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.ddlJOTY_ID.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.ddlJOTY_ID.SelectedValue))
|
||||
{
|
||||
Alert.ShowInTop("请选择焊缝类型!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.ddlJST_ID.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.ddlJST_ID.SelectedValue))
|
||||
{
|
||||
Alert.ShowInTop("请选择坡口类型!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.ddlJointAttribute.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.ddlJointAttribute.SelectedValue))
|
||||
{
|
||||
Alert.ShowInTop("请选择焊口属性!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.ddlWME_ID.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.ddlWME_ID.SelectedValue))
|
||||
{
|
||||
Alert.ShowInTop("请选择焊接方法!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpNDTR_ID.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.drpNDTR_ID.SelectedValue))
|
||||
{
|
||||
Alert.ShowInTop("请选择探伤比例!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.drpJOT_QualifiedLevel.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.drpJOT_QualifiedLevel.SelectedValue))
|
||||
{
|
||||
Alert.ShowInTop("请选择合格等级!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
string jotIdStr = Request.Params["jotIdList"];
|
||||
if (!string.IsNullOrEmpty(jotIdStr))
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var jotIdList = jotIdStr.Split(',');
|
||||
foreach (var jotId in jotIdList)
|
||||
{
|
||||
Model.HJGL_PW_JointInfo newJointInfo = db.HJGL_PW_JointInfo.FirstOrDefault(x => x.JOT_ID == jotId);
|
||||
var hotItems = from x in BLL.Funs.DB.HJGL_CH_HotProessTrustItem where x.JOT_ID == jotId select x;
|
||||
var batchDetail = BLL.HJGL_BO_BatchDetailService.GetBatchDetailByJotId(jotId);
|
||||
if ((batchDetail != null || hotItems.Count() > 0) && this.CurrUser.UserId != BLL.Const.GlyId)
|
||||
{
|
||||
newJointInfo.JOT_PrepareTemp = Funs.GetNewDecimal(this.txtPrepareTemp.Text);
|
||||
newJointInfo.PressureTestPackageNo = this.txtPressureTestPackageNo.Text;
|
||||
if (this.drpIS_Proess.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newJointInfo.IS_Proess = this.drpIS_Proess.SelectedValue;
|
||||
if (this.drpIS_Proess.SelectedValue == "1")
|
||||
{
|
||||
if (drpProessTypes.Values.Length > 0)
|
||||
{
|
||||
newJointInfo.ProessTypes = String.Join("|", drpProessTypes.Values);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择热处理类型!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
BLL.HJGL_PW_JointInfoService.UpdateJointInfo(newJointInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
newJointInfo.JOT_JointDesc = this.txtJointDesc.Text.Trim();
|
||||
newJointInfo.STE_ID = this.ddlSTE1.SelectedValue;
|
||||
if (this.ddlSTE2.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newJointInfo.STE_ID2 = this.ddlSTE2.SelectedValue;
|
||||
}
|
||||
newJointInfo.JOTY_ID = this.ddlJOTY_ID.SelectedValue;
|
||||
newJointInfo.JST_ID = this.ddlJST_ID.SelectedValue;
|
||||
newJointInfo.JOT_JointAttribute = this.ddlJointAttribute.SelectedValue;
|
||||
newJointInfo.WME_ID = this.ddlWME_ID.SelectedValue;
|
||||
newJointInfo.JOT_Size = Funs.GetNewDecimal(this.txtSize.Text);
|
||||
newJointInfo.JOT_Dia = Funs.GetNewDecimal(this.txtDial.Text);
|
||||
newJointInfo.JOT_Sch = this.txtSch.Text.Trim();
|
||||
if (this.ddlWLO_CODE.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newJointInfo.WLO_Code = this.ddlWLO_CODE.SelectedValue;
|
||||
}
|
||||
if (this.ddlComponent1.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newJointInfo.JOT_Component1 = this.ddlComponent1.SelectedValue;
|
||||
}
|
||||
if (this.ddlComponent2.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newJointInfo.JOT_Component2 = this.ddlComponent2.SelectedValue;
|
||||
}
|
||||
newJointInfo.JOT_LastTemp = Funs.GetNewDecimal(this.txtLastTemp.Text);
|
||||
newJointInfo.JOT_CellTemp = Funs.GetNewDecimal(this.txtCellTemp.Text);
|
||||
newJointInfo.JOT_PrepareTemp = Funs.GetNewDecimal(this.txtPrepareTemp.Text);
|
||||
if (this.ddlWeldSilk.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newJointInfo.JOT_WeldSilk = this.ddlWeldSilk.SelectedValue;
|
||||
}
|
||||
if (this.ddlWeldMat.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newJointInfo.JOT_WeldMat = this.ddlWeldMat.SelectedValue;
|
||||
}
|
||||
newJointInfo.JOT_Electricity = this.txtElectricity.Text.Trim();
|
||||
newJointInfo.JOT_Voltage = this.txtVoltage.Text.Trim();
|
||||
if (this.drpIS_Proess.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newJointInfo.IS_Proess = this.drpIS_Proess.SelectedValue;
|
||||
if (this.drpIS_Proess.SelectedValue == "1")
|
||||
{
|
||||
if (drpProessTypes.Values.Length > 0)
|
||||
{
|
||||
newJointInfo.ProessTypes = String.Join("|", drpProessTypes.Values);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择热处理类型!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
newJointInfo.JOT_Remark = this.txtRemark.Text;
|
||||
newJointInfo.PressureTestPackageNo = this.txtPressureTestPackageNo.Text;
|
||||
newJointInfo.InstallationId = this.drpInstallationId.SelectedValue;
|
||||
newJointInfo.NDTR_ID = this.drpNDTR_ID.SelectedValue;
|
||||
newJointInfo.JOT_QualifiedLevel = this.drpJOT_QualifiedLevel.SelectedValue;
|
||||
if (this.drpIsSpecial.SelectedValue == "1")
|
||||
{
|
||||
newJointInfo.IsSpecial = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
newJointInfo.IsSpecial = false;
|
||||
}
|
||||
if (this.drpIsGold.SelectedValue == "1")
|
||||
{
|
||||
newJointInfo.IsGold = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
newJointInfo.IsGold = false;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtWeldL.Text))
|
||||
{
|
||||
newJointInfo.WeldL = Convert.ToInt32(this.txtWeldL.Text);
|
||||
}
|
||||
newJointInfo.JOT_JointStatus = "100";
|
||||
newJointInfo.JOT_TrustFlag = "00";
|
||||
newJointInfo.JOT_CheckFlag = "00";
|
||||
if (newJointInfo.DReportID != null)
|
||||
{
|
||||
BLL.HJGL_PW_JointInfoService.UpdateJointNoAddG(jotId, this.ddlJointAttribute.SelectedValue, Const.BtnModify);
|
||||
}
|
||||
var joty = BLL.HJGL_WeldService.GetJointTypeByID(newJointInfo.JOTY_ID);
|
||||
if (joty != null)
|
||||
{
|
||||
var jot = BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(jotId);
|
||||
if (jot != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(jot.JOT_JointNo))
|
||||
{
|
||||
if (joty.JOTY_Group == "2")//角焊缝(承插)
|
||||
{
|
||||
if (char.IsDigit(jot.JOT_JointNo[0]))
|
||||
{
|
||||
newJointInfo.JOT_JointNo = "C" + jot.JOT_JointNo;
|
||||
}
|
||||
else
|
||||
{
|
||||
newJointInfo.JOT_JointNo = "C" + jot.JOT_JointNo.Substring(1);
|
||||
}
|
||||
}
|
||||
else if (joty.JOTY_Group == "3")//支管连接焊缝
|
||||
{
|
||||
if (char.IsDigit(jot.JOT_JointNo[0]))
|
||||
{
|
||||
newJointInfo.JOT_JointNo = "D" + jot.JOT_JointNo;
|
||||
}
|
||||
else
|
||||
{
|
||||
newJointInfo.JOT_JointNo = "D" + jot.JOT_JointNo.Substring(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BLL.HJGL_PW_JointInfoService.UpdateJointInfo(newJointInfo);
|
||||
|
||||
//// 更新排序字段
|
||||
string strSort = @"UPDATE dbo.HJGL_PW_JointInfo SET
|
||||
Sort1=(case when PATINDEX('[A-Z]%',JOT_JointNo)>0 THEN 'B'
|
||||
WHEN ISNUMERIC(JOT_JointNo)=1 then 'C' ELSE 'C' END),
|
||||
Sort2=(CASE WHEN ISNUMERIC(JOT_JointNo)=1 then try_cast(REPLACE(JOT_JointNo,'.','') AS INT)
|
||||
WHEN ISNUMERIC(SUBSTRING(JOT_JointNo,0,CHARINDEX('Z',JOT_JointNo)))=1
|
||||
THEN TRY_CAST(SUBSTRING(JOT_JointNo,0,CHARINDEX('Z',JOT_JointNo)) as int)
|
||||
WHEN PATINDEX('[0-9]%',JOT_JointNo)>0 then
|
||||
TRY_CAST(left(JOT_JointNo,PATINDEX('%[^0-9]%',JOT_JointNo)-1) as int)
|
||||
ELSE 0 END),
|
||||
Sort3= SUBSTRING(JOT_JointNo,1,1),
|
||||
Sort4=(CASE WHEN CHARINDEX('Z',JOT_JointNo)>0 and SUBSTRING(JOT_JointNo,1,1)<>'Z'
|
||||
THEN ISNULL(TRY_CAST(SUBSTRING(replace(JOT_JointNo,'#',''),2,CHARINDEX('Z',JOT_JointNo)-2) as int),0)
|
||||
WHEN PATINDEX('%[A-G]%',SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)))>0
|
||||
THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,2,len(JOT_JointNo)-2) as int),0)
|
||||
ELSE ISNULL(TRY_CAST(SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)) as int),0) END),
|
||||
Sort5=(CASE WHEN CHARINDEX('Z',JOT_JointNo)>0
|
||||
THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,charindex('Z',JOT_JointNo)+1,len(JOT_JointNo)) AS INT),0)
|
||||
WHEN PATINDEX('%[A-Y]',SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)))>0
|
||||
THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,2,len(JOT_JointNo)-1) as int),0) ELSE 0 END)
|
||||
WHERE JOT_ID='" + jotId+ "'";
|
||||
SQLHelper.ExecutSql(strSort);
|
||||
}
|
||||
}
|
||||
}
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 格式化字符串
|
||||
/// <summary>
|
||||
/// 材质1下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlSTE1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.ddlSTE1.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
var ste = BLL.HJGL_MaterialService.GetSteelBySteID(this.ddlSTE1.SelectedValue);
|
||||
if (ste != null)
|
||||
{
|
||||
this.txtHardQuaStandard.Text = ste.HardQuaStandard;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtHardQuaStandard.Text = string.Empty;
|
||||
}
|
||||
this.ddlSTE2.SelectedValue = ddlSTE1.SelectedValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtHardQuaStandard.Text = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 焊缝类型下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlJOTY_ID_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.ddlJOTY_ID.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
var joty = BLL.HJGL_WeldService.GetJointTypeByID(this.ddlJOTY_ID.SelectedValue);
|
||||
if (joty != null)
|
||||
{
|
||||
var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(this.ISO_ID);
|
||||
if (isoInfo != null)
|
||||
{
|
||||
if (joty.JOTY_Group == "1")//对接
|
||||
{
|
||||
if (!string.IsNullOrEmpty(isoInfo.Joty_B_Rate))
|
||||
{
|
||||
this.drpNDTR_ID.SelectedValue = isoInfo.Joty_B_Rate;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpNDTR_ID.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(isoInfo.Joty_B_Level))
|
||||
{
|
||||
this.drpJOT_QualifiedLevel.SelectedValue = isoInfo.Joty_B_Level;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
}
|
||||
else if (joty.JOTY_Group == "2")//角焊缝(承插)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(isoInfo.Joty_C_Rate))
|
||||
{
|
||||
this.drpNDTR_ID.SelectedValue = isoInfo.Joty_C_Rate;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpNDTR_ID.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(isoInfo.Joty_C_Level))
|
||||
{
|
||||
this.drpJOT_QualifiedLevel.SelectedValue = isoInfo.Joty_C_Level;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
//焊口号前自动加C
|
||||
//string jointNo = this.txtJointNo.Text.Trim();
|
||||
//if (!string.IsNullOrEmpty(jointNo))
|
||||
//{
|
||||
// if (char.IsDigit(jointNo[0]))
|
||||
// {
|
||||
// this.txtJointNo.Text = "C" + jointNo;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// this.txtJointNo.Text = "C" + jointNo.Substring(1);
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// this.txtJointNo.Text = "C";
|
||||
//}
|
||||
}
|
||||
else if (joty.JOTY_Group == "3")//支管连接焊缝
|
||||
{
|
||||
if (!string.IsNullOrEmpty(isoInfo.Joty_D_Rate))
|
||||
{
|
||||
this.drpNDTR_ID.SelectedValue = isoInfo.Joty_D_Rate;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpNDTR_ID.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(isoInfo.Joty_D_Level))
|
||||
{
|
||||
this.drpJOT_QualifiedLevel.SelectedValue = isoInfo.Joty_D_Level;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
////焊口号前自动加D
|
||||
//string jointNo = this.txtJointNo.Text.Trim();
|
||||
//if (!string.IsNullOrEmpty(jointNo))
|
||||
//{
|
||||
// if (char.IsDigit(jointNo[0]))
|
||||
// {
|
||||
// this.txtJointNo.Text = "D" + jointNo;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// this.txtJointNo.Text = "D" + jointNo.Substring(1);
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// this.txtJointNo.Text = "D";
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpNDTR_ID.SelectedValue = BLL.Const._Null;
|
||||
this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpNDTR_ID.SelectedValue = BLL.Const._Null;
|
||||
this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 焊工属性下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlJointAttribute_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
//if (this.ddlJointAttribute.SelectedValue == "固定")
|
||||
//{
|
||||
//if (this.txtJointNo.Text.Trim().Last() != 'G')
|
||||
//{
|
||||
// this.txtJointNo.Text = this.txtJointNo.Text.Trim() + "G";
|
||||
//}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
//if (this.txtJointNo.Text.Trim().Last() == 'G')
|
||||
//{
|
||||
// this.txtJointNo.Text = this.txtJointNo.Text.Trim().Replace("G", "");
|
||||
//}
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据寸经外径对照表,输入外径是自动得到寸径;焊口规格:Φ外径*壁厚
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtText_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//根据寸经外径对照表,输入外径是自动得到寸径
|
||||
if (!string.IsNullOrEmpty(this.txtDial.Text.Trim()))
|
||||
{
|
||||
decimal dia = Funs.GetNewDecimalOrZero(this.txtDial.Text.Trim());
|
||||
if (dia >= 500)
|
||||
{
|
||||
this.drpIsSpecial.SelectedValue = "1";
|
||||
}
|
||||
var inch = HJGL_ControlService.GetSizeByDia(dia);
|
||||
if (inch != null)
|
||||
{
|
||||
this.txtSize.Text = Convert.ToString(inch);
|
||||
}
|
||||
}
|
||||
|
||||
//焊口规格:Φ外径*壁厚
|
||||
if (!string.IsNullOrEmpty(this.txtDial.Text.Trim()) && !string.IsNullOrEmpty(this.txtSch.Text.Trim()))
|
||||
{
|
||||
this.txtJointDesc.Text = "Φ" + this.txtDial.Text.Trim() + "×" + this.txtSch.Text.Trim();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否显示热处理类型
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpIS_Proess_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpIS_Proess.SelectedValue == "1")
|
||||
{
|
||||
this.drpProessTypes.Hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpProessTypes.Hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 热处理类型选择变化事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
string jotIdStr = Request.Params["jotIdList"];
|
||||
var jotIdList = jotIdStr.Split(',');
|
||||
//已委托的热处理类型
|
||||
var isTrustProessTypes = from x in BLL.Funs.DB.HJGL_CH_HotProessTrustItem where x.JOT_ID == jotIdList[0] select x.ProessTypes;
|
||||
if (drpProessTypes.Values.Length > 0)
|
||||
{
|
||||
List<string> strs = this.RadioButtonList1.SelectedValueArray.ToList();
|
||||
foreach (var isTrustProessType in isTrustProessTypes) //已委托的热处理类型不能去除
|
||||
{
|
||||
if (!strs.Contains(isTrustProessType))
|
||||
{
|
||||
strs.Add(isTrustProessType);
|
||||
}
|
||||
}
|
||||
this.RadioButtonList1.SelectedValueArray = strs.ToArray();
|
||||
this.drpProessTypes.Values = strs.ToArray();
|
||||
string proessTypes = String.Join("|", drpProessTypes.Values);
|
||||
this.drpProessTypes.Text = BLL.HJGL_PW_JointInfoService.ConvertProessTypes(proessTypes);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择热处理类型!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
protected void drpIsGold_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
//var jotIdList = jotIdStr.Split(',');
|
||||
//foreach (var item in jotIdList)
|
||||
//{
|
||||
if (this.drpIsGold.SelectedValue == "1")
|
||||
{
|
||||
this.drpNDTR_ID.SelectedValue = "e2612188-fc99-492a-937c-74c7a0151656"; //黄金口检测比例100%
|
||||
this.drpNDTR_ID.Enabled = false;
|
||||
//this.txtJointNoPrix.Text =BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(item).JOT_JointNo + "H";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drpNDTR_ID.SelectedValue = BLL.Const._Null;
|
||||
this.drpNDTR_ID.Enabled = true;
|
||||
//string jotNo= BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(item).JOT_JointNo;
|
||||
//this.txtJointNo.Text = this.txtJointNo.Text.Trim().Substring(0, this.txtJointNo.Text.Trim().Length - 1);
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 外径输入事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtDial_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//根据寸经外径对照表,输入外径是自动得到寸径
|
||||
if (!string.IsNullOrEmpty(this.txtDial.Text.Trim()))
|
||||
{
|
||||
decimal dia = Funs.GetNewDecimalOrZero(this.txtDial.Text.Trim());
|
||||
if (dia >= 500)
|
||||
{
|
||||
this.drpIsSpecial.SelectedValue = "1";
|
||||
}
|
||||
var inch = HJGL_ControlService.GetSizeByDia(dia);
|
||||
if (inch != null)
|
||||
{
|
||||
this.txtSize.Text = Convert.ToString(inch);
|
||||
}
|
||||
}
|
||||
|
||||
//焊口规格:Φ外径*壁厚
|
||||
if (!string.IsNullOrEmpty(this.txtDial.Text.Trim()) && !string.IsNullOrEmpty(this.txtSch.Text.Trim()))
|
||||
{
|
||||
this.txtJointDesc.Text = "Φ" + this.txtDial.Text.Trim() + "×" + this.txtSch.Text.Trim();
|
||||
}
|
||||
}
|
||||
|
||||
// 非常规焊缝
|
||||
protected void txtWeldL_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.txtWeldL.Text.Trim()))
|
||||
{
|
||||
this.txtJointDesc.Text = "L=" + this.txtWeldL.Text.Trim() + "×" + this.txtSch.Text.Trim();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+395
@@ -0,0 +1,395 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
|
||||
|
||||
public partial class JointInfoBatchModity
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// txtJointNoS 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtJointNoS;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// drpInstallationId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpInstallationId;
|
||||
|
||||
/// <summary>
|
||||
/// ddlSTE1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlSTE1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlSTE2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlSTE2;
|
||||
|
||||
/// <summary>
|
||||
/// ddlJOTY_ID 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlJOTY_ID;
|
||||
|
||||
/// <summary>
|
||||
/// ddlJST_ID 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlJST_ID;
|
||||
|
||||
/// <summary>
|
||||
/// ddlJointAttribute 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlJointAttribute;
|
||||
|
||||
/// <summary>
|
||||
/// ddlWME_ID 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlWME_ID;
|
||||
|
||||
/// <summary>
|
||||
/// ddlWLO_CODE 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlWLO_CODE;
|
||||
|
||||
/// <summary>
|
||||
/// txtJointDesc 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtJointDesc;
|
||||
|
||||
/// <summary>
|
||||
/// txtDial 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtDial;
|
||||
|
||||
/// <summary>
|
||||
/// txtSch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtSch;
|
||||
|
||||
/// <summary>
|
||||
/// txtSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtSize;
|
||||
|
||||
/// <summary>
|
||||
/// ddlComponent1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlComponent1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlComponent2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlComponent2;
|
||||
|
||||
/// <summary>
|
||||
/// txtLastTemp 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtLastTemp;
|
||||
|
||||
/// <summary>
|
||||
/// txtCellTemp 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtCellTemp;
|
||||
|
||||
/// <summary>
|
||||
/// txtPrepareTemp 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtPrepareTemp;
|
||||
|
||||
/// <summary>
|
||||
/// ddlWeldSilk 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlWeldSilk;
|
||||
|
||||
/// <summary>
|
||||
/// ddlWeldMat 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlWeldMat;
|
||||
|
||||
/// <summary>
|
||||
/// txtElectricity 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtElectricity;
|
||||
|
||||
/// <summary>
|
||||
/// txtVoltage 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtVoltage;
|
||||
|
||||
/// <summary>
|
||||
/// txtPressureTestPackageNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPressureTestPackageNo;
|
||||
|
||||
/// <summary>
|
||||
/// drpIS_Proess 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpIS_Proess;
|
||||
|
||||
/// <summary>
|
||||
/// drpProessTypes 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownBox drpProessTypes;
|
||||
|
||||
/// <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>
|
||||
/// drpNDTR_ID 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpNDTR_ID;
|
||||
|
||||
/// <summary>
|
||||
/// drpJOT_QualifiedLevel 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpJOT_QualifiedLevel;
|
||||
|
||||
/// <summary>
|
||||
/// drpIsGold 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpIsGold;
|
||||
|
||||
/// <summary>
|
||||
/// drpIsSpecial 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpIsSpecial;
|
||||
|
||||
/// <summary>
|
||||
/// txtHardQuaStandard 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtHardQuaStandard;
|
||||
|
||||
/// <summary>
|
||||
/// txtWeldL 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtWeldL;
|
||||
|
||||
/// <summary>
|
||||
/// lbDef 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbDef;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtRemark;
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,9 @@
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnOut2" OnClick="btnOut2_Click" runat="server" Text="按导入模板导出" Icon="Accept"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出EXCEL" Icon="Accept"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
using BLL;
|
||||
using FastReport.DevComponents.DotNetBar;
|
||||
using Model;
|
||||
using NPOI.SS.UserModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using BLL;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
public partial class JointInfoOut : PageBase
|
||||
@@ -19,7 +24,7 @@
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
{
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
@@ -43,14 +48,14 @@
|
||||
// strSql += " AND COM_Code LIKE @COM_Code";
|
||||
// listStr.Add(new SqlParameter("@COM_Code", "%" + this.txtCode.Text.Trim() + "%"));
|
||||
//}
|
||||
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
|
||||
Grid1.DataSource = table;
|
||||
@@ -168,6 +173,259 @@
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 按导入模板导出
|
||||
/// <summary>
|
||||
/// 按导入模板导出
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut2_Click(object sender, EventArgs e)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initTemplatePath = Const.JointInTemplateUrl;
|
||||
string uploadfilepath = string.Empty;
|
||||
string newUrl = string.Empty;
|
||||
uploadfilepath = rootPath + initTemplatePath;
|
||||
|
||||
|
||||
string isoId = Request.QueryString["ISO_ID"] ?? string.Empty;
|
||||
if (!string.IsNullOrEmpty(isoId))
|
||||
{
|
||||
var lists = from x in Funs.DB.HJGL_View_JointInfo
|
||||
where x.ISO_ID == isoId
|
||||
select x;
|
||||
|
||||
lists = lists.OrderBy(x => x.JOTY_Group).OrderBy(x => x.Sort1).OrderBy(x => x.Sort2).OrderBy(x => x.Sort3).OrderBy(x => x.Sort4).OrderBy(x => x.Sort5);
|
||||
if (lists != null)
|
||||
{
|
||||
newUrl = uploadfilepath.Replace("焊口信息导入模板", "焊口信息");
|
||||
if (File.Exists(newUrl))
|
||||
{
|
||||
File.Delete(newUrl);
|
||||
}
|
||||
File.Copy(uploadfilepath, newUrl);
|
||||
// 第一步:读取文件流
|
||||
NPOI.SS.UserModel.IWorkbook workbook;
|
||||
using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
//workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
|
||||
workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
|
||||
}
|
||||
// 创建单元格样式
|
||||
NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
|
||||
cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
cellStyle.WrapText = true;//自动换行
|
||||
var font = workbook.CreateFont();
|
||||
font.FontHeightInPoints = 11;
|
||||
cellStyle.SetFont(font);
|
||||
// 第二步:创建新数据行
|
||||
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
|
||||
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
|
||||
NPOI.SS.UserModel.ICell cell;
|
||||
int i = 1;
|
||||
foreach (var item in lists)
|
||||
{
|
||||
// 第二步:创建新数据行
|
||||
row = sheet.CreateRow(i);
|
||||
// 添加数据
|
||||
//施工号
|
||||
cell = row.CreateCell(0);
|
||||
cell.CellStyle = cellStyle;
|
||||
string proCode = string.Empty;
|
||||
var pro = BLL.Base_ProjectService.GetProjectByProjectId(item.ProjectId);
|
||||
if (pro != null)
|
||||
{
|
||||
proCode = pro.ProjectCode;
|
||||
}
|
||||
cell.SetCellValue(proCode);
|
||||
//管线号
|
||||
cell = row.CreateCell(1);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.ISO_IsoNo);
|
||||
//焊口号
|
||||
cell = row.CreateCell(2);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.JOT_JointNo);
|
||||
//装置
|
||||
cell = row.CreateCell(3);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.InstallationName);
|
||||
//材质一
|
||||
cell = row.CreateCell(4);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.STE_Name1);
|
||||
//材质二
|
||||
cell = row.CreateCell(5);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.STE_Name2);
|
||||
//焊缝类型
|
||||
cell = row.CreateCell(6);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.JOTY_Name);
|
||||
//坡口类型
|
||||
cell = row.CreateCell(7);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.JST_Name);
|
||||
//焊口属性
|
||||
cell = row.CreateCell(8);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.JOT_JointAttribute);
|
||||
//焊接方法
|
||||
cell = row.CreateCell(9);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.WME_Name);
|
||||
//外径
|
||||
cell = row.CreateCell(10);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.JOT_Dia.HasValue ? item.JOT_Dia.ToString() : "");
|
||||
//壁厚
|
||||
cell = row.CreateCell(11);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.JOT_Sch);
|
||||
//寸径
|
||||
cell = row.CreateCell(12);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.JOT_Size.HasValue?item.JOT_Size.ToString():"");
|
||||
//焊接区域
|
||||
cell = row.CreateCell(13);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.WLO_Code == "F" ? "安装" : "预制");
|
||||
//组件一
|
||||
cell = row.CreateCell(14);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Component1);
|
||||
//组件二
|
||||
cell = row.CreateCell(15);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.Component2);
|
||||
//后热温度
|
||||
cell = row.CreateCell(16);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.JOT_LastTemp.HasValue ? item.JOT_LastTemp.ToString() : "");
|
||||
//层间温度
|
||||
cell = row.CreateCell(17);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.JOT_CellTemp.HasValue ? item.JOT_CellTemp.ToString() : "");
|
||||
//预热温度
|
||||
cell = row.CreateCell(18);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.JOT_PrepareTemp.HasValue ? item.JOT_PrepareTemp.ToString() : "");
|
||||
//焊丝
|
||||
cell = row.CreateCell(19);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.WeldSilk);
|
||||
//焊条
|
||||
cell = row.CreateCell(20);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.WeldMat);
|
||||
//焊接电流
|
||||
cell = row.CreateCell(21);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.JOT_Electricity);
|
||||
//焊接电压
|
||||
cell = row.CreateCell(22);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.JOT_Voltage);
|
||||
//是否热处理
|
||||
cell = row.CreateCell(23);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.IS_Proess == "1" ? "是" : "否");
|
||||
//热处理类型(是否热处理为‘是’时填写 分别为:预热, 消氢, 后热, 消应力热处理,稳定化处理 填写时请用英文逗号隔开)
|
||||
cell = row.CreateCell(24);
|
||||
cell.CellStyle = cellStyle;
|
||||
string proessTypes = string.Empty;
|
||||
if (!string.IsNullOrEmpty(item.ProessTypes))
|
||||
{
|
||||
foreach (var t in item.ProessTypes.Split('|'))
|
||||
{
|
||||
if (t == "1")
|
||||
{
|
||||
proessTypes += "预热,";
|
||||
}
|
||||
else if (t == "2")
|
||||
{
|
||||
proessTypes += "消氢,";
|
||||
}
|
||||
else if (t == "3")
|
||||
{
|
||||
proessTypes += "后热,";
|
||||
}
|
||||
else if (t == "4")
|
||||
{
|
||||
proessTypes += "消应力热处理,";
|
||||
}
|
||||
else if (t == "5")
|
||||
{
|
||||
proessTypes += "稳定化处理,";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(proessTypes))
|
||||
{
|
||||
proessTypes = proessTypes.Substring(0, proessTypes.LastIndexOf(","));
|
||||
}
|
||||
}
|
||||
cell.SetCellValue(proessTypes);
|
||||
//是否特殊
|
||||
cell = row.CreateCell(25);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.IsSpecial == true ? "是" : "否");
|
||||
//探伤比例
|
||||
cell = row.CreateCell(26);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.NDTR_Name);
|
||||
//合格等级
|
||||
cell = row.CreateCell(27);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.JOT_QualifiedLevel);
|
||||
//硬度合格标准
|
||||
cell = row.CreateCell(28);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.HardQuaStandard);
|
||||
//非常焊缝
|
||||
cell = row.CreateCell(29);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.WeldL.HasValue ? item.WeldL.ToString() : "");
|
||||
//黄金口(是 / 否)
|
||||
cell = row.CreateCell(30);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.IsGold == true ? "是" : "否");
|
||||
//备注
|
||||
cell = row.CreateCell(31);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.JOT_Remark);
|
||||
i++;
|
||||
}
|
||||
// 第三步:写入文件流
|
||||
using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
|
||||
{
|
||||
workbook.Write(stream);
|
||||
workbook.Close();
|
||||
}
|
||||
string fileName = Path.GetFileName(newUrl);
|
||||
FileInfo info = new FileInfo(newUrl);
|
||||
long fileSize = info.Length;
|
||||
Response.Clear();
|
||||
Response.ContentType = "application/x-zip-compressed";
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.AddHeader("Content-Length", fileSize.ToString());
|
||||
Response.TransmitFile(newUrl, 0, fileSize);
|
||||
Response.Flush();
|
||||
Response.Close();
|
||||
File.Delete(newUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -7,11 +7,13 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
|
||||
|
||||
public partial class JointInfoOut {
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
|
||||
|
||||
public partial class JointInfoOut
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar3 控件。
|
||||
/// </summary>
|
||||
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar3;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
@@ -65,7 +67,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnOut2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut2;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
@@ -74,7 +85,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
@@ -83,7 +94,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
@@ -92,7 +103,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
|
||||
<add path="FastReport.Export.axd" verb="*" type="FastReport.Web.Handlers.WebExport"/>
|
||||
</httpHandlers>
|
||||
<compilation debug="false" targetFramework="4.6.1">
|
||||
<compilation debug="true" targetFramework="4.6.1">
|
||||
<assemblies>
|
||||
<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
</assemblies>
|
||||
|
||||
@@ -66384,6 +66384,18 @@ namespace Model
|
||||
|
||||
private string _JOTY_Group;
|
||||
|
||||
private string _JOT_Electricity;
|
||||
|
||||
private string _JOT_Voltage;
|
||||
|
||||
private System.Nullable<int> _WeldL;
|
||||
|
||||
private System.Nullable<bool> _IsGold;
|
||||
|
||||
private string _JOT_QualifiedLevel;
|
||||
|
||||
private string _HardQuaStandard;
|
||||
|
||||
public HJGL_View_JointInfo()
|
||||
{
|
||||
}
|
||||
@@ -67731,6 +67743,102 @@ namespace Model
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JOT_Electricity", DbType="VarChar(40)")]
|
||||
public string JOT_Electricity
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._JOT_Electricity;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._JOT_Electricity != value))
|
||||
{
|
||||
this._JOT_Electricity = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JOT_Voltage", DbType="VarChar(40)")]
|
||||
public string JOT_Voltage
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._JOT_Voltage;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._JOT_Voltage != value))
|
||||
{
|
||||
this._JOT_Voltage = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldL", DbType="Int")]
|
||||
public System.Nullable<int> WeldL
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._WeldL;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._WeldL != value))
|
||||
{
|
||||
this._WeldL = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsGold", DbType="Bit")]
|
||||
public System.Nullable<bool> IsGold
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._IsGold;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._IsGold != value))
|
||||
{
|
||||
this._IsGold = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JOT_QualifiedLevel", DbType="NVarChar(10)")]
|
||||
public string JOT_QualifiedLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._JOT_QualifiedLevel;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._JOT_QualifiedLevel != value))
|
||||
{
|
||||
this._JOT_QualifiedLevel = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HardQuaStandard", DbType="NVarChar(50)")]
|
||||
public string HardQuaStandard
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._HardQuaStandard;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._HardQuaStandard != value))
|
||||
{
|
||||
this._HardQuaStandard = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.HJGL_View_JointInfoAndIsoInfo")]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<Use64BitIISExpress />
|
||||
|
||||
Reference in New Issue
Block a user