20260309 管道预制施工检查记录
This commit is contained in:
parent
9361540222
commit
450abeaea7
|
|
@ -2466,6 +2466,30 @@ namespace BLL
|
||||||
/// 工业管道安装汇总表导出模板
|
/// 工业管道安装汇总表导出模板
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string JGZL_IndustrialPipelineInstallationSummaryUrl = "File\\Word\\JGZL\\工业管道安装汇总表导出模板.docx";
|
public const string JGZL_IndustrialPipelineInstallationSummaryUrl = "File\\Word\\JGZL\\工业管道安装汇总表导出模板.docx";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 工程施工开工报告导出模板
|
||||||
|
/// </summary>
|
||||||
|
public const string JGZL_CommencementReportUrl = "File\\Word\\JGZL\\工程施工开工报告导出模板.docx";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 工程中间交接证书导出模板
|
||||||
|
/// </summary>
|
||||||
|
public const string JGZL_HandoverCertificateUrl = "File\\Word\\JGZL\\工程中间交接证书导出模板.docx";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 工序交接记录导出模板
|
||||||
|
/// </summary>
|
||||||
|
public const string JGZL_ProcessHandoverRecordUrl = "File\\Word\\JGZL\\工序交接记录导出模板.docx";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 管道预制施工检查记录导出模板
|
||||||
|
/// </summary>
|
||||||
|
public const string JGZL_PipelinePrefabricationConstructionInspectionRecordUrl= "File\\Word\\JGZL\\管道预制施工检查记录导出模板.docx";
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,16 @@ namespace BLL
|
||||||
return Funs.DB.JGZL_PipelinePrefabricationConstructionInspectionRecord.FirstOrDefault(e => e.RecordId == Id);
|
return Funs.DB.JGZL_PipelinePrefabricationConstructionInspectionRecord.FirstOrDefault(e => e.RecordId == Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据项目获取管道预制施工检查记录
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="projectId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.JGZL_PipelinePrefabricationConstructionInspectionRecord GetPipelinePrefabricationConstructionInspectionRecordByProjectId(string projectId)
|
||||||
|
{
|
||||||
|
return Funs.DB.JGZL_PipelinePrefabricationConstructionInspectionRecord.FirstOrDefault(e => e.ProjectId == projectId);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 添加管道预制施工检查记录
|
/// 添加管道预制施工检查记录
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="01/27/2026 10:56:09" ReportInfo.Modified="02/24/2026 10:11:47" ReportInfo.CreatorVersion="2017.1.16.0">
|
<Report ScriptLanguage="CSharp" ReportInfo.Created="01/27/2026 10:56:09" ReportInfo.Modified="03/09/2026 17:01:04" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||||
<Dictionary>
|
<Dictionary>
|
||||||
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QFU9faa5/HBb4XUQfiMoZgBg==">
|
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QFu+hCcwDgNI1hKwAEG/socw==">
|
||||||
<TableDataSource Name="Data" DataType="System.Int32" PropName="Attach_Image" Enabled="true" TableName="Data">
|
<TableDataSource Name="Data" DataType="System.Int32" PropName="Attach_Image" Enabled="true" TableName="Data">
|
||||||
<Column Name="DrawingNumber" DataType="System.String" PropName="attach_image_id"/>
|
<Column Name="DrawingNumber" DataType="System.String" PropName="attach_image_id"/>
|
||||||
<Column Name="ProfessionalEngineering" DataType="System.String" PropName="image_series"/>
|
<Column Name="ProfessionalEngineering" DataType="System.String" PropName="image_series"/>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
SH/T 3543 -- G112
|
||||||
|
工序交接记录
|
||||||
|
工程名称:
|
||||||
|
|
||||||
|
单位工程名称:管道安装工程
|
||||||
|
执行标准
|
||||||
|
|
||||||
|
组织单位/部门
|
||||||
|
|
||||||
|
交出单位
|
||||||
|
|
||||||
|
接收单位
|
||||||
|
|
||||||
|
交出内容(包括实体质量、质量记录、检试验报告等)及自检结果:
|
||||||
|
|
||||||
|
接收单位意见:
|
||||||
|
接 收 单 位
|
||||||
|
组织交接单位/部门
|
||||||
|
交 出 单 位
|
||||||
|
专业工程师:
|
||||||
|
质量检查员:
|
||||||
|
|
||||||
|
日期: 年 月 日
|
||||||
|
专业工程师:
|
||||||
|
|
||||||
|
|
||||||
|
日期: 年 月 日
|
||||||
|
专业工程师:
|
||||||
|
质量检查员:
|
||||||
|
日期: 年 月 日
|
||||||
|
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
SH/T 3503 -- J106A
|
||||||
|
工程中间交接证书
|
||||||
|
工程名称:
|
||||||
|
施工合同编号
|
||||||
|
|
||||||
|
交接日期
|
||||||
|
|
||||||
|
工
|
||||||
|
|
||||||
|
程
|
||||||
|
|
||||||
|
内
|
||||||
|
|
||||||
|
容
|
||||||
|
|
||||||
|
接
|
||||||
|
收
|
||||||
|
意
|
||||||
|
见
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
使用单位负责(代表)人: 年 月 日
|
||||||
|
质
|
||||||
|
量
|
||||||
|
监
|
||||||
|
督
|
||||||
|
意
|
||||||
|
见
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
工程质量监督站长/组长:(监督站/组章) 年 月 日
|
||||||
|
|
||||||
|
建设单位
|
||||||
|
设计单位
|
||||||
|
监理单位
|
||||||
|
施工单位
|
||||||
|
|
||||||
|
(项目部章)
|
||||||
|
项目经理:
|
||||||
|
|
||||||
|
日期: 年 月 日
|
||||||
|
|
||||||
|
(项目部章)
|
||||||
|
项目经理:
|
||||||
|
|
||||||
|
日期: 年 月 日
|
||||||
|
|
||||||
|
(项目部章)
|
||||||
|
项目总监:
|
||||||
|
|
||||||
|
日期: 年 月 日
|
||||||
|
|
||||||
|
(项目部章)
|
||||||
|
项目经理:
|
||||||
|
|
||||||
|
日期: 年 月 日
|
||||||
|
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
SH/T 3503 -- J105A
|
||||||
|
工程施工开工报告
|
||||||
|
工程名称:
|
||||||
|
施工合同编号
|
||||||
|
|
||||||
|
设计单位
|
||||||
|
|
||||||
|
计划开工日期
|
||||||
|
|
||||||
|
计划交工日期
|
||||||
|
|
||||||
|
工
|
||||||
|
|
||||||
|
程
|
||||||
|
|
||||||
|
内
|
||||||
|
|
||||||
|
容
|
||||||
|
|
||||||
|
|
||||||
|
开
|
||||||
|
工
|
||||||
|
条
|
||||||
|
件
|
||||||
|
|
||||||
|
审
|
||||||
|
查
|
||||||
|
意
|
||||||
|
见
|
||||||
|
|
||||||
|
质
|
||||||
|
量
|
||||||
|
监
|
||||||
|
督
|
||||||
|
意
|
||||||
|
见
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
工程质量监督站长/组长:(监督站/组章)年月日
|
||||||
|
建设单位
|
||||||
|
监理单位
|
||||||
|
施工单位
|
||||||
|
|
||||||
|
(项目部章)
|
||||||
|
项目经理:
|
||||||
|
|
||||||
|
日期: 年 月 日
|
||||||
|
|
||||||
|
(项目部章)
|
||||||
|
项目总监:
|
||||||
|
|
||||||
|
日期: 年 月 日
|
||||||
|
|
||||||
|
(项目部章)
|
||||||
|
项目经理:
|
||||||
|
|
||||||
|
日期: 年 月 日
|
||||||
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
SH/T 3543 -- G122
|
||||||
|
管道预制施工检查记录
|
||||||
|
工程名称:
|
||||||
|
|
||||||
|
单位工程名称:管道安装工程
|
||||||
|
专业工程
|
||||||
|
|
||||||
|
施工图号
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
施工班组长:
|
||||||
|
日期: 年 月 日
|
||||||
|
专业工程师:
|
||||||
|
日期: 年 月 日
|
||||||
|
质量检查员:
|
||||||
|
日期: 年 月 日
|
||||||
|
|
||||||
|
|
@ -45,6 +45,9 @@
|
||||||
<%--<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>--%>
|
<%--<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>--%>
|
||||||
<f:Button ID="btnPrint" Text="工程施工开工报告打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
|
<f:Button ID="btnPrint" Text="工程施工开工报告打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出Word" Icon="FolderUp"
|
||||||
|
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||||
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Org.BouncyCastle.Bcpg.OpenPgp;
|
using Org.BouncyCastle.Bcpg.OpenPgp;
|
||||||
|
using Aspose.Words;
|
||||||
|
|
||||||
namespace FineUIPro.Web.JGZL
|
namespace FineUIPro.Web.JGZL
|
||||||
{
|
{
|
||||||
|
|
@ -307,5 +308,101 @@ namespace FineUIPro.Web.JGZL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 导出按钮
|
||||||
|
/// 导出按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnOut_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string rootPath = Server.MapPath("~/");
|
||||||
|
string initTemplatePath = string.Empty;
|
||||||
|
string uploadfilepath = string.Empty;
|
||||||
|
string newUrl = string.Empty;
|
||||||
|
string filePath = string.Empty;
|
||||||
|
|
||||||
|
string projectId = this.tvControlItem.SelectedNodeID;
|
||||||
|
if (!string.IsNullOrEmpty(projectId))
|
||||||
|
{
|
||||||
|
initTemplatePath = Const.JGZL_CommencementReportUrl;
|
||||||
|
uploadfilepath = rootPath + initTemplatePath;
|
||||||
|
|
||||||
|
newUrl = uploadfilepath.Replace("工程施工开工报告导出模板", "工程施工开工报告");
|
||||||
|
if (File.Exists(newUrl))
|
||||||
|
{
|
||||||
|
File.Delete(newUrl);
|
||||||
|
}
|
||||||
|
File.Copy(uploadfilepath, newUrl);
|
||||||
|
Document doc = new Aspose.Words.Document(uploadfilepath);
|
||||||
|
|
||||||
|
Bookmark projectName = doc.Range.Bookmarks["ProjectName"];
|
||||||
|
if (projectName != null)
|
||||||
|
{
|
||||||
|
projectName.Text = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName;
|
||||||
|
}
|
||||||
|
Bookmark contractNumber = doc.Range.Bookmarks["ContractNumber"];
|
||||||
|
if (contractNumber != null)
|
||||||
|
{
|
||||||
|
contractNumber.Text = this.txtContractNumber.Text;
|
||||||
|
}
|
||||||
|
Bookmark designUnit = doc.Range.Bookmarks["DesignUnit"];
|
||||||
|
if (designUnit != null)
|
||||||
|
{
|
||||||
|
designUnit.Text = this.txtDesignUnit.Text;
|
||||||
|
}
|
||||||
|
Bookmark plannedStartDate =doc.Range.Bookmarks["PlannedStartDate"];
|
||||||
|
if (plannedStartDate != null)
|
||||||
|
{
|
||||||
|
string startDate = string.Format("{0:yyyy年MM月dd日}", Funs.GetNewDateTime(this.txtPlannedStartDate.Text));
|
||||||
|
plannedStartDate.Text = startDate;
|
||||||
|
}
|
||||||
|
Bookmark plannedEndDate = doc.Range.Bookmarks["PlannedEndDate"];
|
||||||
|
if (plannedEndDate != null)
|
||||||
|
{
|
||||||
|
string endDate = string.Format("{0:yyyy年MM月dd日}", Funs.GetNewDateTime(this.txtPlannedEndDate.Text));
|
||||||
|
plannedEndDate.Text = endDate;
|
||||||
|
}
|
||||||
|
Bookmark projectContent = doc.Range.Bookmarks["ProjectContent"];
|
||||||
|
if (projectContent != null)
|
||||||
|
{
|
||||||
|
projectContent.Text = this.txtProjectContent.Text;
|
||||||
|
}
|
||||||
|
Bookmark conditions = doc.Range.Bookmarks["Conditions"];
|
||||||
|
if (conditions != null)
|
||||||
|
{
|
||||||
|
conditions.Text = this.txtConditions.Text;
|
||||||
|
}
|
||||||
|
Bookmark reviewOpinion = doc.Range.Bookmarks["ReviewOpinion"];
|
||||||
|
if (reviewOpinion != null)
|
||||||
|
{
|
||||||
|
reviewOpinion.Text = this.txtReviewOpinion.Text;
|
||||||
|
}
|
||||||
|
Bookmark qualitySupervisionOpinion = doc.Range.Bookmarks["QualitySupervisionOpinion"];
|
||||||
|
if (qualitySupervisionOpinion != null)
|
||||||
|
{
|
||||||
|
qualitySupervisionOpinion.Text = this.txtQualitySupervisionOpinion.Text;
|
||||||
|
}
|
||||||
|
doc.Save(newUrl);
|
||||||
|
|
||||||
|
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);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -122,6 +122,15 @@ namespace FineUIPro.Web.JGZL
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnPrint;
|
protected global::FineUIPro.Button btnPrint;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnOut 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnOut;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SimpleForm1 控件。
|
/// SimpleForm1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,9 @@
|
||||||
<%--<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>--%>
|
<%--<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>--%>
|
||||||
<f:Button ID="btnPrint" Text="工程中间交接证书打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
|
<f:Button ID="btnPrint" Text="工程中间交接证书打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出Word" Icon="FolderUp"
|
||||||
|
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||||
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
|
using Aspose.Words;
|
||||||
|
|
||||||
namespace FineUIPro.Web.JGZL
|
namespace FineUIPro.Web.JGZL
|
||||||
{
|
{
|
||||||
|
|
@ -519,5 +520,89 @@ namespace FineUIPro.Web.JGZL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 导出按钮
|
||||||
|
/// 导出按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnOut_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string rootPath = Server.MapPath("~/");
|
||||||
|
string initTemplatePath = string.Empty;
|
||||||
|
string uploadfilepath = string.Empty;
|
||||||
|
string newUrl = string.Empty;
|
||||||
|
string filePath = string.Empty;
|
||||||
|
|
||||||
|
string projectId = this.tvControlItem.SelectedNodeID;
|
||||||
|
if (!string.IsNullOrEmpty(projectId))
|
||||||
|
{
|
||||||
|
initTemplatePath = Const.JGZL_HandoverCertificateUrl;
|
||||||
|
uploadfilepath = rootPath + initTemplatePath;
|
||||||
|
|
||||||
|
newUrl = uploadfilepath.Replace("工程中间交接证书导出模板", "工程中间交接证书");
|
||||||
|
if (File.Exists(newUrl))
|
||||||
|
{
|
||||||
|
File.Delete(newUrl);
|
||||||
|
}
|
||||||
|
File.Copy(uploadfilepath, newUrl);
|
||||||
|
Document doc = new Aspose.Words.Document(uploadfilepath);
|
||||||
|
|
||||||
|
Bookmark projectName = doc.Range.Bookmarks["ProjectName"];
|
||||||
|
if (projectName != null)
|
||||||
|
{
|
||||||
|
projectName.Text = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName;
|
||||||
|
}
|
||||||
|
Bookmark contractNumber = doc.Range.Bookmarks["ContractNumber"];
|
||||||
|
if (contractNumber != null)
|
||||||
|
{
|
||||||
|
contractNumber.Text = this.txtContractNumber.Text;
|
||||||
|
}
|
||||||
|
Bookmark handoverDate = doc.Range.Bookmarks["HandoverDate"];
|
||||||
|
if (handoverDate != null)
|
||||||
|
{
|
||||||
|
handoverDate.Text = string.Format("{0:yyyy年MM月dd日}", Funs.GetNewDateTime(this.txtHandoverDate.Text));
|
||||||
|
}
|
||||||
|
Bookmark projectContent = doc.Range.Bookmarks["ProjectContent"];
|
||||||
|
if (projectContent != null)
|
||||||
|
{
|
||||||
|
projectContent.Text = this.txtProjectContent.Text;
|
||||||
|
}
|
||||||
|
Bookmark receiveOpinions = doc.Range.Bookmarks["ReceiveOpinions"];
|
||||||
|
if (receiveOpinions != null)
|
||||||
|
{
|
||||||
|
receiveOpinions.Text = this.txtReceiveOpinions.Text;
|
||||||
|
}
|
||||||
|
Bookmark headerMan = doc.Range.Bookmarks["HeaderMan"];
|
||||||
|
if (headerMan != null)
|
||||||
|
{
|
||||||
|
headerMan.Text = this.txtHeaderMan.Text;
|
||||||
|
}
|
||||||
|
Bookmark supervisionOpinion = doc.Range.Bookmarks["SupervisionOpinion"];
|
||||||
|
if (supervisionOpinion != null)
|
||||||
|
{
|
||||||
|
supervisionOpinion.Text = this.txtSupervisionOpinion.Text;
|
||||||
|
}
|
||||||
|
doc.Save(newUrl);
|
||||||
|
|
||||||
|
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);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -122,6 +122,15 @@ namespace FineUIPro.Web.JGZL
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnPrint;
|
protected global::FineUIPro.Button btnPrint;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnOut 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnOut;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SimpleForm1 控件。
|
/// SimpleForm1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -39,14 +39,45 @@
|
||||||
<Items>
|
<Items>
|
||||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||||
</f:ToolbarFill>
|
</f:ToolbarFill>
|
||||||
<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>
|
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
|
||||||
|
OnClick="btnSave_Click">
|
||||||
|
</f:Button>
|
||||||
|
<%--<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>--%>
|
||||||
<f:Button ID="btnPrint" Text="管道预制施工检查记录打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
|
<f:Button ID="btnPrint" Text="管道预制施工检查记录打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出Word" Icon="FolderUp"
|
||||||
|
EnableAjax="false" DisableControlBeforePostBack="false" Hidden="true">
|
||||||
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管道预制施工检查记录" EnableCollapse="true"
|
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BodyPadding="10px"
|
||||||
|
runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||||
|
<Rows>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtDrawingNumber" runat="server" Label="施工图号" LabelAlign="Right" MaxLength="20" Required="true" ShowRedStar="true"></f:TextBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtProfessionalEngineering" runat="server" Label="专业工程" LabelAlign="Right" MaxLength="50" Required="true" ShowRedStar="true"></f:TextBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextArea ID="txtInspectionResults" runat="server" Label="检查记录" LabelAlign="Right" MaxLength="500" Height="120px"></f:TextArea>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextArea ID="txtRemark" runat="server" Label="备注" LabelAlign="Right" MaxLength="500"></f:TextArea>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
</Rows>
|
||||||
|
</f:Form>
|
||||||
|
<%--<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管道预制施工检查记录" EnableCollapse="true"
|
||||||
runat="server" BoxFlex="1" DataKeyNames="RecordId" AllowCellEditing="true"
|
runat="server" BoxFlex="1" DataKeyNames="RecordId" AllowCellEditing="true"
|
||||||
EnableColumnLines="true" ClicksToEdit="1" DataIDField="RecordId" AllowSorting="true"
|
EnableColumnLines="true" ClicksToEdit="1" DataIDField="RecordId" AllowSorting="true"
|
||||||
SortField="DrawingNumber" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
|
SortField="DrawingNumber" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||||
|
|
@ -84,35 +115,35 @@
|
||||||
<f:ListItem Text="25" Value="25" />
|
<f:ListItem Text="25" Value="25" />
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
</PageItems>
|
</PageItems>
|
||||||
</f:Grid>
|
</f:Grid>--%>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
<f:Window ID="Window1" Title="管道预制施工检查记录" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
<%--<f:Window ID="Window1" Title="管道预制施工检查记录" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
Target="top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
|
Target="top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||||
Width="900px" Height="600px">
|
Width="900px" Height="600px">
|
||||||
</f:Window>
|
</f:Window>--%>
|
||||||
<f:Window ID="WindowPrint" Title="打印管道预制施工检查记录" Hidden="true" EnableIFrame="true" EnableMaximize="false"
|
<f:Window ID="WindowPrint" Title="打印管道预制施工检查记录" Hidden="true" EnableIFrame="true" EnableMaximize="false"
|
||||||
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1024px"
|
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1024px"
|
||||||
Height="600px">
|
Height="600px">
|
||||||
</f:Window>
|
</f:Window>
|
||||||
<f:Menu ID="Menu1" runat="server">
|
<%--<f:Menu ID="Menu1" runat="server">
|
||||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||||
runat="server" Text="编辑" Icon="TableEdit">
|
runat="server" Text="编辑" Icon="TableEdit">
|
||||||
</f:MenuButton>
|
</f:MenuButton>
|
||||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||||
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="Delete">
|
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="Delete">
|
||||||
</f:MenuButton>
|
</f:MenuButton>
|
||||||
</f:Menu>
|
</f:Menu>--%>
|
||||||
</form>
|
</form>
|
||||||
<script type="text/javascript">
|
<%--<script type="text/javascript">
|
||||||
var menuID = '<%= Menu1.ClientID %>';
|
var menuID = '<%= Menu1.ClientID %>';
|
||||||
// 返回false,来阻止浏览器右键菜单
|
// 返回false,来阻止浏览器右键菜单
|
||||||
function onRowContextMenu(event, rowId) {
|
function onRowContextMenu(event, rowId) {
|
||||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
</script>
|
</script>--%>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,45 @@ using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Aspose.Words;
|
||||||
|
|
||||||
namespace FineUIPro.Web.JGZL
|
namespace FineUIPro.Web.JGZL
|
||||||
{
|
{
|
||||||
public partial class PipelinePrefabricationConstructionInspectionRecord : PageBase
|
public partial class PipelinePrefabricationConstructionInspectionRecord : PageBase
|
||||||
{
|
{
|
||||||
|
#region 定义项
|
||||||
|
/// <summary>
|
||||||
|
/// 主键
|
||||||
|
/// </summary>
|
||||||
|
private string RecordId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (string)ViewState["RecordId"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["RecordId"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 项目Id
|
||||||
|
/// </summary>
|
||||||
|
private string ProjectId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (string)ViewState["ProjectId"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["ProjectId"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 加载页面
|
#region 加载页面
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加载页面
|
/// 加载页面
|
||||||
|
|
@ -23,7 +57,7 @@ namespace FineUIPro.Web.JGZL
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
//this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||||
|
|
||||||
this.drpProjectId.DataTextField = "ProjectCode";
|
this.drpProjectId.DataTextField = "ProjectCode";
|
||||||
this.drpProjectId.DataValueField = "ProjectId";
|
this.drpProjectId.DataValueField = "ProjectId";
|
||||||
|
|
@ -33,10 +67,41 @@ namespace FineUIPro.Web.JGZL
|
||||||
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
|
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
|
||||||
this.InitTreeMenu();//加载树
|
this.InitTreeMenu();//加载树
|
||||||
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
|
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
|
||||||
this.BindGrid();
|
this.ProjectId = this.tvControlItem.SelectedNodeID;
|
||||||
|
//this.BindGrid();
|
||||||
|
DataInfo();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 加载数据
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
|
private void DataInfo()
|
||||||
|
{
|
||||||
|
txtDrawingNumber.Text = string.Empty;
|
||||||
|
txtProfessionalEngineering.Text = string.Empty;
|
||||||
|
txtInspectionResults.Text = string.Empty;
|
||||||
|
txtRemark.Text = string.Empty;
|
||||||
|
var report = BLL.PipelinePrefabricationConstructionInspectionRecordService.GetPipelinePrefabricationConstructionInspectionRecordByProjectId(this.ProjectId);
|
||||||
|
if (report != null)
|
||||||
|
{
|
||||||
|
this.txtDrawingNumber.Text = report.DrawingNumber;
|
||||||
|
this.txtProfessionalEngineering.Text = report.ProfessionalEngineering;
|
||||||
|
this.txtInspectionResults.Text = report.InspectionResults;
|
||||||
|
this.txtRemark.Text = report.Remark;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||||
|
{
|
||||||
|
this.txtDrawingNumber.Text = BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectCode;
|
||||||
|
this.txtProfessionalEngineering.Text = "管道安装工程";
|
||||||
|
this.txtInspectionResults.Text = BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName + "完成,经自检,管道施工符合SH/T 3501-2011《石油化工有毒、可燃介质钢制管道工程施工及验收规范》要求,焊缝外观检查合格。";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 加载树项目
|
#region 加载树项目
|
||||||
|
|
@ -82,7 +147,9 @@ namespace FineUIPro.Web.JGZL
|
||||||
{
|
{
|
||||||
if (this.tvControlItem.SelectedNodeID != "0")
|
if (this.tvControlItem.SelectedNodeID != "0")
|
||||||
{
|
{
|
||||||
this.BindGrid();
|
this.ProjectId = this.tvControlItem.SelectedNodeID;
|
||||||
|
//this.BindGrid();
|
||||||
|
DataInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
@ -91,30 +158,30 @@ namespace FineUIPro.Web.JGZL
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数据绑定
|
/// 数据绑定
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void BindGrid()
|
//private void BindGrid()
|
||||||
{
|
//{
|
||||||
//string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1");
|
// //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1");
|
||||||
string strSql = @"SELECT * from JGZL_PipelinePrefabricationConstructionInspectionRecord where 1=1";
|
// string strSql = @"SELECT * from JGZL_PipelinePrefabricationConstructionInspectionRecord where 1=1";
|
||||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
// List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||||
{
|
// {
|
||||||
strSql += " AND ProjectId = @ProjectId";
|
// strSql += " AND ProjectId = @ProjectId";
|
||||||
listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
|
// listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
|
||||||
}
|
// }
|
||||||
//else
|
// //else
|
||||||
//{
|
// //{
|
||||||
// strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 ";
|
// // strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 ";
|
||||||
// listStr.Add(new SqlParameter("@ProjectId", projectIds));
|
// // listStr.Add(new SqlParameter("@ProjectId", projectIds));
|
||||||
//}
|
// //}
|
||||||
SqlParameter[] parameter = listStr.ToArray();
|
// SqlParameter[] parameter = listStr.ToArray();
|
||||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
// 2.获取当前分页数据
|
// // 2.获取当前分页数据
|
||||||
Grid1.RecordCount = tb.Rows.Count;
|
// Grid1.RecordCount = tb.Rows.Count;
|
||||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
// //tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||||
var table = this.GetPagedDataTable(Grid1, tb);
|
// var table = this.GetPagedDataTable(Grid1, tb);
|
||||||
Grid1.DataSource = table;
|
// Grid1.DataSource = table;
|
||||||
Grid1.DataBind();
|
// Grid1.DataBind();
|
||||||
}
|
//}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 分页排序
|
#region 分页排序
|
||||||
|
|
@ -124,10 +191,10 @@ namespace FineUIPro.Web.JGZL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
//protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||||
{
|
//{
|
||||||
BindGrid();
|
// BindGrid();
|
||||||
}
|
//}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 排序
|
#region 排序
|
||||||
|
|
@ -136,10 +203,10 @@ namespace FineUIPro.Web.JGZL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
//protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||||
{
|
//{
|
||||||
BindGrid();
|
// BindGrid();
|
||||||
}
|
//}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 分页选择下拉改变事件
|
#region 分页选择下拉改变事件
|
||||||
|
|
@ -148,11 +215,11 @@ namespace FineUIPro.Web.JGZL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
//protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
//{
|
||||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
// Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||||
BindGrid();
|
// BindGrid();
|
||||||
}
|
//}
|
||||||
#endregion
|
#endregion
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -164,8 +231,11 @@ namespace FineUIPro.Web.JGZL
|
||||||
///<param name="e"></param>
|
///<param name="e"></param>
|
||||||
protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e)
|
protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
this.ProjectId = this.drpProjectId.SelectedValue;
|
||||||
this.InitTreeMenu();
|
this.InitTreeMenu();
|
||||||
this.BindGrid();
|
this.tvControlItem.SelectedNodeID = this.ProjectId;
|
||||||
|
this.DataInfo();
|
||||||
|
//this.BindGrid();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -175,7 +245,7 @@ namespace FineUIPro.Web.JGZL
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.BindGrid();
|
//this.BindGrid();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -194,41 +264,41 @@ namespace FineUIPro.Web.JGZL
|
||||||
string rootPath = Server.MapPath("~/");
|
string rootPath = Server.MapPath("~/");
|
||||||
BLL.Common.FastReportService.ResetData();
|
BLL.Common.FastReportService.ResetData();
|
||||||
|
|
||||||
string id = this.Grid1.SelectedRowID;
|
//string id = this.Grid1.SelectedRowID;
|
||||||
if (!string.IsNullOrEmpty(id))
|
//if (!string.IsNullOrEmpty(id))
|
||||||
|
//{
|
||||||
|
DataTable dt = new DataTable();
|
||||||
|
dt.TableName = "Data";
|
||||||
|
dt.Columns.Add("DrawingNumber");
|
||||||
|
dt.Columns.Add("ProfessionalEngineering");
|
||||||
|
dt.Columns.Add("InspectionResults");
|
||||||
|
|
||||||
|
//var report = BLL.PipelinePrefabricationConstructionInspectionRecordService.GetPipelinePrefabricationConstructionInspectionRecordById(id);
|
||||||
|
//if (report != null)
|
||||||
|
//{
|
||||||
|
var newRow = dt.NewRow();
|
||||||
|
newRow["DrawingNumber"] = txtDrawingNumber.Text.Trim();
|
||||||
|
newRow["ProfessionalEngineering"] = txtProfessionalEngineering.Text.Trim();
|
||||||
|
newRow["InspectionResults"] = txtInspectionResults.Text;
|
||||||
|
dt.Rows.Add(newRow);
|
||||||
|
//}
|
||||||
|
BLL.Common.FastReportService.AddFastreportTable(dt);
|
||||||
|
|
||||||
|
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||||
|
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
|
||||||
|
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
|
||||||
|
|
||||||
|
initTemplatePath = "File\\Fastreport\\JGZL\\管道预制施工检查记录.frx";
|
||||||
|
if (File.Exists(rootPath + initTemplatePath))
|
||||||
{
|
{
|
||||||
DataTable dt = new DataTable();
|
PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
||||||
dt.TableName = "Data";
|
|
||||||
dt.Columns.Add("DrawingNumber");
|
|
||||||
dt.Columns.Add("ProfessionalEngineering");
|
|
||||||
dt.Columns.Add("InspectionResults");
|
|
||||||
|
|
||||||
var report = BLL.PipelinePrefabricationConstructionInspectionRecordService.GetPipelinePrefabricationConstructionInspectionRecordById(id);
|
|
||||||
if (report != null)
|
|
||||||
{
|
|
||||||
var newRow = dt.NewRow();
|
|
||||||
newRow["DrawingNumber"] = report.DrawingNumber;
|
|
||||||
newRow["ProfessionalEngineering"] = report.ProfessionalEngineering;
|
|
||||||
newRow["InspectionResults"] = report.InspectionResults;
|
|
||||||
dt.Rows.Add(newRow);
|
|
||||||
}
|
|
||||||
BLL.Common.FastReportService.AddFastreportTable(dt);
|
|
||||||
|
|
||||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
|
||||||
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
|
|
||||||
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
|
|
||||||
|
|
||||||
initTemplatePath = "File\\Fastreport\\JGZL\\管道预制施工检查记录.frx";
|
|
||||||
if (File.Exists(rootPath + initTemplatePath))
|
|
||||||
{
|
|
||||||
PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -244,139 +314,139 @@ namespace FineUIPro.Web.JGZL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnAdd_Click(object sender, EventArgs e)
|
//protected void btnAdd_Click(object sender, EventArgs e)
|
||||||
{
|
//{
|
||||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||||
{
|
// {
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipelinePrefabricationConstructionInspectionRecordEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - ")));
|
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipelinePrefabricationConstructionInspectionRecordEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - ")));
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
|
// Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 双击编辑
|
/// 双击编辑
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
//protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||||
{
|
//{
|
||||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_PipelinePrefabricationConstructionInspectionRecordMenuId, BLL.Const.BtnModify))
|
// if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_PipelinePrefabricationConstructionInspectionRecordMenuId, BLL.Const.BtnModify))
|
||||||
{
|
// {
|
||||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||||
{
|
// {
|
||||||
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
|
// if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
|
||||||
{
|
// {
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipelinePrefabricationConstructionInspectionRecordEdit.aspx?recordId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
|
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipelinePrefabricationConstructionInspectionRecordEdit.aspx?recordId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
|
// Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
// ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 右键编辑
|
/// 右键编辑
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
//protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||||
{
|
//{
|
||||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_PipelinePrefabricationConstructionInspectionRecordMenuId, BLL.Const.BtnModify))
|
// if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_PipelinePrefabricationConstructionInspectionRecordMenuId, BLL.Const.BtnModify))
|
||||||
{
|
// {
|
||||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
// if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||||
{
|
// {
|
||||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipelinePrefabricationConstructionInspectionRecordEdit.aspx?recordId={0}", Grid1.SelectedRowID, "维护 - ")));
|
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PipelinePrefabricationConstructionInspectionRecordEdit.aspx?recordId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
// Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 右键删除
|
/// 右键删除
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
//protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||||
{
|
//{
|
||||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_PipelinePrefabricationConstructionInspectionRecordMenuId, Const.BtnDelete))
|
// if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_PipelinePrefabricationConstructionInspectionRecordMenuId, Const.BtnDelete))
|
||||||
{
|
// {
|
||||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
// if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||||
{
|
// {
|
||||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
bool isShow = true;
|
// bool isShow = true;
|
||||||
if (Grid1.SelectedRowIndexArray.Length > 1)
|
// if (Grid1.SelectedRowIndexArray.Length > 1)
|
||||||
{
|
// {
|
||||||
isShow = false;
|
// isShow = false;
|
||||||
}
|
// }
|
||||||
bool isDelete = false;
|
// bool isDelete = false;
|
||||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
// foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||||
{
|
// {
|
||||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
// string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||||
if (judgementDelete(rowID, isShow))
|
// if (judgementDelete(rowID, isShow))
|
||||||
{
|
// {
|
||||||
isDelete = true;
|
// isDelete = true;
|
||||||
BLL.PipelinePrefabricationConstructionInspectionRecordService.DeletePipelinePrefabricationConstructionInspectionRecordById(rowID);
|
// BLL.PipelinePrefabricationConstructionInspectionRecordService.DeletePipelinePrefabricationConstructionInspectionRecordById(rowID);
|
||||||
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除管道预制施工检查记录");
|
// BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除管道预制施工检查记录");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (isDelete)
|
// if (isDelete)
|
||||||
{
|
// {
|
||||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
// ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||||
}
|
// }
|
||||||
this.BindGrid();
|
// this.BindGrid();
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
// Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
#region 判断是否可删除
|
#region 判断是否可删除
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 判断是否可以删除
|
/// 判断是否可以删除
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private bool judgementDelete(string id, bool isShow)
|
//private bool judgementDelete(string id, bool isShow)
|
||||||
{
|
//{
|
||||||
string content = string.Empty;
|
// string content = string.Empty;
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(content))
|
// if (string.IsNullOrEmpty(content))
|
||||||
{
|
// {
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
if (isShow)
|
// if (isShow)
|
||||||
{
|
// {
|
||||||
Alert.ShowInTop(content, MessageBoxIcon.Error);
|
// Alert.ShowInTop(content, MessageBoxIcon.Error);
|
||||||
}
|
// }
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
#endregion
|
#endregion
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -386,10 +456,122 @@ namespace FineUIPro.Web.JGZL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
//protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||||
|
//{
|
||||||
|
// this.InitTreeMenu();//加载树
|
||||||
|
// this.BindGrid();
|
||||||
|
//}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 提交按钮
|
||||||
|
/// <summary>
|
||||||
|
/// 提交按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnSave_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.InitTreeMenu();//加载树
|
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_PipelinePrefabricationConstructionInspectionRecordMenuId, Const.BtnSave))
|
||||||
this.BindGrid();
|
{
|
||||||
|
Model.JGZL_PipelinePrefabricationConstructionInspectionRecord newReport = new Model.JGZL_PipelinePrefabricationConstructionInspectionRecord();
|
||||||
|
newReport.DrawingNumber = this.txtDrawingNumber.Text.Trim();
|
||||||
|
newReport.ProfessionalEngineering = this.txtProfessionalEngineering.Text.Trim();
|
||||||
|
newReport.InspectionResults = this.txtInspectionResults.Text.Trim();
|
||||||
|
newReport.Remark = this.txtRemark.Text.Trim();
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(this.RecordId))
|
||||||
|
{
|
||||||
|
newReport.RecordId = this.RecordId;
|
||||||
|
BLL.PipelinePrefabricationConstructionInspectionRecordService.UpdatePipelinePrefabricationConstructionInspectionRecord(newReport);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newReport.ProjectId = this.ProjectId;
|
||||||
|
newReport.CompileMan = this.CurrUser.UserId;
|
||||||
|
newReport.CompileDate = DateTime.Now;
|
||||||
|
newReport.Reviewer = this.CurrUser.UserId;
|
||||||
|
newReport.RevieweDate = DateTime.Now;
|
||||||
|
newReport.RecordId = SQLHelper.GetNewID(typeof(Model.JGZL_PipelinePrefabricationConstructionInspectionRecord));
|
||||||
|
this.RecordId = newReport.RecordId;
|
||||||
|
BLL.PipelinePrefabricationConstructionInspectionRecordService.AddPipelinePrefabricationConstructionInspectionRecord(newReport);
|
||||||
|
}
|
||||||
|
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||||
|
//PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 导出按钮
|
||||||
|
/// 导出按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnOut_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string rootPath = Server.MapPath("~/");
|
||||||
|
string initTemplatePath = string.Empty;
|
||||||
|
string uploadfilepath = string.Empty;
|
||||||
|
string newUrl = string.Empty;
|
||||||
|
string filePath = string.Empty;
|
||||||
|
|
||||||
|
string projectId = this.tvControlItem.SelectedNodeID;
|
||||||
|
if (!string.IsNullOrEmpty(projectId))
|
||||||
|
{
|
||||||
|
initTemplatePath = Const.JGZL_PipelinePrefabricationConstructionInspectionRecordUrl;
|
||||||
|
uploadfilepath = rootPath + initTemplatePath;
|
||||||
|
|
||||||
|
newUrl = uploadfilepath.Replace("管道预制施工检查记录导出模板", "管道预制施工检查记录");
|
||||||
|
if (File.Exists(newUrl))
|
||||||
|
{
|
||||||
|
File.Delete(newUrl);
|
||||||
|
}
|
||||||
|
File.Copy(uploadfilepath, newUrl);
|
||||||
|
Document doc = new Aspose.Words.Document(uploadfilepath);
|
||||||
|
|
||||||
|
Bookmark projectName = doc.Range.Bookmarks["ProjectName"];
|
||||||
|
if (projectName != null)
|
||||||
|
{
|
||||||
|
projectName.Text = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName;
|
||||||
|
}
|
||||||
|
Bookmark drawingNumber = doc.Range.Bookmarks["DrawingNumber"];
|
||||||
|
if (drawingNumber != null)
|
||||||
|
{
|
||||||
|
drawingNumber.Text = this.txtDrawingNumber.Text;
|
||||||
|
}
|
||||||
|
Bookmark professionalEngineering = doc.Range.Bookmarks["ProfessionalEngineering"];
|
||||||
|
if (professionalEngineering != null)
|
||||||
|
{
|
||||||
|
professionalEngineering.Text = this.txtProfessionalEngineering.Text;
|
||||||
|
}
|
||||||
|
Bookmark inspectionResults = doc.Range.Bookmarks["InspectionResults"];
|
||||||
|
if (inspectionResults != null)
|
||||||
|
{
|
||||||
|
inspectionResults.Text = this.txtInspectionResults.Text;
|
||||||
|
}
|
||||||
|
doc.Save(newUrl);
|
||||||
|
|
||||||
|
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);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -105,13 +105,13 @@ namespace FineUIPro.Web.JGZL
|
||||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnAdd 控件。
|
/// btnSave 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnAdd;
|
protected global::FineUIPro.Button btnSave;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnPrint 控件。
|
/// btnPrint 控件。
|
||||||
|
|
@ -123,49 +123,58 @@ namespace FineUIPro.Web.JGZL
|
||||||
protected global::FineUIPro.Button btnPrint;
|
protected global::FineUIPro.Button btnPrint;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Grid1 控件。
|
/// btnOut 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Grid Grid1;
|
protected global::FineUIPro.Button btnOut;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarSeparator1 控件。
|
/// SimpleForm1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
protected global::FineUIPro.Form SimpleForm1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarText1 控件。
|
/// txtDrawingNumber 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
protected global::FineUIPro.TextBox txtDrawingNumber;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ddlPageSize 控件。
|
/// txtProfessionalEngineering 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
protected global::FineUIPro.TextBox txtProfessionalEngineering;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Window1 控件。
|
/// txtInspectionResults 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Window Window1;
|
protected global::FineUIPro.TextArea txtInspectionResults;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtRemark 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextArea txtRemark;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// WindowPrint 控件。
|
/// WindowPrint 控件。
|
||||||
|
|
@ -175,32 +184,5 @@ namespace FineUIPro.Web.JGZL
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Window WindowPrint;
|
protected global::FineUIPro.Window WindowPrint;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Menu1 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Menu Menu1;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnMenuEdit 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnMenuDelete 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,9 @@
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:Button ID="btnPrint" Text="工序交接记录打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
|
<f:Button ID="btnPrint" Text="工序交接记录打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出Word" Icon="FolderUp"
|
||||||
|
EnableAjax="false" DisableControlBeforePostBack="false" Hidden="true">
|
||||||
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using BLL;
|
using Aspose.Words;
|
||||||
|
using BLL;
|
||||||
using FastReport;
|
using FastReport;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
@ -306,5 +307,88 @@ namespace FineUIPro.Web.JGZL
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 导出按钮
|
||||||
|
/// 导出按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnOut_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string rootPath = Server.MapPath("~/");
|
||||||
|
string initTemplatePath = string.Empty;
|
||||||
|
string uploadfilepath = string.Empty;
|
||||||
|
string newUrl = string.Empty;
|
||||||
|
string filePath = string.Empty;
|
||||||
|
|
||||||
|
string projectId = this.tvControlItem.SelectedNodeID;
|
||||||
|
if (!string.IsNullOrEmpty(projectId))
|
||||||
|
{
|
||||||
|
initTemplatePath = Const.JGZL_ProcessHandoverRecordUrl;
|
||||||
|
uploadfilepath = rootPath + initTemplatePath;
|
||||||
|
|
||||||
|
newUrl = uploadfilepath.Replace("工序交接记录导出模板", "工序交接记录");
|
||||||
|
if (File.Exists(newUrl))
|
||||||
|
{
|
||||||
|
File.Delete(newUrl);
|
||||||
|
}
|
||||||
|
File.Copy(uploadfilepath, newUrl);
|
||||||
|
Document doc = new Aspose.Words.Document(uploadfilepath);
|
||||||
|
|
||||||
|
Bookmark projectName = doc.Range.Bookmarks["ProjectName"];
|
||||||
|
if (projectName != null)
|
||||||
|
{
|
||||||
|
projectName.Text = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName;
|
||||||
|
}
|
||||||
|
Bookmark executionStandard = doc.Range.Bookmarks["ExecutionStandard"];
|
||||||
|
if (executionStandard != null)
|
||||||
|
{
|
||||||
|
executionStandard.Text = this.txtExecutionStandard.Text;
|
||||||
|
}
|
||||||
|
Bookmark organizationalUnit = doc.Range.Bookmarks["OrganizationalUnit"];
|
||||||
|
if (organizationalUnit != null)
|
||||||
|
{
|
||||||
|
organizationalUnit.Text = this.txtOrganizationalUnit.Text;
|
||||||
|
}
|
||||||
|
Bookmark handoverUnit = doc.Range.Bookmarks["HandoverUnit"];
|
||||||
|
if (handoverUnit != null)
|
||||||
|
{
|
||||||
|
handoverUnit.Text = this.txtHandoverUnit.Text;
|
||||||
|
}
|
||||||
|
Bookmark receivingUnit = doc.Range.Bookmarks["ReceivingUnit"];
|
||||||
|
if (receivingUnit != null)
|
||||||
|
{
|
||||||
|
receivingUnit.Text = this.txtReceivingUnit.Text;
|
||||||
|
}
|
||||||
|
Bookmark inspectionResults = doc.Range.Bookmarks["InspectionResults"];
|
||||||
|
if (inspectionResults != null)
|
||||||
|
{
|
||||||
|
inspectionResults.Text = this.txtInspectionResults.Text;
|
||||||
|
}
|
||||||
|
Bookmark receivingUnitOpinions = doc.Range.Bookmarks["ReceivingUnitOpinions"];
|
||||||
|
if (receivingUnitOpinions != null)
|
||||||
|
{
|
||||||
|
receivingUnitOpinions.Text = this.txtReceivingUnitOpinions.Text;
|
||||||
|
}
|
||||||
|
doc.Save(newUrl);
|
||||||
|
|
||||||
|
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);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -122,6 +122,15 @@ namespace FineUIPro.Web.JGZL
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnPrint;
|
protected global::FineUIPro.Button btnPrint;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnOut 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnOut;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SimpleForm1 控件。
|
/// SimpleForm1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue