20250710 试压包资料

This commit is contained in:
2025-07-10 16:47:41 +08:00
parent 4b878c2c08
commit 46e82ffb7e
17 changed files with 1751 additions and 5 deletions
@@ -0,0 +1,92 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPackageData.aspx.cs" Inherits="FineUIPro.Web.HJGL.TestPackage.TestPackageData" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>试压包资料</title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="200px" Title="WBS目录" ShowBorder="true" Layout="VBox"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Items>
<f:Tree ID="tvControlItem" ShowHeader="false" Title="试压包节点树" OnNodeCommand="tvControlItem_NodeCommand"
runat="server" ShowBorder="false" EnableCollapse="true" EnableSingleClickExpand="true" AutoLeafIdentification="true"
EnableSingleExpand="true" EnableTextSelection="true">
</f:Tree>
<f:HiddenField runat="server" ID="hdPTP_ID"></f:HiddenField>
</Items>
</f:Panel>
<f:Panel ID="Panel2" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="Region" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="试压包" EnableCollapse="true" Collapsed="false"
runat="server" BoxFlex="1" DataKeyNames="PTP_ID" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="2" DataIDField="PTP_ID" AllowSorting="true"
SortField="TestPackageNo" SortDirection="ASC" OnSort="Grid1_Sort" EnableTextSelection="True"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:DropDownList ID="drpPrintType" runat="server" Label="格式" LabelAlign="Right" LabelWidth="120px" Width="200px" Hidden="false">
<f:ListItem Value="1" Text="PDF" />
<f:ListItem Value="2" Text="Word" Selected="true" />
</f:DropDownList>
<f:Button ID="btnPrint" Text="打印" ToolTip="打印" Icon="Printer" runat="server" OnClick="btnPrint_Click" EnablePostBack="true" EnableAjax="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RenderField HeaderText="试压包号" ColumnID="TestPackageNo" DataField="TestPackageNo" SortField="TestPackageNo"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="160px">
</f:RenderField>
<f:RenderField HeaderText="试压名称" ColumnID="TestPackageName" DataField="TestPackageName" SortField="TestPackageName"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="150px">
</f:RenderField>
<f:RenderField HeaderText="试压状态" ColumnID="" DataField="" SortField=""
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
</f:RenderField>
<f:RenderField HeaderText="试压时间" ColumnID="" DataField="" SortField=""
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
</f:RenderField>
<f:RenderField HeaderText="试压结论" ColumnID="" DataField="" SortField=""
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
</f:RenderField>
<f:RenderField HeaderText="打印状态" ColumnID="PrintState" DataField="PrintState" SortField="PrintState"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
</f:RenderField>
</Columns>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="90px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
</form>
<script type="text/javascript">
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
</script>
</body>
</html>
@@ -0,0 +1,522 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using Model;
namespace FineUIPro.Web.HJGL.TestPackage
{
public partial class TestPackageData : PageBase
{
#region
/// <summary>
/// 试压包主键
/// </summary>
public string PTP_ID
{
get
{
return (string)ViewState["PTP_ID"];
}
set
{
ViewState["PTP_ID"] = value;
}
}
/// <summary>
/// 单位工程Id
/// </summary>
public string UnitWorkId
{
get
{
return (string)ViewState["UnitWorkId"];
}
set
{
ViewState["UnitWorkId"] = value;
}
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.InitTreeMenu();//加载树
}
}
#region --
/// <summary>
/// 加载树
/// </summary>
private void InitTreeMenu()
{
this.tvControlItem.Nodes.Clear();
TreeNode rootNode1 = new TreeNode();
rootNode1.NodeID = "1";
rootNode1.Text = "建筑工程";
rootNode1.CommandName = "建筑工程";
rootNode1.Selectable = false;
rootNode1.EnableClickEvent = true;
this.tvControlItem.Nodes.Add(rootNode1);
TreeNode rootNode2 = new TreeNode();
rootNode2.NodeID = "2";
rootNode2.Text = "安装工程";
rootNode2.CommandName = "安装工程";
rootNode2.Expanded = true;
rootNode2.EnableClickEvent = true;
this.tvControlItem.Nodes.Add(rootNode2);
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
// 获取当前用户所在单位
var currUnit = pUnits.FirstOrDefault(x => x.UnitId == this.CurrUser.UnitId);
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
select x).ToList();
//List<Model.PTP_TestPackage> testPackageLists = (from x in Funs.DB.PTP_TestPackage
//where x.ProjectId == this.CurrUser.LoginProjectId
//select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;
List<Model.WBS_UnitWork> unitWork2 = null;
//// 当前为施工单位,只能操作本单位的数据
//if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2)
//{
// unitWork1 = (from x in unitWorkList
// where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1"
// select x).ToList();
// unitWork2 = (from x in unitWorkList
// where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2"
// select x).ToList();
//}
//else
//{
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
//}
if (unitWork1.Count() > 0)
{
foreach (var q in unitWork1)
{
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn1 = new TreeNode();
tn1.NodeID = q.UnitWorkId;
tn1.Text = q.UnitWorkName;
tn1.ToolTip = "施工单位:" + unitNamesUnitIds;
tn1.CommandName = "单位工程";
tn1.EnableClickEvent = true;
rootNode1.Nodes.Add(tn1);
//var testPackageUnitList = testPackageLists.Where(x => x.UnitWorkId == q.UnitWorkId).ToList();
//BindNodes(tn1, testPackageUnitList);
}
}
if (unitWork2.Count() > 0)
{
foreach (var q in unitWork2)
{
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn2 = new TreeNode();
tn2.NodeID = q.UnitWorkId;
tn2.Text = q.UnitWorkName;
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
tn2.CommandName = "单位工程";
tn2.EnableClickEvent = true;
rootNode2.Nodes.Add(tn2);
//var testPackageUnitList = testPackageLists.Where(x => x.UnitWorkId == q.UnitWorkId).ToList();
//BindNodes(tn2, testPackageUnitList);
}
}
}
#endregion
#region TreeView
/// <summary>
/// 点击TreeView
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
this.UnitWorkId = tvControlItem.SelectedNodeID;
this.BindGrid();
}
#endregion
#region
/// <summary>
/// 数据绑定
/// </summary>
private void BindGrid()
{
string strSql = @" select t.PTP_ID,
t.ProjectId,
t.UnitId,
t.UnitWorkId,
t.TestPackageNo,
t.TestPackageName
from PTP_TestPackage t where t.ProjectId=@projectId and t.UnitWorkId=@unitWorkId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@unitWorkId", this.UnitWorkId));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
//var table = this.GetPagedDataTable(Grid1, tb1);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#endregion
#region
#region
/// <summary>
/// 页索引改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 分页选择下拉改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
#endregion
#endregion
#region
/// <summary>
/// 打印按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnPrint_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
{
this.PTP_ID = this.Grid1.SelectedRowID;
exportWord("1");
}
else
{
Alert.ShowInTop("请选择一条试压包", MessageBoxIcon.Warning);
return;
}
}
protected void exportWord(string type)
{
if (!string.IsNullOrEmpty(this.PTP_ID))
{
var updateTestPackage = Funs.DB.PTP_TestPackage.FirstOrDefault(x => x.PTP_ID == this.PTP_ID);
if (updateTestPackage != null)
{
string rootPath = Server.MapPath("~/");
BLL.FastReportService.ResetData();
if (this.drpPrintType.SelectedValue == "1")//pdf格式
{
ListItem[] list = new ListItem[10];
list[0] = new ListItem("0", "File\\Fastreport\\JGZL\\管道试压包文件资料.frx");
list[1] = new ListItem("1", "File\\Fastreport\\JGZL\\管道压力试验技术要求.frx");
list[2] = new ListItem("2", "File\\Fastreport\\JGZL\\管道压力包文件资料目录.frx");
list[3] = new ListItem("3", "File\\Fastreport\\JGZL\\管道系统压力试验条件确认记录.frx");
list[4] = new ListItem("4", "File\\Fastreport\\JGZL\\管道试压包尾项清单.frx");
//list[5] = new ListItem("5", "File\\Fastreport\\JGZL\\管道系统压力试验记录.frx");
//list[6] = new ListItem("6", "File\\Fastreport\\JGZL\\管道材料材质标识检查记录.frx");
//list[7] = new ListItem("7", "File\\Fastreport\\JGZL\\管道焊接工作记录.frx");
//list[8] = new ListItem("8", "File\\Fastreport\\JGZL\\管道无损检测数量统计表.frx");
//list[9] = new ListItem("9", "File\\Fastreport\\JGZL\\无损检测结果汇总表.frx");
List<Model.FastReportItem> FastReportItemList = new List<Model.FastReportItem>();
foreach (var item in list)
{
FastReportItemList.Add(GetFastReportItem(updateTestPackage, item.Text));
}
var Path = Funs.RootPath + "FileUpload/" + this.PTP_ID + ".pdf";
BLL.FastReportService.ExportMergeReport(FastReportItemList, Path, this.drpPrintType.SelectedValue);
FileInfo info = new FileInfo(Path);
long fileSize = info.Length;
System.Web.HttpContext.Current.Response.Clear();
System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode("交工资料.pdf", System.Text.Encoding.UTF8));
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
System.Web.HttpContext.Current.Response.TransmitFile(Path, 0, fileSize);
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.Close();
File.Delete(Path);
}
else if (this.drpPrintType.SelectedValue == "2")//word格式
{
ListItem[] list = new ListItem[3];
list[0] = new ListItem("0", "File\\Fastreport\\JGZL\\管道试压包文件资料.frx");
list[1] = new ListItem("1", "File\\Fastreport\\JGZL\\管道压力试验技术要求.frx");
list[2] = new ListItem("2", "File\\Fastreport\\JGZL\\管道压力包文件资料目录.frx");
List<Model.FastReportItem> FastReportItemList = new List<Model.FastReportItem>();
foreach (var item in list)
{
FastReportItemList.Add(GetFastReportItem(updateTestPackage, item.Text));
}
var PathA = Funs.RootPath + "FileUpload/" + this.PTP_ID + ".docx";
BLL.FastReportService.ExportMergeReport(FastReportItemList, PathA, this.drpPrintType.SelectedValue);
Aspose.Words.Document doc1 = new Aspose.Words.Document(PathA);
ListItem[] list2 = new ListItem[1];
list2[0] = new ListItem("3", "File\\Fastreport\\JGZL\\管道系统压力试验条件确认记录.frx");
List<Model.FastReportItem> FastReportItemList2 = new List<Model.FastReportItem>();
foreach (var item in list2)
{
FastReportItemList2.Add(GetFastReportItem(updateTestPackage, item.Text));
}
var PathB = Funs.RootPath + "FileUpload/" + this.PTP_ID + "2.docx";
BLL.FastReportService.ExportMergeReport(FastReportItemList2, PathB, this.drpPrintType.SelectedValue);
Aspose.Words.Document doc2 = new Aspose.Words.Document(PathB);
// 合并 Word DOcx 文档
doc1.AppendDocument(doc2, Aspose.Words.ImportFormatMode.KeepSourceFormatting);
ListItem[] list3 = new ListItem[1];
list3[0] = new ListItem("4", "File\\Fastreport\\JGZL\\管道试压包尾项清单.frx");
List<Model.FastReportItem> FastReportItemList3 = new List<Model.FastReportItem>();
foreach (var item in list3)
{
FastReportItemList3.Add(GetFastReportItem(updateTestPackage, item.Text));
}
var PathC = Funs.RootPath + "FileUpload/" + this.PTP_ID + "3.docx";
BLL.FastReportService.ExportMergeReport(FastReportItemList3, PathC, this.drpPrintType.SelectedValue);
Aspose.Words.Document doc3 = new Aspose.Words.Document(PathC);
// 合并 Word DOcx 文档
doc1.AppendDocument(doc3, Aspose.Words.ImportFormatMode.KeepSourceFormatting);
ListItem[] list4 = new ListItem[2];
list4[0] = new ListItem("5", "File\\Fastreport\\JGZL\\管道系统压力试验记录.frx");
list4[1] = new ListItem("6", "File\\Fastreport\\JGZL\\管道材料材质标识检查记录.frx");
List<Model.FastReportItem> FastReportItemList4 = new List<Model.FastReportItem>();
foreach (var item in list4)
{
FastReportItemList4.Add(GetFastReportItem(updateTestPackage, item.Text));
}
var PathD = Funs.RootPath + "FileUpload/" + this.PTP_ID + "4.docx";
BLL.FastReportService.ExportMergeReport(FastReportItemList4, PathD, this.drpPrintType.SelectedValue);
Aspose.Words.Document doc4 = new Aspose.Words.Document(PathD);
// 合并 Word DOcx 文档
doc1.AppendDocument(doc4, Aspose.Words.ImportFormatMode.KeepSourceFormatting);
ListItem[] list5 = new ListItem[3];
list5[0] = new ListItem("7", "File\\Fastreport\\JGZL\\管道焊接工作记录.frx");
list5[1] = new ListItem("8", "File\\Fastreport\\JGZL\\管道无损检测数量统计表.frx");
list5[2] = new ListItem("9", "File\\Fastreport\\JGZL\\无损检测结果汇总表.frx");
List<Model.FastReportItem> FastReportItemList5 = new List<Model.FastReportItem>();
foreach (var item in list5)
{
FastReportItemList5.Add(GetFastReportItem(updateTestPackage, item.Text));
}
var PathE = Funs.RootPath + "FileUpload/" + this.PTP_ID + "5.docx";
BLL.FastReportService.ExportMergeReport(FastReportItemList5, PathE, this.drpPrintType.SelectedValue);
Aspose.Words.Document doc5 = new Aspose.Words.Document(PathE);
// 合并 Word DOcx 文档
doc1.AppendDocument(doc5, Aspose.Words.ImportFormatMode.KeepSourceFormatting);
//将合并的文档保存为 DOCX 文件
doc1.Save(Funs.RootPath + "FileUpload/doc.docx");
var Path = Funs.RootPath + "FileUpload/doc.docx";
FileInfo info = new FileInfo(Path);
long fileSize = info.Length;
System.Web.HttpContext.Current.Response.Clear();
System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode("交工资料.docx", System.Text.Encoding.UTF8));
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
System.Web.HttpContext.Current.Response.TransmitFile(Path, 0, fileSize);
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.Close();
File.Delete(Path);
File.Delete(PathA);
File.Delete(PathB);
File.Delete(PathC);
File.Delete(PathD);
File.Delete(PathE);
}
}
}
else
{
Alert.ShowInTop("请选择要打印的单据!", MessageBoxIcon.Warning);
return;
}
}
protected Model.FastReportItem GetFastReportItem(Model.PTP_TestPackage updateTestPackage, string printType)
{
string initTemplatePath = "";
Model.FastReportItem fastReportItem = new Model.FastReportItem();
switch (printType)
{
case "0"://管道试压包文件资料
{
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
var InstallationName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName;
keyValuePairs.Add("ProjectName", projectName);
keyValuePairs.Add("InstallationName", projectName + InstallationName);
keyValuePairs.Add("TestPackageNo", updateTestPackage.TestPackageNo);
BLL.FastReportService.AddFastreportParameter(keyValuePairs);
initTemplatePath = "File\\Fastreport\\JGZL\\管道试压包文件资料.frx";
fastReportItem.ReportPath = initTemplatePath;
fastReportItem.ParameterValues = keyValuePairs;
}
break;
case "1"://管道压力试验技术要求
{
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
BLL.FastReportService.AddFastreportParameter(keyValuePairs);
initTemplatePath = "File\\Fastreport\\JGZL\\管道压力试验技术要求.frx";
fastReportItem.ReportPath = initTemplatePath;
fastReportItem.ParameterValues = keyValuePairs;
}
break;
case "2"://管道压力包文件资料目录
{
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
BLL.FastReportService.AddFastreportParameter(keyValuePairs);
initTemplatePath = "File\\Fastreport\\JGZL\\管道压力包文件资料目录.frx";
fastReportItem.ReportPath = initTemplatePath;
fastReportItem.ParameterValues = keyValuePairs;
}
break;
case "3"://管道系统压力试验条件确认记录
{
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
var InstallationName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName;
keyValuePairs.Add("ProjectName", projectName);
keyValuePairs.Add("InstallationName", InstallationName);
keyValuePairs.Add("TestPackageNo", updateTestPackage.TestPackageNo);
keyValuePairs.Add("TestPackageName", updateTestPackage.TestPackageName);
BLL.FastReportService.AddFastreportParameter(keyValuePairs);
initTemplatePath = "File\\Fastreport\\JGZL\\管道系统压力试验条件确认记录.frx";
fastReportItem.ReportPath = initTemplatePath;
fastReportItem.ParameterValues = keyValuePairs;
}
break;
case "4"://管道试压包尾项清单
{
string sql = @"select PT_PipeId,PTP_ID,pipelineList.PipelineId,pipeline.PipelineCode from PTP_PipelineList as pipelineList
left join HJGL_Pipeline pipeline on pipeline.PipelineId = pipelineList.PipelineId
where PTP_ID=@ptp_id";
List<SqlParameter> listStr = new List<SqlParameter>
{
new SqlParameter("@ptp_id", this.PTP_ID),
};
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(sql, parameter);
DataTable dt = new DataTable();
dt.TableName = "Data";
dt.Columns.Add("SortNumber");
dt.Columns.Add("PipelineCode");
for (int i = 0; i < tb.Rows.Count; i++)
{
var newRows = dt.NewRow();
newRows["SortNumber"] = (i + 1).ToString();
newRows["PipelineCode"] = tb.Rows[i]["PipelineCode"].ToString();
dt.Rows.Add(newRows);
}
BLL.FastReportService.AddFastreportTable(dt);
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("TestPackageNo", updateTestPackage.TestPackageNo);
BLL.FastReportService.AddFastreportParameter(keyValuePairs);
initTemplatePath = "File\\Fastreport\\JGZL\\管道试压包尾项清单.frx";
List<DataTable> dataTables = new List<DataTable>();
dataTables.Add(dt);
fastReportItem.ReportPath = initTemplatePath;
fastReportItem.ParameterValues = keyValuePairs;
fastReportItem.DataTables = dataTables;
}
break;
case "5"://管道系统压力试验记录
{
}
break;
case "6"://管道材料材质标识检查记录
{
}
break;
case "7"://管道焊接工作记录
{
}
break;
case "8"://管道无损检测数量统计表
{
}
break;
case "9"://无损检测结果汇总表
{
}
break;
}
return fastReportItem;
}
#endregion
}
}
@@ -0,0 +1,152 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.TestPackage
{
public partial class TestPackageData
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// tvControlItem 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvControlItem;
/// <summary>
/// hdPTP_ID 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdPTP_ID;
/// <summary>
/// Panel2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel2;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// drpPrintType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpPrintType;
/// <summary>
/// btnPrint 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPrint;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
}
}