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\WelderManageEdit.aspx" />
<Content Include="WelderManage\WelderManageView.aspx" />
<Content Include="Doc\index.aspx" />
<Content Include="Doc\ReportViewer安装.txt" />
<Content Include="Downloads\index.aspx" />
<Content Include="Encrypt.aspx" />
<Content Include="FileUpload\index.aspx" />
<Content Include="File\index.aspx" />
<Content Include="HotProcessHard\HardFeedback.aspx" />
<Content Include="HotProcessHard\HardReport.aspx" />
@ -340,14 +337,6 @@
<Content Include="ErrLog.txt" />
<Content Include="App_Themes\Default\Default.css" />
<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="Images\dlu.gif" />
<Content Include="Images\dlu1.gif" />
@ -387,12 +376,8 @@
<Content Include="PublicInfo\ProcessControl\WeldingMonthly.aspx" />
<Content Include="PublicInfo\ProcessControl\WeldingQuelity.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="Styles\index.aspx" />
<Content Include="upload\index.aspx" />
<Content Include="WeldingProcess\CheckManage\CheckManage.aspx" />
<Content Include="WeldingProcess\CheckManage\CheckManageEdit.aspx" />
<Content Include="WeldingProcess\CheckManage\CheckManageIn.aspx" />
@ -512,10 +497,6 @@
<None Include="Controls\My97DatePicker\开发包\skin\vssver.scc" />
<None Include="Controls\My97DatePicker\开发包\skin\whyGreen\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" />
<Content Include="LogOff.aspx" />
<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.woff" />
<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>
<Compile Include="App_GlobalResources\Lan.en-US.designer.cs">
@ -3489,13 +3459,6 @@
<Compile Include="WelderManage\WelderManageView.aspx.designer.cs">
<DependentUpon>WelderManageView.aspx</DependentUpon>
</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">
<DependentUpon>index.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -3510,13 +3473,6 @@
<Compile Include="Encrypt.aspx.designer.cs">
<DependentUpon>Encrypt.aspx</DependentUpon>
</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">
<DependentUpon>index.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -3909,55 +3865,6 @@
<Compile Include="default.aspx.designer.cs">
<DependentUpon>default.aspx</DependentUpon>
</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">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
@ -4413,35 +4320,6 @@
<Compile Include="PublicInfo\WPQ\WPQIn.aspx.designer.cs">
<DependentUpon>WPQIn.aspx</DependentUpon>
</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">
<DependentUpon>imageUp.ashx</DependentUpon>
</Compile>
@ -4460,13 +4338,6 @@
<Compile Include="Styles\index.aspx.designer.cs">
<DependentUpon>index.aspx</DependentUpon>
</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">
<DependentUpon>CheckManage.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -4945,7 +4816,12 @@
</ItemGroup>
<ItemGroup>
<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="upload\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BLL\BLL.csproj">
@ -4975,14 +4851,6 @@
<LastGenOutput>Lan.en-US.designer.cs</LastGenOutput>
</Content>
</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="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
<ProjectExtensions>

View File

@ -167,7 +167,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
{
Directory.CreateDirectory(filePath);
}
string ReportFileName = filePath + "无损检测委托单" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx";
string ReportFileName = filePath + "管道焊口检测委托单" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx";
//string ReportFileName = filePath + "out1.xlsx";
int totalNum = Grid1.SelectedRowIDArray.Length;
@ -471,14 +471,14 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
}
else
{
if (hssfworkbook.GetSheet("无损检测委托单") != null)
if (hssfworkbook.GetSheet("管道焊口检测委托单") != null)
{
ws = (XSSFSheet)hssfworkbook.GetSheet("无损检测委托单");
ws = (XSSFSheet)hssfworkbook.GetSheet("管道焊口检测委托单");
}
else
{
rowIndex = 0;
ws = (XSSFSheet)hssfworkbook.CreateSheet("无损检测委托单");
ws = (XSSFSheet)hssfworkbook.CreateSheet("管道焊口检测委托单");
#region
@ -494,7 +494,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
ws.SetColumnWidth(9, 5 * 256);
ws.SetColumnWidth(10, 8 * 256);
ws.SetColumnWidth(11, 11 * 256);
ws.SetColumnWidth(12, 13 * 256);
ws.SetColumnWidth(12, 8 * 256);
#endregion
}
@ -515,14 +515,14 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
//行0
CellRangeAddress region = new CellRangeAddress(rowIndex, rowIndex + 3, 0, 2);
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(1).CellStyle = style;
ws.GetRow(rowIndex).GetCell(2).CellStyle = style;
region = new CellRangeAddress(rowIndex, rowIndex + 3, 3, 9);
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(4).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(9).CellStyle = style;
region = new CellRangeAddress(rowIndex, rowIndex, 10, 12);
region = new CellRangeAddress(rowIndex, rowIndex+1, 10, 12);
ws.AddMergedRegion(region);
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(11).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
region = new CellRangeAddress(rowIndex + 2, rowIndex + 2, 10, 12);
region = new CellRangeAddress(rowIndex + 2, rowIndex + 3, 10, 12);
ws.AddMergedRegion(region);
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(11).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
ws.GetRow(rowIndex + 4).GetCell(0).SetCellValue("检查单位");
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);
ws.AddMergedRegion(region);
ws.GetRow(rowIndex + 4).GetCell(11).SetCellValue(tbTitle.Rows[0]["TrustBatchCode"].ToString());
ws.GetRow(rowIndex + 4).Height = 30 * 20;
//行5,
ws.GetRow(rowIndex + 5).GetCell(0).SetCellValue("探伤地点");
@ -679,6 +664,8 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
ws.AddMergedRegion(region);
region = new CellRangeAddress(hb, hb, 8, 10);
ws.AddMergedRegion(region);
ws.GetRow(hb).Height = 33 * 20;
}
//获取当前页数据
var pageTb = GetPageToTable(tb, dStart, dEnd);
@ -757,6 +744,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
//分页打印是操作
ws.SetRowBreak(rowIndex - 1);
ws.SetColumnBreak((short)13);
}
}
}

View File

@ -5,6 +5,7 @@ using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using BLL;
using NPOI.HSSF.Util;
using NPOI.SS.UserModel;
@ -281,7 +282,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
lbTrustUnit.Text = trust.TrustUnit;
this.txtTrustBatchCode.Text = trust.TrustBatchCode;
this.txtTrustCode.Text= trust.TrustBatchCode;
this.txtTrustCode.Text = trust.TrustBatchCode;
//if (trust.TrustDate != null)
//{
// this.txtTrustDate.Text = string.Format("{0:yyyy-MM-dd}", trust.TrustDate);
@ -449,7 +450,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
string surfaceState = drpSurfaceState.SelectedValue;
string detectionTiming = drpDetectionTiming.SelectedValue;
DateTime? trustDate= Funs.GetNewDateTime(this.txtTrustDate.Text);
DateTime? trustDate = Funs.GetNewDateTime(this.txtTrustDate.Text);
BLL.Batch_BatchTrustService.BatchTrustNDEUnit(trustBatchId, ndtUnit, trustCode, surfaceState, detectionTiming, null, null, trustDate);
txtTrustBatchCode.Text = trustCode;
ShowNotify(Resources.Lan.SaveSuccessfully, MessageBoxIcon.Success);
@ -497,7 +498,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
db.SubmitChanges();
}
}
var check = from x in db.Batch_NDE where x.TrustBatchId == trustBatchId select x;
if (check.Count() > 0)
{
@ -1258,7 +1259,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
int dataIndex = dataTit + j;
//检件编号
ws.GetRow(dataIndex).GetCell(0).SetCellValue(pageTb.Rows[j]["PipelineCode"].ToString());
//焊口号
ws.GetRow(dataIndex).GetCell(2).SetCellValue(pageTb.Rows[j]["WeldJointCode"].ToString());
//焊工代号
@ -1274,7 +1275,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
{
ws.GetRow(dataTit + pageTb.Rows.Count).GetCell(0).SetCellValue("以下空白");
}
rowIndex += tIndex;
#endregion
@ -1363,7 +1364,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
Response.Charset = "GB2312";
Response.ContentEncoding = System.Text.Encoding.UTF8;
// 添加头信息,为"文件下载/另存为"对话框指定默认文件名
Response.AddHeader("Content-Disposition", "attachment; filename=" + Server.UrlEncode(trustBatchCode+".xlsx"));
Response.AddHeader("Content-Disposition", "attachment; filename=" + Server.UrlEncode(trustBatchCode + ".xlsx"));
// 添加头信息,指定文件大小,让浏览器能够显示下载进度
Response.AddHeader("Content-Length", filet.Length.ToString());
// 指定返回的是一个不能被客户端读取的流,必须被下载
@ -1692,14 +1693,14 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
}
else
{
if (hssfworkbook.GetSheet("无损检测委托单") != null)
if (hssfworkbook.GetSheet("管道焊口检测委托单") != null)
{
ws = (XSSFSheet)hssfworkbook.GetSheet("无损检测委托单");
ws = (XSSFSheet)hssfworkbook.GetSheet("管道焊口检测委托单");
}
else
{
rowIndex = 0;
ws = (XSSFSheet)hssfworkbook.CreateSheet("无损检测委托单");
ws = (XSSFSheet)hssfworkbook.CreateSheet("管道焊口检测委托单");
#region
@ -1715,7 +1716,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
ws.SetColumnWidth(9, 5 * 256);
ws.SetColumnWidth(10, 8 * 256);
ws.SetColumnWidth(11, 11 * 256);
ws.SetColumnWidth(12, 13 * 256);
ws.SetColumnWidth(12, 8 * 256);
#endregion
}
@ -1736,14 +1737,14 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
//行0
CellRangeAddress region = new CellRangeAddress(rowIndex, rowIndex + 3, 0, 2);
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(1).CellStyle = style;
ws.GetRow(rowIndex).GetCell(2).CellStyle = style;
region = new CellRangeAddress(rowIndex, rowIndex + 3, 3, 9);
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(4).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(9).CellStyle = style;
region = new CellRangeAddress(rowIndex, rowIndex, 10, 12);
region = new CellRangeAddress(rowIndex, rowIndex + 1, 10, 12);
ws.AddMergedRegion(region);
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(11).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
region = new CellRangeAddress(rowIndex + 2, rowIndex + 2, 10, 12);
region = new CellRangeAddress(rowIndex + 2, rowIndex + 3, 10, 12);
ws.AddMergedRegion(region);
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(11).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
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);
ws.AddMergedRegion(region);
ws.GetRow(rowIndex + 4).GetCell(11).SetCellValue(tbTitle.Rows[0]["TrustBatchCode"].ToString());
ws.GetRow(rowIndex + 4).Height = 30 * 20;
//行5,
ws.GetRow(rowIndex + 5).GetCell(0).SetCellValue("探伤地点");
@ -1852,7 +1840,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
//11-7=4
//行8
ws.GetRow(rowIndex + 8).GetCell(0).SetCellValue("序号");
ws.GetRow(rowIndex + 8).GetCell(0).SetCellValue("序号");
region = new CellRangeAddress(rowIndex + 8, rowIndex + 8, 1, 3);
ws.AddMergedRegion(region);
ws.GetRow(rowIndex + 8).GetCell(1).SetCellValue("管道编号/单线号");
@ -1864,7 +1852,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
ws.GetRow(rowIndex + 8).GetCell(6).SetCellValue("焊工号");
region = new CellRangeAddress(rowIndex + 8, rowIndex + 8, 8, 10);
ws.AddMergedRegion(region);
ws.AddMergedRegion(region);
ws.GetRow(rowIndex + 8).GetCell(11).SetCellValue("检件规格");
ws.GetRow(rowIndex + 8).GetCell(8).SetCellValue("检件材质");
ws.GetRow(rowIndex + 8).GetCell(12).SetCellValue("备注");
@ -1899,6 +1887,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
ws.AddMergedRegion(region);
region = new CellRangeAddress(hb, hb, 8, 10);
ws.AddMergedRegion(region);
ws.GetRow(hb).Height = 33 * 20;
}
//获取当前页数据
var pageTb = GetPageToTable(tb, dStart, dEnd);
@ -1942,7 +1931,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
{
ws.GetRow(hb).GetCell(c).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.None, VerticalAlignment.Center, HorizontalAlignment.Left, 10.5, true, false);
}
if (hb == rowIndex + 6 || hb == rowIndex + 7 )
if (hb == rowIndex + 6 || hb == rowIndex + 7)
{
ws.GetRow(hb).GetCell(c).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.None, VerticalAlignment.Center, HorizontalAlignment.Right, 10.5, true, false);
}
@ -1974,6 +1963,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
ws = WsExcelCreateRow(ws, hssfworkbook, rowIndex + 9, rowIndex + 9, style, 0, 12, 3, true);
rowIndex += 10;
ws.SetColumnBreak((short)12);
}
}
}
@ -2037,7 +2027,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
for (int i = sRows; i <= eRows; i++)
{
ws.CreateRow(i);
if (excelpart==1)
if (excelpart == 1)
{
ws.GetRow(i).HeightInPoints =
i == sRows ? 27.75f :
@ -2055,7 +2045,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
i == (sRows + 12) ? 23.25f :
17f;
}
else if(excelpart == 2)
else if (excelpart == 2)
{
ws.GetRow(i).HeightInPoints = 25.5f;