This commit is contained in:
佘春生 2024-07-01 16:14:58 +08:00
commit cf8f42d62d
3 changed files with 41 additions and 195 deletions

View File

@ -243,11 +243,8 @@
<Content Include="WelderManage\WelderManage.aspx" /> <Content Include="WelderManage\WelderManage.aspx" />
<Content Include="WelderManage\WelderManageEdit.aspx" /> <Content Include="WelderManage\WelderManageEdit.aspx" />
<Content Include="WelderManage\WelderManageView.aspx" /> <Content Include="WelderManage\WelderManageView.aspx" />
<Content Include="Doc\index.aspx" />
<Content Include="Doc\ReportViewer安装.txt" />
<Content Include="Downloads\index.aspx" /> <Content Include="Downloads\index.aspx" />
<Content Include="Encrypt.aspx" /> <Content Include="Encrypt.aspx" />
<Content Include="FileUpload\index.aspx" />
<Content Include="File\index.aspx" /> <Content Include="File\index.aspx" />
<Content Include="HotProcessHard\HardFeedback.aspx" /> <Content Include="HotProcessHard\HardFeedback.aspx" />
<Content Include="HotProcessHard\HardReport.aspx" /> <Content Include="HotProcessHard\HardReport.aspx" />
@ -340,14 +337,6 @@
<Content Include="ErrLog.txt" /> <Content Include="ErrLog.txt" />
<Content Include="App_Themes\Default\Default.css" /> <Content Include="App_Themes\Default\Default.css" />
<Content Include="favicon.ico" /> <Content Include="favicon.ico" />
<Content Include="FileManage\editCAD.aspx" />
<Content Include="FileManage\EditOffice.aspx" />
<Content Include="FileManage\FileManageList.aspx" />
<Content Include="FileManage\ntko.js" />
<Content Include="FileManage\Read.aspx" />
<Content Include="FileManage\ReadCad.aspx" />
<Content Include="FileManage\Save.aspx" />
<Content Include="FileManage\SaveCAD.aspx" />
<Content Include="Global.asax" /> <Content Include="Global.asax" />
<Content Include="Images\dlu.gif" /> <Content Include="Images\dlu.gif" />
<Content Include="Images\dlu1.gif" /> <Content Include="Images\dlu1.gif" />
@ -387,12 +376,8 @@
<Content Include="PublicInfo\ProcessControl\WeldingMonthly.aspx" /> <Content Include="PublicInfo\ProcessControl\WeldingMonthly.aspx" />
<Content Include="PublicInfo\ProcessControl\WeldingQuelity.aspx" /> <Content Include="PublicInfo\ProcessControl\WeldingQuelity.aspx" />
<Content Include="PublicInfo\ProcessControl\WeldingWeekly.aspx" /> <Content Include="PublicInfo\ProcessControl\WeldingWeekly.aspx" />
<Content Include="Report\TestReport.aspx" />
<Content Include="Report\TestReport2.aspx" />
<Content Include="Report\ReportPrint.aspx" />
<Content Include="Scripts\index.aspx" /> <Content Include="Scripts\index.aspx" />
<Content Include="Styles\index.aspx" /> <Content Include="Styles\index.aspx" />
<Content Include="upload\index.aspx" />
<Content Include="WeldingProcess\CheckManage\CheckManage.aspx" /> <Content Include="WeldingProcess\CheckManage\CheckManage.aspx" />
<Content Include="WeldingProcess\CheckManage\CheckManageEdit.aspx" /> <Content Include="WeldingProcess\CheckManage\CheckManageEdit.aspx" />
<Content Include="WeldingProcess\CheckManage\CheckManageIn.aspx" /> <Content Include="WeldingProcess\CheckManage\CheckManageIn.aspx" />
@ -512,10 +497,6 @@
<None Include="Controls\My97DatePicker\开发包\skin\vssver.scc" /> <None Include="Controls\My97DatePicker\开发包\skin\vssver.scc" />
<None Include="Controls\My97DatePicker\开发包\skin\whyGreen\vssver.scc" /> <None Include="Controls\My97DatePicker\开发包\skin\whyGreen\vssver.scc" />
<None Include="Controls\My97DatePicker\开发包\vssver.scc" /> <None Include="Controls\My97DatePicker\开发包\vssver.scc" />
<Content Include="Doc\操作说明书.docx" />
<Content Include="Doc\操作说明书.rar" />
<Content Include="Doc\焊接数据导入说明.doc" />
<None Include="FileManage\uploadCADFile\Empty.dwg" />
<None Include="packages.config" /> <None Include="packages.config" />
<Content Include="LogOff.aspx" /> <Content Include="LogOff.aspx" />
<Content Include="ntko.js" /> <Content Include="ntko.js" />
@ -3201,17 +3182,6 @@
<Content Include="res\umeditor\third-party\mathquill\font\Symbola.ttf" /> <Content Include="res\umeditor\third-party\mathquill\font\Symbola.ttf" />
<Content Include="res\umeditor\third-party\mathquill\font\Symbola.woff" /> <Content Include="res\umeditor\third-party\mathquill\font\Symbola.woff" />
<Content Include="WeldingProcess\WeldingManage\GetWdldingDailyItem.ashx" /> <Content Include="WeldingProcess\WeldingManage\GetWdldingDailyItem.ashx" />
<Content Include="Report\HJGLDs.xsc">
<DependentUpon>HJGLDs.xsd</DependentUpon>
</Content>
<None Include="Report\HJGLDs.xsd">
<SubType>Designer</SubType>
<Generator>MSDataSetGenerator</Generator>
<LastGenOutput>HJGLDs.Designer.cs</LastGenOutput>
</None>
<Content Include="Report\HJGLDs.xss">
<DependentUpon>HJGLDs.xsd</DependentUpon>
</Content>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="App_GlobalResources\Lan.en-US.designer.cs"> <Compile Include="App_GlobalResources\Lan.en-US.designer.cs">
@ -3489,13 +3459,6 @@
<Compile Include="WelderManage\WelderManageView.aspx.designer.cs"> <Compile Include="WelderManage\WelderManageView.aspx.designer.cs">
<DependentUpon>WelderManageView.aspx</DependentUpon> <DependentUpon>WelderManageView.aspx</DependentUpon>
</Compile> </Compile>
<Compile Include="Doc\index.aspx.cs">
<DependentUpon>index.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Doc\index.aspx.designer.cs">
<DependentUpon>index.aspx</DependentUpon>
</Compile>
<Compile Include="Downloads\index.aspx.cs"> <Compile Include="Downloads\index.aspx.cs">
<DependentUpon>index.aspx</DependentUpon> <DependentUpon>index.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
@ -3510,13 +3473,6 @@
<Compile Include="Encrypt.aspx.designer.cs"> <Compile Include="Encrypt.aspx.designer.cs">
<DependentUpon>Encrypt.aspx</DependentUpon> <DependentUpon>Encrypt.aspx</DependentUpon>
</Compile> </Compile>
<Compile Include="FileUpload\index.aspx.cs">
<DependentUpon>index.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="FileUpload\index.aspx.designer.cs">
<DependentUpon>index.aspx</DependentUpon>
</Compile>
<Compile Include="File\index.aspx.cs"> <Compile Include="File\index.aspx.cs">
<DependentUpon>index.aspx</DependentUpon> <DependentUpon>index.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
@ -3909,55 +3865,6 @@
<Compile Include="default.aspx.designer.cs"> <Compile Include="default.aspx.designer.cs">
<DependentUpon>default.aspx</DependentUpon> <DependentUpon>default.aspx</DependentUpon>
</Compile> </Compile>
<Compile Include="FileManage\editCAD.aspx.cs">
<DependentUpon>editCAD.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="FileManage\editCAD.aspx.designer.cs">
<DependentUpon>editCAD.aspx</DependentUpon>
</Compile>
<Compile Include="FileManage\EditOffice.aspx.cs">
<DependentUpon>EditOffice.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="FileManage\EditOffice.aspx.designer.cs">
<DependentUpon>EditOffice.aspx</DependentUpon>
</Compile>
<Compile Include="FileManage\FileManageList.aspx.cs">
<DependentUpon>FileManageList.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="FileManage\FileManageList.aspx.designer.cs">
<DependentUpon>FileManageList.aspx</DependentUpon>
</Compile>
<Compile Include="FileManage\Read.aspx.cs">
<DependentUpon>Read.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="FileManage\Read.aspx.designer.cs">
<DependentUpon>Read.aspx</DependentUpon>
</Compile>
<Compile Include="FileManage\ReadCad.aspx.cs">
<DependentUpon>ReadCad.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="FileManage\ReadCad.aspx.designer.cs">
<DependentUpon>ReadCad.aspx</DependentUpon>
</Compile>
<Compile Include="FileManage\Save.aspx.cs">
<DependentUpon>Save.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="FileManage\Save.aspx.designer.cs">
<DependentUpon>Save.aspx</DependentUpon>
</Compile>
<Compile Include="FileManage\SaveCAD.aspx.cs">
<DependentUpon>SaveCAD.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="FileManage\SaveCAD.aspx.designer.cs">
<DependentUpon>SaveCAD.aspx</DependentUpon>
</Compile>
<Compile Include="Global.asax.cs"> <Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon> <DependentUpon>Global.asax</DependentUpon>
</Compile> </Compile>
@ -4413,35 +4320,6 @@
<Compile Include="PublicInfo\WPQ\WPQIn.aspx.designer.cs"> <Compile Include="PublicInfo\WPQ\WPQIn.aspx.designer.cs">
<DependentUpon>WPQIn.aspx</DependentUpon> <DependentUpon>WPQIn.aspx</DependentUpon>
</Compile> </Compile>
<Compile Include="Report\HJGLDs.cs">
<DependentUpon>HJGLDs.xsd</DependentUpon>
</Compile>
<Compile Include="Report\HJGLDs.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>HJGLDs.xsd</DependentUpon>
</Compile>
<Compile Include="Report\TestReport.aspx.cs">
<DependentUpon>TestReport.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Report\TestReport.aspx.designer.cs">
<DependentUpon>TestReport.aspx</DependentUpon>
</Compile>
<Compile Include="Report\TestReport2.aspx.cs">
<DependentUpon>TestReport2.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Report\TestReport2.aspx.designer.cs">
<DependentUpon>TestReport2.aspx</DependentUpon>
</Compile>
<Compile Include="Report\ReportPrint.aspx.cs">
<DependentUpon>ReportPrint.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Report\ReportPrint.aspx.designer.cs">
<DependentUpon>ReportPrint.aspx</DependentUpon>
</Compile>
<Compile Include="res\umeditor\net\imageUp.ashx.cs"> <Compile Include="res\umeditor\net\imageUp.ashx.cs">
<DependentUpon>imageUp.ashx</DependentUpon> <DependentUpon>imageUp.ashx</DependentUpon>
</Compile> </Compile>
@ -4460,13 +4338,6 @@
<Compile Include="Styles\index.aspx.designer.cs"> <Compile Include="Styles\index.aspx.designer.cs">
<DependentUpon>index.aspx</DependentUpon> <DependentUpon>index.aspx</DependentUpon>
</Compile> </Compile>
<Compile Include="upload\index.aspx.cs">
<DependentUpon>index.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="upload\index.aspx.designer.cs">
<DependentUpon>index.aspx</DependentUpon>
</Compile>
<Compile Include="WeldingProcess\CheckManage\CheckManage.aspx.cs"> <Compile Include="WeldingProcess\CheckManage\CheckManage.aspx.cs">
<DependentUpon>CheckManage.aspx</DependentUpon> <DependentUpon>CheckManage.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
@ -4945,7 +4816,12 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="App_Themes\Default\Images\" /> <Folder Include="App_Themes\Default\Images\" />
<Folder Include="Doc\" />
<Folder Include="FileManage\uploadCADFile\" />
<Folder Include="FileUpload\" />
<Folder Include="Report\" />
<Folder Include="res\js\" /> <Folder Include="res\js\" />
<Folder Include="upload\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\BLL\BLL.csproj"> <ProjectReference Include="..\BLL\BLL.csproj">
@ -4975,14 +4851,6 @@
<LastGenOutput>Lan.en-US.designer.cs</LastGenOutput> <LastGenOutput>Lan.en-US.designer.cs</LastGenOutput>
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Report\BatchTrust.rdlc" />
<EmbeddedResource Include="Report\Report.rdlc" />
<EmbeddedResource Include="Report\Report2.rdlc">
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Report\TrustPrint.rdlc" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
<ProjectExtensions> <ProjectExtensions>

View File

@ -167,7 +167,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
{ {
Directory.CreateDirectory(filePath); Directory.CreateDirectory(filePath);
} }
string ReportFileName = filePath + "无损检测委托单" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx"; string ReportFileName = filePath + "管道焊口检测委托单" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx";
//string ReportFileName = filePath + "out1.xlsx"; //string ReportFileName = filePath + "out1.xlsx";
int totalNum = Grid1.SelectedRowIDArray.Length; int totalNum = Grid1.SelectedRowIDArray.Length;
@ -471,14 +471,14 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
} }
else else
{ {
if (hssfworkbook.GetSheet("无损检测委托单") != null) if (hssfworkbook.GetSheet("管道焊口检测委托单") != null)
{ {
ws = (XSSFSheet)hssfworkbook.GetSheet("无损检测委托单"); ws = (XSSFSheet)hssfworkbook.GetSheet("管道焊口检测委托单");
} }
else else
{ {
rowIndex = 0; rowIndex = 0;
ws = (XSSFSheet)hssfworkbook.CreateSheet("无损检测委托单"); ws = (XSSFSheet)hssfworkbook.CreateSheet("管道焊口检测委托单");
#region #region
@ -494,7 +494,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
ws.SetColumnWidth(9, 5 * 256); ws.SetColumnWidth(9, 5 * 256);
ws.SetColumnWidth(10, 8 * 256); ws.SetColumnWidth(10, 8 * 256);
ws.SetColumnWidth(11, 11 * 256); ws.SetColumnWidth(11, 11 * 256);
ws.SetColumnWidth(12, 13 * 256); ws.SetColumnWidth(12, 8 * 256);
#endregion #endregion
} }
@ -515,14 +515,14 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
//行0 //行0
CellRangeAddress region = new CellRangeAddress(rowIndex, rowIndex + 3, 0, 2); CellRangeAddress region = new CellRangeAddress(rowIndex, rowIndex + 3, 0, 2);
ws.AddMergedRegion(region); ws.AddMergedRegion(region);
ws.GetRow(rowIndex).GetCell(0).SetCellValue(tbTitle.Rows[0]["PipelineCode"].ToString()); ws.GetRow(rowIndex).GetCell(0).SetCellValue("SH/T 3543—G414");
ws.GetRow(rowIndex).GetCell(0).CellStyle = style; ws.GetRow(rowIndex).GetCell(0).CellStyle = style;
ws.GetRow(rowIndex).GetCell(1).CellStyle = style; ws.GetRow(rowIndex).GetCell(1).CellStyle = style;
ws.GetRow(rowIndex).GetCell(2).CellStyle = style; ws.GetRow(rowIndex).GetCell(2).CellStyle = style;
region = new CellRangeAddress(rowIndex, rowIndex + 3, 3, 9); region = new CellRangeAddress(rowIndex, rowIndex + 3, 3, 9);
ws.AddMergedRegion(region); ws.AddMergedRegion(region);
ws.GetRow(rowIndex).GetCell(3).SetCellValue("无损检测委托单"); ws.GetRow(rowIndex).GetCell(3).SetCellValue("管道焊口检测委托单");
ws.GetRow(rowIndex).GetCell(3).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, HorizontalAlignment.Center, 16, true, true); ws.GetRow(rowIndex).GetCell(3).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, HorizontalAlignment.Center, 16, true, true);
ws.GetRow(rowIndex).GetCell(4).CellStyle = style; ws.GetRow(rowIndex).GetCell(4).CellStyle = style;
ws.GetRow(rowIndex).GetCell(5).CellStyle = style; ws.GetRow(rowIndex).GetCell(5).CellStyle = style;
@ -531,37 +531,21 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
ws.GetRow(rowIndex).GetCell(8).CellStyle = style; ws.GetRow(rowIndex).GetCell(8).CellStyle = style;
ws.GetRow(rowIndex).GetCell(9).CellStyle = style; ws.GetRow(rowIndex).GetCell(9).CellStyle = style;
region = new CellRangeAddress(rowIndex, rowIndex, 10, 12); region = new CellRangeAddress(rowIndex, rowIndex+1, 10, 12);
ws.AddMergedRegion(region); ws.AddMergedRegion(region);
ws.GetRow(rowIndex).GetCell(10).SetCellValue(tbTitle.Rows[0]["ProjectName"].ToString()); ws.GetRow(rowIndex).GetCell(10).SetCellValue(tbTitle.Rows[0]["ProjectName"].ToString());
ws.GetRow(rowIndex).GetCell(10).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, HorizontalAlignment.Justify, 10.5, true, false); ws.GetRow(rowIndex).GetCell(10).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, HorizontalAlignment.Justify, 10.5, true, false);
ws.GetRow(rowIndex).GetCell(11).CellStyle = styleButton; ws.GetRow(rowIndex).GetCell(11).CellStyle = styleButton;
ws.GetRow(rowIndex).GetCell(12).CellStyle = styleButton; ws.GetRow(rowIndex).GetCell(12).CellStyle = styleButton;
//行1
region = new CellRangeAddress(rowIndex + 1, rowIndex + 1, 10, 12);
ws.AddMergedRegion(region);
ws.GetRow(rowIndex + 1).GetCell(10).SetCellValue("EnProjectName");
ws.GetRow(rowIndex + 1).GetCell(10).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.None, VerticalAlignment.Center, HorizontalAlignment.Justify, 10.5, true, false);
ws.GetRow(rowIndex + 1).GetCell(11).CellStyle = styleNone;
ws.GetRow(rowIndex + 1).GetCell(12).CellStyle = styleNone;
//行2 //行2
region = new CellRangeAddress(rowIndex + 2, rowIndex + 2, 10, 12); region = new CellRangeAddress(rowIndex + 2, rowIndex + 3, 10, 12);
ws.AddMergedRegion(region); ws.AddMergedRegion(region);
ws.GetRow(rowIndex + 2).GetCell(10).SetCellValue(tbTitle.Rows[0]["WorkAreaName"].ToString()); ws.GetRow(rowIndex + 2).GetCell(10).SetCellValue(tbTitle.Rows[0]["WorkAreaName"].ToString());
ws.GetRow(rowIndex + 2).GetCell(10).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.None, VerticalAlignment.Center, HorizontalAlignment.Justify, 10.5, true, false); ws.GetRow(rowIndex + 2).GetCell(10).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.None, VerticalAlignment.Center, HorizontalAlignment.Justify, 10.5, true, false);
ws.GetRow(rowIndex + 2).GetCell(11).CellStyle = styleNone; ws.GetRow(rowIndex + 2).GetCell(11).CellStyle = styleNone;
ws.GetRow(rowIndex + 2).GetCell(12).CellStyle = styleNone; ws.GetRow(rowIndex + 2).GetCell(12).CellStyle = styleNone;
//行3
region = new CellRangeAddress(rowIndex + 3, rowIndex + 3, 10, 12);
ws.AddMergedRegion(region);
ws.GetRow(rowIndex + 3).GetCell(10).SetCellValue("EnWorkAreaName");
ws.GetRow(rowIndex + 3).GetCell(10).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.None, VerticalAlignment.Center, HorizontalAlignment.Justify, 10.5, true, false);
ws.GetRow(rowIndex + 3).GetCell(11).CellStyle = styleTop;
ws.GetRow(rowIndex + 3).GetCell(12).CellStyle = styleTop;
//行4 //行4
ws.GetRow(rowIndex + 4).GetCell(0).SetCellValue("检查单位"); ws.GetRow(rowIndex + 4).GetCell(0).SetCellValue("检查单位");
region = new CellRangeAddress(rowIndex + 4, rowIndex + 4, 1, 7); region = new CellRangeAddress(rowIndex + 4, rowIndex + 4, 1, 7);
@ -573,6 +557,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
region = new CellRangeAddress(rowIndex + 4, rowIndex + 4, 11, 12); region = new CellRangeAddress(rowIndex + 4, rowIndex + 4, 11, 12);
ws.AddMergedRegion(region); ws.AddMergedRegion(region);
ws.GetRow(rowIndex + 4).GetCell(11).SetCellValue(tbTitle.Rows[0]["TrustBatchCode"].ToString()); ws.GetRow(rowIndex + 4).GetCell(11).SetCellValue(tbTitle.Rows[0]["TrustBatchCode"].ToString());
ws.GetRow(rowIndex + 4).Height = 30 * 20;
//行5, //行5,
ws.GetRow(rowIndex + 5).GetCell(0).SetCellValue("探伤地点"); ws.GetRow(rowIndex + 5).GetCell(0).SetCellValue("探伤地点");
@ -679,6 +664,8 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
ws.AddMergedRegion(region); ws.AddMergedRegion(region);
region = new CellRangeAddress(hb, hb, 8, 10); region = new CellRangeAddress(hb, hb, 8, 10);
ws.AddMergedRegion(region); ws.AddMergedRegion(region);
ws.GetRow(hb).Height = 33 * 20;
} }
//获取当前页数据 //获取当前页数据
var pageTb = GetPageToTable(tb, dStart, dEnd); var pageTb = GetPageToTable(tb, dStart, dEnd);
@ -757,6 +744,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
//分页打印是操作 //分页打印是操作
ws.SetRowBreak(rowIndex - 1); ws.SetRowBreak(rowIndex - 1);
ws.SetColumnBreak((short)13);
} }
} }
} }

View File

@ -5,6 +5,7 @@ using System.Data.SqlClient;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Web; using System.Web;
using System.Web.UI;
using BLL; using BLL;
using NPOI.HSSF.Util; using NPOI.HSSF.Util;
using NPOI.SS.UserModel; using NPOI.SS.UserModel;
@ -1692,14 +1693,14 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
} }
else else
{ {
if (hssfworkbook.GetSheet("无损检测委托单") != null) if (hssfworkbook.GetSheet("管道焊口检测委托单") != null)
{ {
ws = (XSSFSheet)hssfworkbook.GetSheet("无损检测委托单"); ws = (XSSFSheet)hssfworkbook.GetSheet("管道焊口检测委托单");
} }
else else
{ {
rowIndex = 0; rowIndex = 0;
ws = (XSSFSheet)hssfworkbook.CreateSheet("无损检测委托单"); ws = (XSSFSheet)hssfworkbook.CreateSheet("管道焊口检测委托单");
#region #region
@ -1715,7 +1716,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
ws.SetColumnWidth(9, 5 * 256); ws.SetColumnWidth(9, 5 * 256);
ws.SetColumnWidth(10, 8 * 256); ws.SetColumnWidth(10, 8 * 256);
ws.SetColumnWidth(11, 11 * 256); ws.SetColumnWidth(11, 11 * 256);
ws.SetColumnWidth(12, 13 * 256); ws.SetColumnWidth(12, 8 * 256);
#endregion #endregion
} }
@ -1736,14 +1737,14 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
//行0 //行0
CellRangeAddress region = new CellRangeAddress(rowIndex, rowIndex + 3, 0, 2); CellRangeAddress region = new CellRangeAddress(rowIndex, rowIndex + 3, 0, 2);
ws.AddMergedRegion(region); ws.AddMergedRegion(region);
ws.GetRow(rowIndex).GetCell(0).SetCellValue("NDE-001"); ws.GetRow(rowIndex).GetCell(0).SetCellValue("SH/T 3543—G414");
ws.GetRow(rowIndex).GetCell(0).CellStyle = style; ws.GetRow(rowIndex).GetCell(0).CellStyle = style;
ws.GetRow(rowIndex).GetCell(1).CellStyle = style; ws.GetRow(rowIndex).GetCell(1).CellStyle = style;
ws.GetRow(rowIndex).GetCell(2).CellStyle = style; ws.GetRow(rowIndex).GetCell(2).CellStyle = style;
region = new CellRangeAddress(rowIndex, rowIndex + 3, 3, 9); region = new CellRangeAddress(rowIndex, rowIndex + 3, 3, 9);
ws.AddMergedRegion(region); ws.AddMergedRegion(region);
ws.GetRow(rowIndex).GetCell(3).SetCellValue("无损检测委托单"); ws.GetRow(rowIndex).GetCell(3).SetCellValue("管道焊口检测委托单");
ws.GetRow(rowIndex).GetCell(3).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, HorizontalAlignment.Center, 16, true, true); ws.GetRow(rowIndex).GetCell(3).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, HorizontalAlignment.Center, 16, true, true);
ws.GetRow(rowIndex).GetCell(4).CellStyle = style; ws.GetRow(rowIndex).GetCell(4).CellStyle = style;
ws.GetRow(rowIndex).GetCell(5).CellStyle = style; ws.GetRow(rowIndex).GetCell(5).CellStyle = style;
@ -1752,36 +1753,22 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
ws.GetRow(rowIndex).GetCell(8).CellStyle = style; ws.GetRow(rowIndex).GetCell(8).CellStyle = style;
ws.GetRow(rowIndex).GetCell(9).CellStyle = style; ws.GetRow(rowIndex).GetCell(9).CellStyle = style;
region = new CellRangeAddress(rowIndex, rowIndex, 10, 12); region = new CellRangeAddress(rowIndex, rowIndex + 1, 10, 12);
ws.AddMergedRegion(region); ws.AddMergedRegion(region);
ws.GetRow(rowIndex).GetCell(10).SetCellValue(tbTitle.Rows[0]["ProjectName"].ToString()); ws.GetRow(rowIndex).GetCell(10).SetCellValue(tbTitle.Rows[0]["ProjectName"].ToString());
ws.GetRow(rowIndex).GetCell(10).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, HorizontalAlignment.Justify, 10.5, true, false); ws.GetRow(rowIndex).GetCell(10).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, HorizontalAlignment.Justify, 10.5, true, false);
ws.GetRow(rowIndex).GetCell(11).CellStyle = styleButton; ws.GetRow(rowIndex).GetCell(11).CellStyle = styleButton;
ws.GetRow(rowIndex).GetCell(12).CellStyle = styleButton; ws.GetRow(rowIndex).GetCell(12).CellStyle = styleButton;
//行1
region = new CellRangeAddress(rowIndex + 1, rowIndex + 1, 10, 12);
ws.AddMergedRegion(region);
ws.GetRow(rowIndex + 1).GetCell(10).SetCellValue(tbTitle.Rows[0]["EnProjectName"].ToString());
ws.GetRow(rowIndex + 1).GetCell(10).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.None, VerticalAlignment.Center, HorizontalAlignment.Justify, 10.5, true, false);
ws.GetRow(rowIndex + 1).GetCell(11).CellStyle = styleNone;
ws.GetRow(rowIndex + 1).GetCell(12).CellStyle = styleNone;
//行2 //行2
region = new CellRangeAddress(rowIndex + 2, rowIndex + 2, 10, 12); region = new CellRangeAddress(rowIndex + 2, rowIndex + 3, 10, 12);
ws.AddMergedRegion(region); ws.AddMergedRegion(region);
ws.GetRow(rowIndex + 2).GetCell(10).SetCellValue(tbTitle.Rows[0]["WorkAreaName"].ToString()); ws.GetRow(rowIndex + 2).GetCell(10).SetCellValue(tbTitle.Rows[0]["WorkAreaName"].ToString());
ws.GetRow(rowIndex + 2).GetCell(10).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.None, VerticalAlignment.Center, HorizontalAlignment.Justify, 10.5, true, false); ws.GetRow(rowIndex + 2).GetCell(10).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.None, VerticalAlignment.Center, HorizontalAlignment.Justify, 10.5, true, false);
ws.GetRow(rowIndex + 2).GetCell(11).CellStyle = styleNone; ws.GetRow(rowIndex + 2).GetCell(11).CellStyle = styleNone;
ws.GetRow(rowIndex + 2).GetCell(12).CellStyle = styleNone; ws.GetRow(rowIndex + 2).GetCell(12).CellStyle = styleNone;
//行3
region = new CellRangeAddress(rowIndex + 3, rowIndex + 3, 10, 12);
ws.AddMergedRegion(region);
ws.GetRow(rowIndex + 3).GetCell(10).SetCellValue(tbTitle.Rows[0]["EnWorkAreaName"].ToString());
ws.GetRow(rowIndex + 3).GetCell(10).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.None, VerticalAlignment.Center, HorizontalAlignment.Justify, 10.5, true, false);
ws.GetRow(rowIndex + 3).GetCell(11).CellStyle = styleTop;
ws.GetRow(rowIndex + 3).GetCell(12).CellStyle = styleTop;
//行4 //行4
ws.GetRow(rowIndex + 4).GetCell(0).SetCellValue("检查单位"); ws.GetRow(rowIndex + 4).GetCell(0).SetCellValue("检查单位");
@ -1794,6 +1781,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
region = new CellRangeAddress(rowIndex + 4, rowIndex + 4, 11, 12); region = new CellRangeAddress(rowIndex + 4, rowIndex + 4, 11, 12);
ws.AddMergedRegion(region); ws.AddMergedRegion(region);
ws.GetRow(rowIndex + 4).GetCell(11).SetCellValue(tbTitle.Rows[0]["TrustBatchCode"].ToString()); ws.GetRow(rowIndex + 4).GetCell(11).SetCellValue(tbTitle.Rows[0]["TrustBatchCode"].ToString());
ws.GetRow(rowIndex + 4).Height = 30 * 20;
//行5, //行5,
ws.GetRow(rowIndex + 5).GetCell(0).SetCellValue("探伤地点"); ws.GetRow(rowIndex + 5).GetCell(0).SetCellValue("探伤地点");
@ -1899,6 +1887,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
ws.AddMergedRegion(region); ws.AddMergedRegion(region);
region = new CellRangeAddress(hb, hb, 8, 10); region = new CellRangeAddress(hb, hb, 8, 10);
ws.AddMergedRegion(region); ws.AddMergedRegion(region);
ws.GetRow(hb).Height = 33 * 20;
} }
//获取当前页数据 //获取当前页数据
var pageTb = GetPageToTable(tb, dStart, dEnd); var pageTb = GetPageToTable(tb, dStart, dEnd);
@ -1974,6 +1963,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
ws = WsExcelCreateRow(ws, hssfworkbook, rowIndex + 9, rowIndex + 9, style, 0, 12, 3, true); ws = WsExcelCreateRow(ws, hssfworkbook, rowIndex + 9, rowIndex + 9, style, 0, 12, 3, true);
rowIndex += 10; rowIndex += 10;
ws.SetColumnBreak((short)12);
} }
} }
} }