20260327 工艺管道试压包审核报验申请表

This commit is contained in:
毕文静 2026-03-27 18:00:59 +08:00
parent 599ceb7ab8
commit 2560524757
7 changed files with 771 additions and 47 deletions

View File

@ -1927,6 +1927,11 @@ namespace BLL
/// 试压包资料目录
/// </summary>
public const string SYBData_FileDirectoryMenuId = "B3F05879-2439-4445-8449-AA2010FA0961";
/// <summary>
/// 工艺管道试压包报审/报验申请表
/// </summary>
public const string SYBData_ApplicationFormMenuId = "71F70139-5281-480D-9787-7065BDA8A290";
#endregion
#region ID

View File

@ -38,6 +38,7 @@ namespace BLL
newApplicationForm.ProfessionalEngineer = applicationForm.ProfessionalEngineer;
newApplicationForm.ApplicationDate = applicationForm.ApplicationDate;
db.SYBData_ApplicationForm.InsertOnSubmit(newApplicationForm);
db.SubmitChanges();
}
/// <summary>

View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="03/27/2026 15:26:18" ReportInfo.Modified="03/27/2026 17:30:10" ReportInfo.CreatorVersion="2017.1.16.0">
<Dictionary>
<Parameter Name="ProjectName" DataType="System.String"/>
<Parameter Name="ApplicationFormCode" DataType="System.String"/>
<Parameter Name="SupervisionUnit" DataType="System.String"/>
<Parameter Name="Contents" DataType="System.String"/>
<Parameter Name="ProfessionalEngineer" DataType="System.String"/>
<Parameter Name="ApplicationDate" DataType="System.String"/>
<Parameter Name="Contents2" DataType="System.String"/>
</Dictionary>
<ReportPage Name="Page1" RawPaperSize="9" LeftMargin="22" TopMargin="13.3" RightMargin="17" BottomMargin="16.5" Guides="0,646.38,158.76,412.02,497.07,253.26,468.72,18.9,66.15,61.15,278.5,382.45,23.35,136.75,628.15,80.05,174.55,32.8,330.75,434.7,378,425.25,585.9,132.3,9.45,453.6,623.7,215.46,103.95,302.4,444.15,614.25,396.9,160.65,217.35,595.35,387.45,141.75">
<PageHeaderBand Name="PageHeader1" Width="646.38" Height="113.4" Guides="0,113.4,66.15,9.45,28.35,47.25,18.9">
<TableObject Name="Table1" Width="646.38" Height="113.4">
<TableColumn Name="Column1" Width="158.76"/>
<TableColumn Name="Column2" Width="253.26"/>
<TableColumn Name="Column3" Width="234.36"/>
<TableRow Name="Row1" Height="66.15">
<TableCell Name="Cell1" Border.Lines="All" Text="SH/T 3903-B.17" HorzAlign="Center" VertAlign="Center" Font="黑体, 10.5pt" RowSpan="2"/>
<TableCell Name="Cell2" Border.Lines="All" Text="工艺管道试压包&#13;&#10;报审/报验申请表" HorzAlign="Center" VertAlign="Center" Font="思源宋体 CN, 16pt, style=Bold" RowSpan="2"/>
<TableCell Name="Cell3" Border.Lines="Left, Right, Top" Text=" [ProjectName]" Padding="2, 10, 2, 1" Font="楷体, 10.5pt">
<TextObject Name="Text1" Top="9.45" Width="85.05" Height="18.9" Text="工程名称:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableCell>
</TableRow>
<TableRow Name="Row2" Height="47.25">
<TableCell Name="Cell6" Border.Lines="All"/>
<TableCell Name="Cell7" Border.Lines="All"/>
<TableCell Name="Cell8" Border.Lines="Left, Right, Bottom" Text=" [ApplicationFormCode]" Font="楷体, 10.5pt">
<TextObject Name="Text2" Width="56.7" Height="18.9" Text="编号:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableCell>
</TableRow>
</TableObject>
</PageHeaderBand>
<DataBand Name="Data1" Top="117.4" Width="646.38" Height="896.62" Guides="0,896.62,349.65,9.45,37.8,12.3,31.2,50.1,69,144.6,163.5,283.5,302.4,321.3,340.2,311.85,330.75,103.95,122.85,75.6,94.5,604.8,28.35,189,207.9,226.8,245.7,255.15,56.7,217.35,236.25,264.6,291.82">
<TableObject Name="Table2" Width="646.38" Height="896.62" Border.Lines="All">
<TableColumn Name="Column4" Width="215.46"/>
<TableColumn Name="Column5" Width="215.46"/>
<TableColumn Name="Column6" Width="215.46"/>
<TableRow Name="Row3" Height="349.65">
<TableCell Name="Cell9" Border.Lines="All" ColSpan="3">
<TextObject Name="Text3" Left="18.9" Top="9.45" Width="47.25" Height="28.35" Text="致:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text4" Left="61.15" Top="12.3" Width="217.35" Height="18.9" Border.Lines="Bottom" Text="[SupervisionUnit]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text5" Left="278.5" Top="12.3" Width="103.95" Height="18.9" Text="(监理单位)" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text6" Left="23.35" Top="50.1" Width="113.4" Height="18.9" Text="我单位已完成了" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text7" Left="136.75" Top="50.1" Width="491.4" Height="18.9" Border.Lines="Bottom" Text="[Contents]" Font="楷体, 10.5pt"/>
<TextObject Name="Text9" Left="80.05" Top="144.6" Width="94.5" Height="18.9" Border.Lines="Bottom" Text="试压包资料" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text8" Left="32.8" Top="144.6" Width="47.25" Height="18.9" Text="附:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text10" Left="330.75" Top="283.5" Width="103.95" Height="18.9" Text="专业工程师:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text11" Left="378" Top="321.3" Width="56.7" Height="18.9" Text="日期:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text12" Left="425.25" Top="283.5" Width="160.65" Height="18.9" Border.Lines="Bottom" Text="[ProfessionalEngineer]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TextObject Name="Text13" Left="425.25" Top="321.3" Width="160.65" Height="18.9" Border.Lines="Bottom" Text="[ApplicationDate]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
<TextObject Name="Text14" Left="18.9" Top="311.85" Width="113.4" Height="18.9" Text="承包单位(章)" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text15" Left="9.45" Top="103.95" Width="444.15" Height="18.9" Text="工作,经自检合格,现报上该工程报验申请表,请予以审查和验收。" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text29" Left="18.9" Top="75.6" Width="604.8" Height="18.9" Border.Lines="Bottom" Text="[Contents2]" Font="楷体, 10.5pt"/>
</TableCell>
<TableCell Name="Cell10" Border.Lines="All"/>
<TableCell Name="Cell11" Border.Lines="All"/>
</TableRow>
<TableRow Name="Row4" Height="255.15">
<TableCell Name="Cell14" Border.Lines="All" ColSpan="3">
<TextObject Name="Text16" Left="9.45" Top="9.45" Width="94.5" Height="18.9" Text="审查意见:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text17" Left="302.4" Top="189" Width="151.2" Height="18.9" Text="总/专业监理工程师: " HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text18" Left="444.15" Top="189" Width="170.1" Height="18.9" Border.Lines="Bottom" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text19" Left="396.9" Top="226.8" Width="56.7" Height="18.9" Text="日期:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text20" Left="444.15" Top="226.8" Width="170.1" Height="18.9" Border.Lines="Bottom" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text21" Left="18.9" Top="226.8" Width="141.75" Height="18.9" Text="项目监理机构(章) " HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableCell>
<TableCell Name="Cell15" Border.Lines="All"/>
<TableCell Name="Cell16" Border.Lines="All"/>
</TableRow>
<TableRow Name="Row5" Height="291.82">
<TableCell Name="Cell19" Border.Lines="All" ColSpan="3">
<TextObject Name="Text22" Left="18.9" Top="9.45" Width="141.75" Height="18.9" Text="建设单位审批意见:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text23" Top="37.8" Width="217.35" Height="18.9" Text="(注:此仅对建设单位必要时)" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text24" Left="330.75" Top="217.35" Width="113.4" Height="18.9" Text="建设单位代表:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text25" Left="434.7" Top="217.35" Width="160.65" Height="18.9" Border.Lines="Bottom" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text26" Left="387.45" Top="245.7" Width="56.7" Height="18.9" Text="日期:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text27" Left="434.7" Top="245.7" Width="160.65" Height="18.9" Border.Lines="Bottom" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text28" Left="9.45" Top="245.7" Width="132.3" Height="18.9" Text="建设单位(章)" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableCell>
<TableCell Name="Cell20" Border.Lines="All"/>
<TableCell Name="Cell21" Border.Lines="All"/>
</TableRow>
</TableObject>
</DataBand>
</ReportPage>
</Report>

View File

@ -110,51 +110,63 @@ namespace FineUIPro.Web.JGZL
private void DataIsoInfo()
{
var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.tvControlItem.SelectedNodeID);
foreach (var item in isoInfo)
if (isoInfo.Count > 0)
{
var summary = BLL.IndustrialPipelineInstallationSummaryService.GetIndustrialPipelineInstallationSummaryByPipelineCode(item.ISO_IsoNo);
if (summary == null)
if (!string.IsNullOrEmpty(this.drpCertificateCode.SelectedValue))
{
Model.JGZL_IndustrialPipelineInstallationSummary newSummary = new JGZL_IndustrialPipelineInstallationSummary();
newSummary.SummaryId = SQLHelper.GetNewID(typeof(Model.JGZL_IndustrialPipelineInstallationSummary));
newSummary.ProjectId = this.tvControlItem.SelectedNodeID;
newSummary.CertificateId = this.drpCertificateCode.SelectedValue;
newSummary.PipelineCode = item.ISO_IsoNo;
if (!string.IsNullOrEmpty(item.ISC_ID))
foreach (var item in isoInfo)
{
newSummary.PipelineLevel = BLL.HJGL_PipingClassService.GetPipingClassByPipingClassId(item.ISC_ID).ISC_IsoName;
var summary = BLL.IndustrialPipelineInstallationSummaryService.GetIndustrialPipelineInstallationSummaryByPipelineCode(item.ISO_IsoNo);
if (summary == null)
{
Model.JGZL_IndustrialPipelineInstallationSummary newSummary = new JGZL_IndustrialPipelineInstallationSummary();
newSummary.SummaryId = SQLHelper.GetNewID(typeof(Model.JGZL_IndustrialPipelineInstallationSummary));
newSummary.ProjectId = this.tvControlItem.SelectedNodeID;
newSummary.CertificateId = this.drpCertificateCode.SelectedValue;
newSummary.PipelineCode = item.ISO_IsoNo;
if (!string.IsNullOrEmpty(item.ISC_ID))
{
newSummary.PipelineLevel = BLL.HJGL_PipingClassService.GetPipingClassByPipingClassId(item.ISC_ID).ISC_IsoName;
}
newSummary.DesignPressure = item.ISO_DesignPress.ToString();
newSummary.DesignTemperature = item.ISO_DesignTemperature.ToString();
if (!string.IsNullOrEmpty(item.SER_ID))
{
newSummary.Medium = BLL.HJGL_MediumService.GetServiceBySERID(item.SER_ID).SER_Name;
}
if (!string.IsNullOrEmpty(item.STE_ID))
{
newSummary.Material = BLL.HJGL_MaterialService.GetSteelBySteID(item.STE_ID).STE_Code;
}
var jointInfo = (from x in Funs.DB.HJGL_PW_JointInfo where x.ISO_ID == item.ISO_ID select x).FirstOrDefault();
if (jointInfo != null)
{
newSummary.Specifications = jointInfo.JOT_JointDesc;
}
newSummary.Length = item.PipeLineLength.ToString();
newSummary.WeldsNum = BLL.HJGL_PW_JointInfoService.GetJointCountByIsoId(item.ISO_ID).ToString();
if (!string.IsNullOrEmpty(item.Joty_B_Rate))
{
newSummary.LosslessRatio = HJGL_DetectionService.GetNDTRateByNDTRID(item.Joty_B_Rate).NDTR_Name;//无损检测比例
}
//newSummary.VoltageResistantTestMethod = "水压";//耐压试验方法
newSummary.VoltageResistantTestMedium = "水";//耐压试验介质
newSummary.LeakageTestMedium = "空气";//泄漏试验介质
newSummary.CleaningMethod = "压缩空气吹扫";//吹扫、清洗方法
newSummary.VoltageResistantTestPressure = item.ISO_TestPress.HasValue ? item.ISO_TestPress.Value.ToString(("0.##")) + "MPa" : "";//耐压试验压力
newSummary.LeakageTestPressure = item.LeakageTest + "MPa";//泄漏试验压力
newSummary.CorrosionControlMethod = item.ISO_Paint;//腐蚀控制方式
newSummary.VoltageResistantTestMethod = "水压试验";//耐压试验方法
BLL.IndustrialPipelineInstallationSummaryService.AddIndustrialPipelineInstallationSummary(newSummary);
}
}
newSummary.DesignPressure = item.ISO_DesignPress.ToString();
newSummary.DesignTemperature = item.ISO_DesignTemperature.ToString();
if (!string.IsNullOrEmpty(item.SER_ID))
{
newSummary.Medium = BLL.HJGL_MediumService.GetServiceBySERID(item.SER_ID).SER_Name;
}
if (!string.IsNullOrEmpty(item.STE_ID))
{
newSummary.Material = BLL.HJGL_MaterialService.GetSteelBySteID(item.STE_ID).STE_Code;
}
var jointInfo = (from x in Funs.DB.HJGL_PW_JointInfo where x.ISO_ID == item.ISO_ID select x).FirstOrDefault();
if (jointInfo != null)
{
newSummary.Specifications = jointInfo.JOT_JointDesc;
}
newSummary.Length = item.PipeLineLength.ToString();
newSummary.WeldsNum = BLL.HJGL_PW_JointInfoService.GetJointCountByIsoId(item.ISO_ID).ToString();
if (!string.IsNullOrEmpty(item.Joty_B_Rate))
{
newSummary.LosslessRatio = HJGL_DetectionService.GetNDTRateByNDTRID(item.Joty_B_Rate).NDTR_Name;//无损检测比例
}
//newSummary.VoltageResistantTestMethod = "水压";//耐压试验方法
newSummary.VoltageResistantTestMedium = "水";//耐压试验介质
newSummary.LeakageTestMedium = "空气";//泄漏试验介质
newSummary.CleaningMethod = "压缩空气吹扫";//吹扫、清洗方法
newSummary.VoltageResistantTestPressure = item.ISO_TestPress.HasValue ? item.ISO_TestPress.Value.ToString(("0.##")) + "MPa" : "";//耐压试验压力
newSummary.LeakageTestPressure = item.LeakageTest + "MPa";//泄漏试验压力
newSummary.CorrosionControlMethod = item.ISO_Paint;//腐蚀控制方式
newSummary.VoltageResistantTestMethod = "水压试验";//耐压试验方法
BLL.IndustrialPipelineInstallationSummaryService.AddIndustrialPipelineInstallationSummary(newSummary);
}
else
{
Alert.ShowInTop("请先编辑工业管道安装质量证明书!", MessageBoxIcon.Warning);
return;
}
}
}
@ -552,6 +564,11 @@ namespace FineUIPro.Web.JGZL
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId,
Const.JGZL_IndustrialPipelineInstallationSummaryMenuId, Const.BtnSave))
{
if (string.IsNullOrEmpty(this.drpCertificateCode.SelectedValue))
{
Alert.ShowInTop("请选择质量证明书编号!", MessageBoxIcon.Warning);
return;
}
saveItem();
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());

View File

@ -4,13 +4,106 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>工艺管道试压包报审/报验申请表</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
<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="220px" Title="工艺管道试压包报审/报验申请表" ShowBorder="true" Layout="VBox"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpProjectId" runat="server" Label="项目" LabelAlign="Right" AutoPostBack="true" EnableEdit="true"
OnSelectedIndexChanged="drpProjectId_SelectedIndexChanged" LabelWidth="50px">
</f:DropDownList>
</Items>
</f:Toolbar>
</Toolbars>
<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>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="工艺管道试压包报审/报验申请表"
TitleToolTip="工艺管道试压包报审/报验申请表" AutoScroll="true">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnPrint" Text="打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
</f:Button>
<%--<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出Word" Icon="FolderUp"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>--%>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<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="txtApplicationFormCode" runat="server" Label="编号" LabelAlign="Right" LabelWidth="70px"></f:TextBox>
<f:Label ID="Label4" runat="server"></f:Label>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="3% 40% 57%">
<Items>
<f:Label ID="Label11" runat="server" Text="致"></f:Label>
<f:TextBox ID="txtSupervisionUnit" runat="server"></f:TextBox>
<f:Label ID="Label2" runat="server" Text="(监理单位)"></f:Label>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Label ID="Label3" runat="server" Text="我单位已完成了"></f:Label>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtContents" runat="server" MaxLength="500"></f:TextArea>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Label ID="Label1" runat="server" Text="工作,经自检合格,现报上该工程报验申请表,请予以审查和验收。"></f:Label>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtRemark" runat="server" Label="附" Text="试压包资料" Readonly="true"></f:TextBox>
<f:Label ID="Label5" runat="server"></f:Label>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtProfessionalEngineer" runat="server" Label="专业工程师" LabelAlign="Right"></f:TextBox>
<f:DatePicker ID="txtApplicationDate" runat="server" Label="日期" LabelAlign="Right"></f:DatePicker>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="WindowPrint" Title="打印工艺管道试压包报审/报验申请表" Hidden="true" EnableIFrame="true" EnableMaximize="false"
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1024px"
Height="600px">
</f:Window>
</form>
</body>
</html>

View File

@ -1,17 +1,313 @@
using System;
using BLL;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.SYBData
{
public partial class ApplicationForm : System.Web.UI.Page
public partial class ApplicationForm : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
private string ApplicationFormId
{
get
{
return (string)ViewState["ApplicationFormId"];
}
set
{
ViewState["ApplicationFormId"] = value;
}
}
/// <summary>
/// 项目Id
/// </summary>
private string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.drpProjectId.DataTextField = "ProjectCode";
this.drpProjectId.DataValueField = "ProjectId";
this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1");
this.drpProjectId.DataBind();
Funs.FineUIPleaseSelect(this.drpProjectId);
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
this.InitTreeMenu();//加载树
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
this.ProjectId = this.tvControlItem.SelectedNodeID;
DataInfo();
}
}
private void DataInfo()
{
this.ApplicationFormId = string.Empty;
this.txtApplicationFormCode.Text = string.Empty;
this.txtSupervisionUnit.Text = string.Empty;
this.txtContents.Text = string.Empty;
this.txtProfessionalEngineer.Text = string.Empty;
this.txtApplicationDate.Text = string.Empty;
if (!string.IsNullOrEmpty(this.ProjectId))
{
var data = BLL.ApplicationFormService.GetApplicationFormByProjectId(this.ProjectId);
if (data != null)
{
this.ApplicationFormId = data.ApplicationFormId;
this.txtApplicationFormCode.Text = data.ApplicationFormCode;
this.txtSupervisionUnit.Text = data.SupervisionUnit;
this.txtContents.Text = data.Contents;
this.txtProfessionalEngineer.Text = data.ProfessionalEngineer;
this.txtApplicationDate.Text = data.ApplicationDate.HasValue ? string.Format("{0:yyyy-MM-dd}", data.ApplicationDate) : "";
}
else
{
//默认值
//this.txtProjectName.Text = BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName;
}
}
}
#endregion
#region
/// <summary>
/// 加载树
/// </summary>
private void InitTreeMenu()
{
this.tvControlItem.Nodes.Clear();
TreeNode rootNode = new TreeNode();
rootNode.Text = "项目";
rootNode.ToolTip = "项目";
rootNode.NodeID = "0";
rootNode.Expanded = true;
this.tvControlItem.Nodes.Add(rootNode);
List<Model.Base_Project> projects = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1");
if (this.drpProjectId.SelectedValue != BLL.Const._Null)
{
projects = projects.Where(e => e.ProjectId == this.drpProjectId.SelectedValue).ToList();
}
foreach (var item in projects)
{
TreeNode rootProjectNode = new TreeNode();//定义根节点
rootProjectNode.Text = item.ProjectCode;
rootProjectNode.NodeID = item.ProjectId;
rootProjectNode.EnableClickEvent = true;
rootProjectNode.Expanded = true;
rootProjectNode.ToolTip = item.ProjectName;
rootProjectNode.CommandName = "项目名称";
rootNode.Nodes.Add(rootProjectNode);
}
}
#endregion
#region TreeView
/// <summary>
/// 点击TreeView
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
if (this.tvControlItem.SelectedNodeID != "0")
{
this.ProjectId = this.tvControlItem.SelectedNodeID;
DataInfo();
}
}
#endregion
#region
///<summary>
///查询
///</summary>
///<param name="sender"></param>
///<param name="e"></param>
protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e)
{
this.ProjectId = this.drpProjectId.SelectedValue;
this.InitTreeMenu();
this.tvControlItem.SelectedNodeID = this.ProjectId;
}
#endregion
#region
protected void btnSave_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.SYBData_ApplicationFormMenuId, Const.BtnSave))
{
Model.SYBData_ApplicationForm newData = new Model.SYBData_ApplicationForm();
newData.ProjectId = this.ProjectId;
newData.ApplicationFormCode = this.txtApplicationFormCode.Text.Trim();
newData.SupervisionUnit = this.txtSupervisionUnit.Text.Trim();
newData.Contents = this.txtContents.Text.Trim();
newData.ProfessionalEngineer = this.txtProfessionalEngineer.Text.Trim();
newData.ApplicationDate = Funs.GetNewDateTime(this.txtApplicationDate.Text);
if (!string.IsNullOrEmpty(this.ApplicationFormId))
{
newData.ApplicationFormId = this.ApplicationFormId;
BLL.ApplicationFormService.UpdateApplicationForm(newData);
ShowNotify("修改成功!", MessageBoxIcon.Success);
}
else
{
newData.ApplicationFormId = SQLHelper.GetNewID(typeof(Model.SYBData_ApplicationForm));
this.ApplicationFormId = newData.ApplicationFormId;
BLL.ApplicationFormService.AddApplicationForm(newData);
ShowNotify("保存成功!", MessageBoxIcon.Success);
}
DataInfo();
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
#endregion
#region
/// <summary>
/// 打印
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnPrint_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.ProjectId))
{
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
BLL.Common.FastReportService.ResetData();
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName);
keyValuePairs.Add("ApplicationFormCode", this.txtApplicationFormCode.Text);
keyValuePairs.Add("SupervisionUnit", this.txtSupervisionUnit.Text);
string c = this.txtContents.Text;
if (c.Length > 37)
{
string a = c.Substring(0, 37);
string b = c.Substring(37, c.Length - 37);
keyValuePairs.Add("Contents", a);
keyValuePairs.Add("Contents2", b);
}
else
{
keyValuePairs.Add("Contents", c);
}
keyValuePairs.Add("ProfessionalEngineer", this.txtProfessionalEngineer.Text);
keyValuePairs.Add("ApplicationDate", string.Format("{0:yyyy年MM月dd日}", Funs.GetNewDateTime(this.txtApplicationDate.Text)));
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
initTemplatePath = "File\\Fastreport\\SYBData\\工艺管道试压包报审报验申请表.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;
}
}
#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))
//{
// if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
// {
// initTemplatePath = Const.JGZL_CoverUrl;
// 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 code = doc.Range.Bookmarks["Code"];
// if (code != null)
// {
// code.Text = this.txtCode.Text.Trim();
// }
// Bookmark projectName = doc.Range.Bookmarks["ProjectName"];
// if (projectName != null)
// {
// projectName.Text = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName;
// }
// 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;
// }
//}
//else
//{
// Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
// return;
//}
}
#endregion
}
}

View File

@ -22,5 +22,230 @@ namespace FineUIPro.Web.SYBData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </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>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// drpProjectId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpProjectId;
/// <summary>
/// tvControlItem 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvControlItem;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnPrint 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPrint;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtApplicationFormCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtApplicationFormCode;
/// <summary>
/// Label4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label4;
/// <summary>
/// Label11 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label11;
/// <summary>
/// txtSupervisionUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSupervisionUnit;
/// <summary>
/// Label2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label2;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label3;
/// <summary>
/// txtContents 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtContents;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// txtRemark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRemark;
/// <summary>
/// Label5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label5;
/// <summary>
/// txtProfessionalEngineer 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtProfessionalEngineer;
/// <summary>
/// txtApplicationDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtApplicationDate;
/// <summary>
/// WindowPrint 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowPrint;
}
}