20260211 交工资料

This commit is contained in:
毕文静 2026-02-11 11:21:40 +08:00
parent 66c55899f1
commit bfd4192578
18 changed files with 1073 additions and 742 deletions

View File

@ -22,6 +22,16 @@ namespace BLL
return Funs.DB.JGZL_AcceptanceCertificate.FirstOrDefault(e => e.CertificateId == certificateId);
}
/// <summary>
/// 根据项目Id获取工程交工验收证书
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public static Model.JGZL_AcceptanceCertificate GetAcceptanceCertificateByProjectId(string projectId)
{
return Funs.DB.JGZL_AcceptanceCertificate.FirstOrDefault(e => e.ProjectId == projectId);
}
/// <summary>
/// 增加工程交工验收证书
/// </summary>

View File

@ -22,6 +22,16 @@ namespace BLL
return Funs.DB.JGZL_CommencementReport.FirstOrDefault(e => e.CommencementReportId == commencementReportId);
}
/// <summary>
/// 根据项目获取开工报告
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public static Model.JGZL_CommencementReport GetCommencementReportByProjectId(string projectId)
{
return Funs.DB.JGZL_CommencementReport.FirstOrDefault(e => e.ProjectId == projectId);
}
/// <summary>
/// 添加工程施工开工报告
/// </summary>

View File

@ -21,6 +21,16 @@ namespace BLL
public static Model.JGZL_HandoverCertificate GetHandoverCertificateById(string handoverCertificateId)
{
return Funs.DB.JGZL_HandoverCertificate.FirstOrDefault(e => e.HandoverCertificateId == handoverCertificateId);
}
/// <summary>
/// 根据项目Id获取工程中间交接证书
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public static Model.JGZL_HandoverCertificate GetHandoverCertificateByProjectId(string projectId)
{
return Funs.DB.JGZL_HandoverCertificate.FirstOrDefault(e => e.ProjectId == projectId);
}
/// <summary>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" TextQuality="ClearType" ReportInfo.Created="12/12/2025 11:03:02" ReportInfo.Modified="02/06/2026 16:41:20" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" TextQuality="ClearType" ReportInfo.Created="12/12/2025 11:03:02" ReportInfo.Modified="02/11/2026 10:44:54" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
@ -18,7 +18,7 @@ namespace FastReport
{
public class ReportScript
{
}
}
</ScriptText>
@ -32,8 +32,8 @@ namespace FastReport
<Parameter Name="HeaderMan" DataType="System.String"/>
<Parameter Name="SupervisoryOpinion" DataType="System.String"/>
</Dictionary>
<ReportPage Name="Page1" RawPaperSize="9" LeftMargin="22" TopMargin="13.3" RightMargin="17" BottomMargin="16.5" Guides="0,646.4,160.28,51.79,415.06,127.39,509.56,108.49,231.34,287.67,161.6,323.2,484.8">
<PageHeaderBand Name="PageHeader1" Width="646.38" Height="830.18" Guides="0,830.18,82.54,22.68,9.45,28.35,59.86,114.05,31.51,145.56,167.62,22.06,414.08,246.46,436.14,590.5,154.36,622.01,644.07,798.43,31.75">
<ReportPage Name="Page1" RawPaperSize="9" LeftMargin="22" TopMargin="13.3" RightMargin="17" BottomMargin="16.5" Guides="0,646.4,160.28,51.79,415.06,127.39,509.56,108.49,231.34,287.67,85.05,642.6,161.6,323.2,484.8">
<PageHeaderBand Name="PageHeader1" Width="646.38" Height="830.18" Guides="0,830.18,82.54,22.68,9.45,28.35,59.86,114.05,31.51,145.56,167.62,22.06,414.08,66.15,37.8,226.8,246.46,436.14,590.5,154.36,622.01,644.07,798.43,31.75">
<TableObject Name="Table1" Width="646.4" Height="830.18">
<TableColumn Name="Column1" Width="108.49"/>
<TableColumn Name="Column2" Width="51.79"/>
@ -71,14 +71,17 @@ namespace FastReport
<TableCell Name="Cell20" Border.Lines="All" Text="[EndDate]" HorzAlign="Right" VertAlign="Center" Font="楷体, 10.5pt"/>
</TableRow>
<TableRow Name="Row5" Height="22.06">
<TableCell Name="Cell21" Border.Lines="Left, Right, Top" Text="工程内容:" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="5"/>
<TableCell Name="Cell21" Border.Lines="Left, Right, Top" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="5"/>
<TableCell Name="Cell22" Border.Lines="All" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell23" Border.Lines="All" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell24" Border.Lines="All" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell25" Border.Lines="All" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableRow>
<TableRow Name="Row6" Height="246.46">
<TableCell Name="Cell26" Border.Lines="Left, Right, Bottom" Text="[ProjectContent]" Font="楷体, 10.5pt" FirstTabOffset="18.9" ColSpan="5"/>
<TableCell Name="Cell26" Border.Lines="Left, Right, Bottom" VertAlign="Center" Font="楷体, 10.5pt" FirstTabOffset="18.9" ColSpan="5">
<TextObject Name="Text2" Top="28.35" Width="85.05" Height="37.8" Text="工程内容:" VertAlign="Center" Font="宋体, 10.5pt"/>
<TextObject Name="Text3" Top="37.8" Width="642.6" Height="189" Text=" [ProjectContent]" Font="楷体, 10.5pt"/>
</TableCell>
<TableCell Name="Cell27" Border.Lines="All" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell28" Border.Lines="All" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell29" Border.Lines="All" VertAlign="Center" Font="宋体, 10.5pt"/>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/15/2025 14:30:33" ReportInfo.Modified="02/06/2026 16:55:52" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/15/2025 14:30:33" ReportInfo.Modified="02/11/2026 11:08:46" ReportInfo.CreatorVersion="2017.1.16.0">
<Dictionary>
<Parameter Name="ProjectName" DataType="System.String"/>
<Parameter Name="ContractNumber" DataType="System.String"/>
@ -16,8 +16,8 @@
<Parameter Name="OpinionsReviewer" DataType="System.String"/>
<Parameter Name="OpinionsDate" DataType="System.String"/>
</Dictionary>
<ReportPage Name="Page1" RawPaperSize="9" LeftMargin="22" TopMargin="13.3" RightMargin="17" BottomMargin="16.5" Guides="0,646.38,173.07,45.09,63.99,376.65,82.89,471.15,149.04,120.69,497.34,109.08,293.76,215.46,430.92">
<PageHeaderBand Name="PageHeader1" Width="646.38" Height="811.37" Guides="0,811.37,97.42,20.36,67.61,9.45,28.35,47.25,29.81,127.23,157.04,205.75,48.71,235.56,443.46,207.9,501.62,58.16,569.23,599.04,751.75,152.71,781.56">
<ReportPage Name="Page1" RawPaperSize="9" LeftMargin="22" TopMargin="13.3" RightMargin="17" BottomMargin="16.5" Guides="0,646.38,173.07,45.09,63.99,376.65,82.89,471.15,149.04,120.69,497.34,109.08,293.76,56.7,642.6,215.46,430.92">
<PageHeaderBand Name="PageHeader1" Width="646.38" Height="811.37" Guides="0,811.37,97.42,20.36,67.61,9.45,28.35,47.25,29.81,127.23,186.85,56.7,157.04,424.56,37.8,226.8,216.66,207.9,482.72,58.16,550.33,580.14,751.75,171.61,781.56">
<TableObject Name="Table1" Width="646.38" Height="811.37">
<TableColumn Name="Column1" Width="63.99"/>
<TableColumn Name="Column2" Width="45.09"/>
@ -65,16 +65,19 @@
<TableCell Name="Cell31" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableRow>
<TableRow Name="Row4" Height="29.81">
<TableCell Name="Cell16" Border.Lines="Left, Top" Text="事由:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell17" Border.Lines="Right, Top" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="6"/>
<TableCell Name="Cell16" Border.Lines="Left, Right, Top" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="7" RowSpan="2">
<TextObject Name="Text2" Top="9.45" Width="56.7" Height="18.9" Text="事由:" Font="宋体, 10.5pt"/>
<TextObject Name="Text3" Top="9.45" Width="642.6" Height="47.25" Text=" [SubjectMatter]" Font="楷体, 10.5pt"/>
</TableCell>
<TableCell Name="Cell17" Border.Lines="Right, Top" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell18" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell19" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell20" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell32" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell33" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableRow>
<TableRow Name="Row5" Height="48.71">
<TableCell Name="Cell21" Border.Lines="Left, Right" Text="[SubjectMatter]" Font="楷体, 10.5pt" ColSpan="7"/>
<TableRow Name="Row5" Height="29.81">
<TableCell Name="Cell21" Border.Lines="Left, Right" Font="楷体, 10.5pt"/>
<TableCell Name="Cell22" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell23" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell24" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
@ -83,8 +86,11 @@
<TableCell Name="Cell35" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableRow>
<TableRow Name="Row6" Height="29.81">
<TableCell Name="Cell36" Border.Lines="Left" Text="内容:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell37" Border.Lines="Right" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="6"/>
<TableCell Name="Cell36" Border.Lines="Left, Right" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="7" RowSpan="2">
<TextObject Name="Text4" Top="9.45" Width="56.7" Height="28.35" Text="内容:" Font="宋体, 10.5pt"/>
<TextObject Name="Text5" Top="9.45" Width="642.6" Height="217.35" Text=" [Contents]" Font="楷体, 10.5pt"/>
</TableCell>
<TableCell Name="Cell37" Border.Lines="Right" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell38" Border.Lines="Left, Right" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell39" Border.Lines="Left, Right" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell40" Border.Lines="Left, Right" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
@ -92,7 +98,7 @@
<TableCell Name="Cell42" Border.Lines="Left, Right" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableRow>
<TableRow Name="Row7" Height="207.9">
<TableCell Name="Cell43" Border.Lines="Left, Right" Text="[Contents]" Font="楷体, 10.5pt" ColSpan="7"/>
<TableCell Name="Cell43" Border.Lines="Left, Right" Font="楷体, 10.5pt"/>
<TableCell Name="Cell44" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell45" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell46" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
@ -101,8 +107,8 @@
<TableCell Name="Cell49" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableRow>
<TableRow Name="Row8" Height="58.16">
<TableCell Name="Cell50" Border.Lines="Left" Text="经办人:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="2"/>
<TableCell Name="Cell51" Border.Lines="Left, Right" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell50" Border.Lines="Left" Text="经办人:" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="2"/>
<TableCell Name="Cell51" Border.Lines="Left, Right" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell52" Text="[Handler]" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/>
<TableCell Name="Cell53" Border.Lines="Left, Right" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell54" Border.Lines="Right" Text="[HandDate]" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="3"/>
@ -110,8 +116,8 @@
<TableCell Name="Cell56" Border.Lines="Left, Right" VertAlign="Center" Font="楷体, 10.5pt"/>
</TableRow>
<TableRow Name="Row9" Height="67.61">
<TableCell Name="Cell57" Border.Lines="Left, Bottom" Text="审核人:" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="2"/>
<TableCell Name="Cell58" Border.Lines="Left, Right, Bottom" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell57" Border.Lines="Left, Bottom" Text="审核人:" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="2"/>
<TableCell Name="Cell58" Border.Lines="Left, Right, Bottom" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell59" Border.Lines="Bottom" Text="[Reviewer]" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/>
<TableCell Name="Cell60" Border.Lines="Left, Right, Bottom" VertAlign="Center" Font="楷体, 10.5pt"/>
<TableCell Name="Cell61" Border.Lines="Right, Bottom" Text="[ReviewDate]" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="3"/>
@ -127,7 +133,7 @@
<TableCell Name="Cell69" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell70" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableRow>
<TableRow Name="Row11" Height="152.71">
<TableRow Name="Row11" Height="171.61">
<TableCell Name="Cell71" Border.Lines="Left, Right" Text="[HandlingOpinion]" Font="楷体, 10.5pt" ColSpan="7"/>
<TableCell Name="Cell72" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell73" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>

View File

@ -39,14 +39,54 @@
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</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>
</Items>
</f:Toolbar>
</Toolbars>
<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="txtContractNumber" runat="server" Label="施工合同编号" LabelAlign="Right" LabelWidth="110px" MaxLength="100" Required="true" ShowRedStar="true"></f:TextBox>
<f:Label ID="Label1" runat="server"></f:Label>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DatePicker ID="txtStartDate" runat="server" Label="实际开工日期" LabelAlign="Right" LabelWidth="110px"></f:DatePicker>
<f:DatePicker ID="txtEndDate" runat="server" Label="交工日期" LabelAlign="Right" LabelWidth="110px"></f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtProjectContent" runat="server" Label="工程内容" LabelAlign="Right" LabelWidth="110px" MaxLength="2000" Required="true" ShowRedStar="true"></f:TextArea>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtAcceptanceOpinion" runat="server" Label="工程验收意见" LabelAlign="Right" LabelWidth="110px" MaxLength="1000"></f:TextArea>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtHeaderMan" runat="server" Label="使用单位负责(代表)人" LabelAlign="Right" LabelWidth="110px" MaxLength="50"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtSupervisoryOpinion" runat="server" Label="工程质量监督意见" LabelAlign="Right" LabelWidth="110px" MaxLength="1000"></f:TextArea>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<%--<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="工程交工验收证书" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="CertificateId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="CertificateId" AllowSorting="true"
SortField="ContractNumber" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
@ -84,35 +124,35 @@
<f:ListItem Text="25" Value="25" />
</f:DropDownList>
</PageItems>
</f:Grid>
</f:Grid>--%>
</Items>
</f:Panel>
</Items>
</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"
Width="1100px" Height="620px">
</f:Window>
</f:Window>--%>
<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>
<f:Menu ID="Menu1" runat="server">
<%--<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Icon="TableEdit">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="Delete">
</f:MenuButton>
</f:Menu>
</f:Menu>--%>
</form>
<script type="text/javascript">
<%--<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
</script>
</script>--%>
</body>
</html>

View File

@ -13,6 +13,23 @@ namespace FineUIPro.Web.JGZL
{
public partial class AcceptanceCertificate : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
private string CertificateId
{
get
{
return (string)ViewState["CertificateId"];
}
set
{
ViewState["CertificateId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -23,7 +40,7 @@ namespace FineUIPro.Web.JGZL
{
if (!IsPostBack)
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
//this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.drpProjectId.DataTextField = "ProjectCode";
this.drpProjectId.DataValueField = "ProjectId";
@ -34,11 +51,62 @@ namespace FineUIPro.Web.JGZL
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
this.InitTreeMenu();//加载树
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
this.BindGrid();
//this.BindGrid();
PageData();
}
}
#endregion
private void PageData()
{
EmptyText();
string projectId = this.tvControlItem.SelectedNodeID;
if (!string.IsNullOrEmpty(projectId))
{
this.txtContractNumber.Text = BLL.Base_ProjectService.GetProjectCode(projectId);
var project = BLL.Base_ProjectService.GetProjectByProjectId(projectId);
var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(projectId);
var jointCount = (from x in Funs.DB.HJGL_PW_JointInfo where x.ProjectId == projectId select x).Count();
var report = BLL.AcceptanceCertificateService.GetAcceptanceCertificateByProjectId(projectId);
if (report != null)
{
this.CertificateId = report.CertificateId;
this.txtContractNumber.Text = report.ContractNumber;
this.txtStartDate.Text = report.StartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.StartDate) : "";
this.txtEndDate.Text = report.EndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.EndDate) : "";
if (!string.IsNullOrEmpty(report.ProjectContent))
{
this.txtProjectContent.Text = report.ProjectContent;
}
else
{
this.txtProjectContent.Text = "本次" + project.ProjectName + "于" + string.Format("{0:yyyy年MM月dd日}", project.StartDate) + "开工,到" + string.Format("{0:yyyy年MM月dd日}", project.EndDate) + "施工结束。该项目共计安装管道" + isoInfo.Count + "条,管道焊缝共计" + jointCount + "道,已按图纸要求的比例进行焊缝无损检测,检测结果均符合设计规定的合格等级。该项目配套的各类管道组成件、支撑件安装质量均满足设计文件以及标准规范要求。目前,管道系统已完成水压试验及压缩空气吹扫工序,试验压力降、管道洁净度等关键指标均符合标准规范的规定标准并已通过业主方验收。";
}
this.txtAcceptanceOpinion.Text = report.AcceptanceOpinion;
this.txtHeaderMan.Text = report.HeaderMan;
this.txtSupervisoryOpinion.Text = report.SupervisoryOpinion;
}
else
{
this.CertificateId = string.Empty;
this.txtProjectContent.Text = "本次" + project.ProjectName + "于" + string.Format("{0:yyyy年MM月dd日}", project.StartDate) + "开工,到" + string.Format("{0:yyyy年MM月dd日}", project.EndDate) + "施工结束。该项目共计安装管道" + isoInfo.Count + "条,管道焊缝共计" + jointCount + "道,已按图纸要求的比例进行焊缝无损检测,检测结果均符合设计规定的合格等级。该项目配套的各类管道组成件、支撑件安装质量均满足设计文件以及标准规范要求。目前,管道系统已完成水压试验及压缩空气吹扫工序,试验压力降、管道洁净度等关键指标均符合标准规范的规定标准并已通过业主方验收。";
}
}
}
private void EmptyText()
{
txtContractNumber.Text = string.Empty;
txtStartDate.Text = string.Empty;
txtEndDate.Text = string.Empty;
txtProjectContent.Text = string.Empty;
txtAcceptanceOpinion.Text = string.Empty;
txtHeaderMan.Text = string.Empty;
txtSupervisoryOpinion.Text = string.Empty;
}
#region
/// <summary>
/// 加载树
@ -82,7 +150,8 @@ namespace FineUIPro.Web.JGZL
{
if (this.tvControlItem.SelectedNodeID != "0")
{
this.BindGrid();
//this.BindGrid();
PageData();
}
}
#endregion
@ -91,30 +160,30 @@ namespace FineUIPro.Web.JGZL
/// <summary>
/// 数据绑定
/// </summary>
private void BindGrid()
{
//string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1");
string strSql = @"SELECT * from JGZL_AcceptanceCertificate where 1=1";
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
strSql += " AND ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
}
//else
//{
// strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 ";
// listStr.Add(new SqlParameter("@ProjectId", projectIds));
//}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
Grid1.RecordCount = tb.Rows.Count;
//tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
//private void BindGrid()
//{
// //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1");
// string strSql = @"SELECT * from JGZL_AcceptanceCertificate where 1=1";
// List<SqlParameter> listStr = new List<SqlParameter>();
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
// {
// strSql += " AND ProjectId = @ProjectId";
// listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
// }
// //else
// //{
// // strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 ";
// // listStr.Add(new SqlParameter("@ProjectId", projectIds));
// //}
// SqlParameter[] parameter = listStr.ToArray();
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// // 2.获取当前分页数据
// Grid1.RecordCount = tb.Rows.Count;
// //tb = GetFilteredTable(Grid1.FilteredData, tb);
// var table = this.GetPagedDataTable(Grid1, tb);
// Grid1.DataSource = table;
// Grid1.DataBind();
//}
#endregion
#region
@ -124,10 +193,10 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
//protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
//{
// BindGrid();
//}
#endregion
#region
@ -136,10 +205,10 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
}
//protected void Grid1_Sort(object sender, GridSortEventArgs e)
//{
// BindGrid();
//}
#endregion
#region
@ -148,11 +217,11 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
//protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
//{
// Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
// BindGrid();
//}
#endregion
#endregion
@ -166,7 +235,8 @@ namespace FineUIPro.Web.JGZL
{
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
this.InitTreeMenu();
BindGrid();
//BindGrid();
PageData();
}
/// <summary>
@ -174,10 +244,10 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
//protected void TextBox_TextChanged(object sender, EventArgs e)
//{
// this.BindGrid();
//}
#endregion
#region
@ -189,29 +259,26 @@ namespace FineUIPro.Web.JGZL
protected void btnPrint_Click(object sender, EventArgs e)
{
string projectId = this.tvControlItem.SelectedNodeID;
if (projectId != null)
{
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
{
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
BLL.Common.FastReportService.ResetData();
var report = BLL.AcceptanceCertificateService.GetAcceptanceCertificateById(this.Grid1.SelectedRowID);
if (report != null)
{
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
keyValuePairs.Add("ContractNumber", report.ContractNumber);
keyValuePairs.Add("StartDate", report.StartDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.StartDate) : "");
keyValuePairs.Add("EndDate", report.EndDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.EndDate) : "");
keyValuePairs.Add("ProjectContent", report.ProjectContent);
keyValuePairs.Add("AcceptanceOpinion", report.AcceptanceOpinion);
keyValuePairs.Add("HeaderMan", report.HeaderMan);
keyValuePairs.Add("SupervisoryOpinion", report.SupervisoryOpinion);
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
}
var report = BLL.AcceptanceCertificateService.GetAcceptanceCertificateByProjectId(projectId);
if (report != null)
{
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
keyValuePairs.Add("ContractNumber", report.ContractNumber);
keyValuePairs.Add("StartDate", report.StartDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.StartDate) : "");
keyValuePairs.Add("EndDate", report.EndDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.EndDate) : "");
keyValuePairs.Add("ProjectContent", report.ProjectContent);
keyValuePairs.Add("AcceptanceOpinion", report.AcceptanceOpinion);
keyValuePairs.Add("HeaderMan", report.HeaderMan);
keyValuePairs.Add("SupervisoryOpinion", report.SupervisoryOpinion);
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
initTemplatePath = "File\\Fastreport\\JGZL\\工程交工验收证书.frx";
if (File.Exists(rootPath + initTemplatePath))
{
@ -220,7 +287,7 @@ namespace FineUIPro.Web.JGZL
}
else
{
Alert.ShowInTop("请选择一条记录", MessageBoxIcon.Warning);
Alert.ShowInTop("请先保存数据", MessageBoxIcon.Warning);
return;
}
}
@ -238,140 +305,141 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAdd_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AcceptanceCertificateEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - ")));
}
else
{
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return;
}
}
//protected void btnAdd_Click(object sender, EventArgs e)
//{
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
// {
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AcceptanceCertificateEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - ")));
// }
// else
// {
// Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
// return;
// }
//}
/// <summary>
/// 双击编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_AcceptanceCertificateMenuId, BLL.Const.BtnModify))
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AcceptanceCertificateEdit.aspx?certificateId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
}
else
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
}
else
{
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return;
}
}
else
{
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
//protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
//{
// if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_AcceptanceCertificateMenuId, BLL.Const.BtnModify))
// {
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
// {
// if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
// {
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AcceptanceCertificateEdit.aspx?certificateId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
// }
// else
// {
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
// return;
// }
// }
// else
// {
// Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
// return;
// }
// }
// else
// {
// ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
// }
//}
/// <summary>
/// 右键编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_AcceptanceCertificateMenuId, BLL.Const.BtnModify))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AcceptanceCertificateEdit.aspx?certificateId={0}", Grid1.SelectedRowID, "维护 - ")));
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
//protected void btnMenuEdit_Click(object sender, EventArgs e)
//{
// if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_AcceptanceCertificateMenuId, BLL.Const.BtnModify))
// {
// if (Grid1.SelectedRowIndexArray.Length == 0)
// {
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
// return;
// }
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AcceptanceCertificateEdit.aspx?certificateId={0}", Grid1.SelectedRowID, "维护 - ")));
// }
// else
// {
// Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
// }
//}
/// <summary>
/// 右键删除
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_AcceptanceCertificateMenuId, Const.BtnDelete))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
//protected void btnMenuDelete_Click(object sender, EventArgs e)
//{
// if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_AcceptanceCertificateMenuId, Const.BtnDelete))
// {
// if (Grid1.SelectedRowIndexArray.Length == 0)
// {
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
// return;
// }
bool isShow = true;
if (Grid1.SelectedRowIndexArray.Length > 1)
{
isShow = false;
}
bool isDelete = false;
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
if (judgementDelete(rowID, isShow))
{
isDelete = true;
BLL.AcceptanceCertificateService.DeleteAcceptanceCertificateById(rowID);
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除工程交工验收证书");
}
}
if (isDelete)
{
ShowNotify("删除成功!", MessageBoxIcon.Success);
}
this.BindGrid();
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
// bool isShow = true;
// if (Grid1.SelectedRowIndexArray.Length > 1)
// {
// isShow = false;
// }
// bool isDelete = false;
// foreach (int rowIndex in Grid1.SelectedRowIndexArray)
// {
// string rowID = Grid1.DataKeys[rowIndex][0].ToString();
// if (judgementDelete(rowID, isShow))
// {
// isDelete = true;
// BLL.AcceptanceCertificateService.DeleteAcceptanceCertificateById(rowID);
// BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除工程交工验收证书");
// }
// }
// if (isDelete)
// {
// ShowNotify("删除成功!", MessageBoxIcon.Success);
// }
// this.BindGrid();
// }
// else
// {
// Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
// }
//}
#region
/// <summary>
/// 判断是否可以删除
/// </summary>
/// <returns></returns>
private bool judgementDelete(string id, bool isShow)
{
string content = string.Empty;
//private bool judgementDelete(string id, bool isShow)
//{
// string content = string.Empty;
if (string.IsNullOrEmpty(content))
{
return true;
}
else
{
if (isShow)
{
Alert.ShowInTop(content, MessageBoxIcon.Error);
}
return false;
}
}
// if (string.IsNullOrEmpty(content))
// {
// return true;
// }
// else
// {
// if (isShow)
// {
// Alert.ShowInTop(content, MessageBoxIcon.Error);
// }
// return false;
// }
//}
#endregion
#endregion
#region
@ -380,10 +448,51 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></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
protected void btnSave_Click(object sender, EventArgs e)
{
this.InitTreeMenu();//加载树
this.BindGrid();
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_AcceptanceCertificateMenuId, Const.BtnSave))
{
Model.JGZL_AcceptanceCertificate newReport = new Model.JGZL_AcceptanceCertificate();
newReport.ContractNumber = this.txtContractNumber.Text.Trim();
newReport.StartDate = Funs.GetNewDateTime(this.txtStartDate.Text);
newReport.EndDate = Funs.GetNewDateTime(this.txtEndDate.Text);
newReport.ProjectContent = this.txtProjectContent.Text;
newReport.AcceptanceOpinion = this.txtAcceptanceOpinion.Text;
newReport.HeaderMan = this.txtHeaderMan.Text;
newReport.SupervisoryOpinion = this.txtSupervisoryOpinion.Text;
if (!string.IsNullOrEmpty(this.CertificateId))
{
newReport.CertificateId = this.CertificateId;
BLL.AcceptanceCertificateService.UpdateAcceptanceCertificate(newReport);
ShowNotify("修改成功!", MessageBoxIcon.Success);
}
else
{
newReport.ProjectId = this.tvControlItem.SelectedNodeID;
newReport.CompileMan = this.CurrUser.UserId;
newReport.CompileDate = DateTime.Now;
newReport.CertificateId = SQLHelper.GetNewID(typeof(Model.JGZL_AcceptanceCertificate));
this.CertificateId = newReport.CertificateId;
BLL.AcceptanceCertificateService.AddAcceptanceCertificate(newReport);
ShowNotify("保存成功!", MessageBoxIcon.Success);
}
PageData();
//PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
#endregion
}

View File

@ -105,13 +105,13 @@ namespace FineUIPro.Web.JGZL
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnAdd 控件。
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAdd;
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnPrint 控件。
@ -123,49 +123,85 @@ namespace FineUIPro.Web.JGZL
protected global::FineUIPro.Button btnPrint;
/// <summary>
/// Grid1 控件。
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// ToolbarSeparator1 控件。
/// txtContractNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
protected global::FineUIPro.TextBox txtContractNumber;
/// <summary>
/// ToolbarText1 控件。
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
protected global::FineUIPro.Label Label1;
/// <summary>
/// ddlPageSize 控件。
/// txtStartDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
protected global::FineUIPro.DatePicker txtStartDate;
/// <summary>
/// Window1 控件。
/// txtEndDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
protected global::FineUIPro.DatePicker txtEndDate;
/// <summary>
/// txtProjectContent 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtProjectContent;
/// <summary>
/// txtAcceptanceOpinion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtAcceptanceOpinion;
/// <summary>
/// txtHeaderMan 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtHeaderMan;
/// <summary>
/// txtSupervisoryOpinion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtSupervisoryOpinion;
/// <summary>
/// WindowPrint 控件。
@ -175,32 +211,5 @@ namespace FineUIPro.Web.JGZL
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
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;
}
}

View File

@ -39,14 +39,54 @@
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</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>
</Items>
</f:Toolbar>
</Toolbars>
<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="txtContractNumber" runat="server" Label="施工合同编号" LabelAlign="Right" LabelWidth="110px" MaxLength="100" Required="true" ShowRedStar="true"></f:TextBox>
<f:TextBox ID="txtDesignUnit" runat="server" Label="设计单位" LabelAlign="Right" LabelWidth="110px" MaxLength="50" ></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DatePicker ID="txtPlannedStartDate" runat="server" Label="计划开工日期" LabelAlign="Right" LabelWidth="110px"></f:DatePicker>
<f:DatePicker ID="txtPlannedEndDate" runat="server" Label="计划交工日期" LabelAlign="Right" LabelWidth="110px"></f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtProjectContent" runat="server" Label="工程内容" LabelAlign="Right" LabelWidth="110px" MaxLength="2000" Required="true" ShowRedStar="true"></f:TextArea>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtConditions" runat="server" Label="开工条件" LabelAlign="Right" LabelWidth="110px" MaxLength="1000"></f:TextArea>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtReviewOpinion" runat="server" Label="审查意见" LabelAlign="Right" LabelWidth="110px" MaxLength="1000"></f:TextArea>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtQualitySupervisionOpinion" runat="server" Label="质量监督意见" LabelAlign="Right" LabelWidth="110px" MaxLength="1000"></f:TextArea>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<%--<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="工程施工开工报告" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="CommencementReportId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="CommencementReportId" AllowSorting="true"
SortField="ContractNumber" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
@ -90,35 +130,35 @@
<f:ListItem Text="25" Value="25" />
</f:DropDownList>
</PageItems>
</f:Grid>
</f:Grid>--%>
</Items>
</f:Panel>
</Items>
</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"
Width="1100px" Height="620px">
</f:Window>
</f:Window>--%>
<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>
<f:Menu ID="Menu1" runat="server">
<%--<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Icon="TableEdit">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="Delete">
</f:MenuButton>
</f:Menu>
</f:Menu>--%>
</form>
<script type="text/javascript">
<%--<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
</script>
</script>--%>
</body>
</html>

View File

@ -15,6 +15,38 @@ namespace FineUIPro.Web.JGZL
{
public partial class CommencementReport : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
private string CommencementReportId
{
get
{
return (string)ViewState["CommencementReportId"];
}
set
{
ViewState["CommencementReportId"] = value;
}
}
/// <summary>
/// 项目Id
/// </summary>
private string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -25,7 +57,7 @@ namespace FineUIPro.Web.JGZL
{
if (!IsPostBack)
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
//this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.drpProjectId.DataTextField = "ProjectCode";
this.drpProjectId.DataValueField = "ProjectId";
@ -36,11 +68,88 @@ namespace FineUIPro.Web.JGZL
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
this.InitTreeMenu();//加载树
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
this.BindGrid();
this.ProjectId = this.tvControlItem.SelectedNodeID;
//this.BindGrid();
PageData();
}
}
#endregion
private void EmptyText()
{
txtContractNumber.Text = string.Empty;
txtDesignUnit.Text = string.Empty;
txtPlannedStartDate.Text = string.Empty;
txtPlannedEndDate.Text = string.Empty;
txtProjectContent.Text = string.Empty;
txtConditions.Text = string.Empty;
txtReviewOpinion.Text = string.Empty;
txtQualitySupervisionOpinion.Text = string.Empty;
}
private void PageData()
{
EmptyText();
//string projectId = this.tvControlItem.SelectedNodeID;
if (!string.IsNullOrEmpty(this.ProjectId))
{
string pipeLineClass = string.Empty;
List<string> pipeLineClassLists = new List<string>();
var isoInfos = (from x in Funs.DB.HJGL_PW_IsoInfo where x.ProjectId == this.ProjectId select x).ToList();
foreach (var item in isoInfos)
{
if (!string.IsNullOrEmpty(item.PipeLineClass) && item.PipeLineClass != "/")
{
pipeLineClassLists.Add(item.PipeLineClass);
}
}
foreach (var item in pipeLineClassLists.Distinct())
{
pipeLineClass += item + "、";
}
if (!string.IsNullOrEmpty(pipeLineClass))
{
pipeLineClass = pipeLineClass.Substring(0, pipeLineClass.LastIndexOf('、'));
}
double SumSize = Convert.ToDouble((from x in Funs.DB.HJGL_PW_JointInfo where x.ProjectId == this.ProjectId select x.JOT_Size).Sum());
var report = BLL.CommencementReportService.GetCommencementReportByProjectId(this.ProjectId);
if (report != null)
{
this.CommencementReportId = report.CommencementReportId;
if (!string.IsNullOrEmpty(report.ContractNumber))
{
this.txtContractNumber.Text = report.ContractNumber;
}
this.txtDesignUnit.Text = report.DesignUnit;
this.txtPlannedStartDate.Text = report.PlannedStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.PlannedStartDate) : "";
this.txtPlannedEndDate.Text = report.PlannedEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.PlannedEndDate) : "";
if (!string.IsNullOrEmpty(report.Conditions))
{
this.txtConditions.Text = report.Conditions;
}
else
{
this.txtConditions.Text = "1、施工方案已经审批:\r\n2、压力管道告知已经办理:\r\n3、材料已经到货并报验合格:\r\n4、人员已经进行技术安全交底:\r\n5、现场已经施工具备开工条件。";
}
if (!string.IsNullOrEmpty(report.ProjectContent))
{
this.txtProjectContent.Text = report.ProjectContent;
}
this.txtReviewOpinion.Text = report.ReviewOpinion;
this.txtQualitySupervisionOpinion.Text = report.QualitySupervisionOpinion;
}
else
{
this.CommencementReportId = string.Empty;
this.txtContractNumber.Text = BLL.Base_ProjectService.GetProjectCode(this.ProjectId);
this.txtProjectContent.Text = BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId).ProjectName + ",管道类别为" + pipeLineClass + "级,共计安装压力管道" + isoInfos.Count.ToString() + "条,总吋径量" + SumSize.ToString(".00") + "吋,该项目已经达到开工条件。";
this.txtConditions.Text = "1、施工方案已经审批:\r\n2、压力管道告知已经办理:\r\n3、材料已经到货并报验合格:\r\n4、人员已经进行技术安全交底:\r\n5、现场已经施工具备开工条件。";
}
}
}
#region
/// <summary>
/// 加载树
@ -84,79 +193,11 @@ namespace FineUIPro.Web.JGZL
{
if (this.tvControlItem.SelectedNodeID != "0")
{
this.BindGrid();
this.ProjectId = this.tvControlItem.SelectedNodeID;
PageData();
}
}
#endregion
#region
/// <summary>
/// 数据绑定
/// </summary>
private void BindGrid()
{
//string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1");
string strSql = @"SELECT * from JGZL_CommencementReport where 1=1";
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
strSql += " AND ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
}
//else
//{
// strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 ";
// listStr.Add(new SqlParameter("@ProjectId", projectIds));
//}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
Grid1.RecordCount = tb.Rows.Count;
//tb = GetFilteredTable(Grid1.FilteredData, tb);
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
#endregion
#region
///<summary>
@ -167,18 +208,9 @@ namespace FineUIPro.Web.JGZL
protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e)
{
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
this.ProjectId = this.tvControlItem.SelectedNodeID;
this.InitTreeMenu();
BindGrid();
}
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
PageData();
}
#endregion
@ -191,30 +223,27 @@ namespace FineUIPro.Web.JGZL
protected void btnPrint_Click(object sender, EventArgs e)
{
string projectId = this.tvControlItem.SelectedNodeID;
if (projectId != null)
{
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
{
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
BLL.Common.FastReportService.ResetData();
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
BLL.Common.FastReportService.ResetData();
var report = BLL.CommencementReportService.GetCommencementReportByProjectId(projectId);
if (report != null)
{
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
keyValuePairs.Add("ContractNumber", report.ContractNumber);
keyValuePairs.Add("DesignUnit", report.DesignUnit);
keyValuePairs.Add("PlannedStartDate", report.PlannedStartDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.PlannedStartDate) : "");
keyValuePairs.Add("PlannedEndDate", report.PlannedEndDate.HasValue ? string.Format("{0:yyyy年MM月dd日}", report.PlannedEndDate) : "");
keyValuePairs.Add("ProjectContent", report.ProjectContent);
keyValuePairs.Add("Conditions", report.Conditions);
keyValuePairs.Add("ReviewOpinion", report.ReviewOpinion);
keyValuePairs.Add("QualitySupervisionOpinion", report.QualitySupervisionOpinion);
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
var report = BLL.CommencementReportService.GetCommencementReportById(this.Grid1.SelectedRowID);
if (report != null)
{
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
keyValuePairs.Add("ContractNumber", report.ContractNumber);
keyValuePairs.Add("DesignUnit", report.DesignUnit);
keyValuePairs.Add("PlannedStartDate", report.PlannedStartDate.HasValue ? string.Format("{0:yyyy年MM月dd日}",report.PlannedStartDate) : "");
keyValuePairs.Add("PlannedEndDate", report.PlannedEndDate.HasValue ? string.Format("{0:yyyy年MM月dd日}",report.PlannedEndDate) : "");
keyValuePairs.Add("ProjectContent", report.ProjectContent);
keyValuePairs.Add("Conditions", report.Conditions);
keyValuePairs.Add("ReviewOpinion", report.ReviewOpinion);
keyValuePairs.Add("QualitySupervisionOpinion", report.QualitySupervisionOpinion);
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
}
initTemplatePath = "File\\Fastreport\\JGZL\\工程施工开工报告.frx";
if (File.Exists(rootPath + initTemplatePath))
{
@ -223,8 +252,7 @@ namespace FineUIPro.Web.JGZL
}
else
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
Alert.ShowInTop("请先保存数据!", MessageBoxIcon.Warning);
}
}
else
@ -235,159 +263,49 @@ namespace FineUIPro.Web.JGZL
}
#endregion
#region
#region
/// <summary>
/// 增加
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAdd_Click(object sender, EventArgs e)
protected void btnSave_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_CommencementReportMenuId, Const.BtnSave))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CommencementReportEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - ")));
}
else
{
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return;
}
}
/// <summary>
/// 双击编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_CommencementReportMenuId, BLL.Const.BtnModify))
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
Model.JGZL_CommencementReport newReport = new Model.JGZL_CommencementReport();
newReport.ContractNumber = this.txtContractNumber.Text.Trim();
newReport.DesignUnit = this.txtDesignUnit.Text.Trim();
newReport.PlannedStartDate = Funs.GetNewDateTime(this.txtPlannedStartDate.Text);
newReport.PlannedEndDate = Funs.GetNewDateTime(this.txtPlannedEndDate.Text);
newReport.ProjectContent = this.txtProjectContent.Text;
newReport.Conditions = this.txtConditions.Text;
newReport.ReviewOpinion = this.txtReviewOpinion.Text;
newReport.QualitySupervisionOpinion = this.txtQualitySupervisionOpinion.Text;
if (!string.IsNullOrEmpty(this.CommencementReportId))
{
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CommencementReportEdit.aspx?commencementReportId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
}
else
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
newReport.CommencementReportId = this.CommencementReportId;
BLL.CommencementReportService.UpdateCommencementReport(newReport);
ShowNotify("修改成功!", MessageBoxIcon.Success);
}
else
{
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return;
newReport.ProjectId = this.ProjectId;
newReport.CompileMan = this.CurrUser.UserId;
newReport.CompileDate = DateTime.Now;
newReport.CommencementReportId = SQLHelper.GetNewID(typeof(Model.JGZL_CommencementReport));
this.CommencementReportId = newReport.CommencementReportId;
BLL.CommencementReportService.AddCommencementReport(newReport);
ShowNotify("保存成功!", MessageBoxIcon.Success);
}
}
else
{
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
/// <summary>
/// 右键编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_CommencementReportMenuId, BLL.Const.BtnModify))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CommencementReportEdit.aspx?commencementReportId={0}", Grid1.SelectedRowID, "维护 - ")));
PageData();
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
/// <summary>
/// 右键删除
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_CommencementReportMenuId, Const.BtnDelete))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
bool isShow = true;
if (Grid1.SelectedRowIndexArray.Length > 1)
{
isShow = false;
}
bool isDelete = false;
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
if (judgementDelete(rowID, isShow))
{
isDelete = true;
BLL.CommencementReportService.DeleteCommencementReportById(rowID);
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除工程施工开工报告");
}
}
if (isDelete)
{
ShowNotify("删除成功!", MessageBoxIcon.Success);
}
this.BindGrid();
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
#region
/// <summary>
/// 判断是否可以删除
/// </summary>
/// <returns></returns>
private bool judgementDelete(string id, bool isShow)
{
string content = string.Empty;
if (string.IsNullOrEmpty(content))
{
return true;
}
else
{
if (isShow)
{
Alert.ShowInTop(content, MessageBoxIcon.Error);
}
return false;
}
}
#endregion
#endregion
#region
/// <summary>
/// 关闭弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
this.InitTreeMenu();//加载树
this.BindGrid();
}
#endregion
}
}

View File

@ -105,13 +105,13 @@ namespace FineUIPro.Web.JGZL
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnAdd 控件。
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAdd;
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnPrint 控件。
@ -123,49 +123,85 @@ namespace FineUIPro.Web.JGZL
protected global::FineUIPro.Button btnPrint;
/// <summary>
/// Grid1 控件。
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// ToolbarSeparator1 控件。
/// txtContractNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
protected global::FineUIPro.TextBox txtContractNumber;
/// <summary>
/// ToolbarText1 控件。
/// txtDesignUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
protected global::FineUIPro.TextBox txtDesignUnit;
/// <summary>
/// ddlPageSize 控件。
/// txtPlannedStartDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
protected global::FineUIPro.DatePicker txtPlannedStartDate;
/// <summary>
/// Window1 控件。
/// txtPlannedEndDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
protected global::FineUIPro.DatePicker txtPlannedEndDate;
/// <summary>
/// txtProjectContent 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtProjectContent;
/// <summary>
/// txtConditions 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtConditions;
/// <summary>
/// txtReviewOpinion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtReviewOpinion;
/// <summary>
/// txtQualitySupervisionOpinion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtQualitySupervisionOpinion;
/// <summary>
/// WindowPrint 控件。
@ -175,32 +211,5 @@ namespace FineUIPro.Web.JGZL
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
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;
}
}

View File

@ -190,6 +190,7 @@ namespace FineUIPro.Web.JGZL
}
else
{
this.DocumentDescriptionId = string.Empty;
this.txtCompilationBasis.Text = "1、《石油化工建设工程项目交工技术文件规定》(SH/T3503-2017)\r\n2、《国家重大建设项目文件归档要求与档案管理规范》(DA/T28-2018)\r\n3、《石油化工建设工程项目过程技术文件规定》(SH/T3543-2017)";
this.txtConstructionUnit.Text = "浙江石油化工有限公司";
this.txtConstructionCompany.Text = "浙江鼎盛石化工程有限公司";

View File

@ -39,14 +39,48 @@
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</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>
</Items>
</f:Toolbar>
</Toolbars>
<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="txtContractNumber" runat="server" Label="施工合同编号" LabelAlign="Right" LabelWidth="110px" MaxLength="100" Required="true" ShowRedStar="true"></f:TextBox>
<f:DatePicker ID="txtHandoverDate" runat="server" Label="交接日期" LabelAlign="Right" LabelWidth="110px"></f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtProjectContent" runat="server" Label="工程内容" LabelAlign="Right" LabelWidth="110px" MaxLength="2000" Required="true" ShowRedStar="true"></f:TextArea>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtReceiveOpinions" runat="server" Label="接收意见" LabelAlign="Right" LabelWidth="110px" MaxLength="1000"></f:TextArea>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtHeaderMan" runat="server" Label="使用单位负责(代表)人" LabelAlign="Right" LabelWidth="110px" MaxLength="50"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtSupervisionOpinion" runat="server" Label="质量监督意见" LabelAlign="Right" LabelWidth="110px" MaxLength="1000"></f:TextArea>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<%--<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="工程中间交接证书" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="HandoverCertificateId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="HandoverCertificateId" AllowSorting="true"
SortField="ContractNumber" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
@ -81,35 +115,35 @@
<f:ListItem Text="25" Value="25" />
</f:DropDownList>
</PageItems>
</f:Grid>
</f:Grid>--%>
</Items>
</f:Panel>
</Items>
</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"
Width="1100px" Height="620px">
</f:Window>
</f:Window>--%>
<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>
<f:Menu ID="Menu1" runat="server">
<%--<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Icon="TableEdit">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="Delete">
</f:MenuButton>
</f:Menu>
</f:Menu>--%>
</form>
<script type="text/javascript">
<%--<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
</script>
</script>--%>
</body>
</html>

View File

@ -8,11 +8,29 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Drawing.Drawing2D;
namespace FineUIPro.Web.JGZL
{
public partial class HandoverCertificate : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
private string HandoverCertificateId
{
get
{
return (string)ViewState["HandoverCertificateId"];
}
set
{
ViewState["HandoverCertificateId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -23,7 +41,7 @@ namespace FineUIPro.Web.JGZL
{
if (!IsPostBack)
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
//this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.drpProjectId.DataTextField = "ProjectCode";
this.drpProjectId.DataValueField = "ProjectId";
@ -34,11 +52,85 @@ namespace FineUIPro.Web.JGZL
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
this.InitTreeMenu();//加载树
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
this.BindGrid();
//this.BindGrid();
PageData();
}
}
#endregion
private void PageData()
{
EmptyText();
string projectId = this.tvControlItem.SelectedNodeID;
if (!string.IsNullOrEmpty(projectId))
{
string steNames = string.Empty;
List<string> steelLists = new List<string>();
var isoInfos = (from x in Funs.DB.HJGL_PW_IsoInfo where x.ProjectId == projectId select x).ToList();
foreach (var item in isoInfos)
{
if (!string.IsNullOrEmpty(item.STE_ID))
{
steelLists.Add(item.STE_ID);
}
}
foreach (var item in steelLists.Distinct())
{
var ste = BLL.HJGL_MaterialService.GetSteelBySteID(item);
if (ste != null)
{
steNames += ste.STE_Code + "、";
}
}
if (!string.IsNullOrEmpty(steNames))
{
steNames = steNames.Substring(0, steNames.LastIndexOf('、'));
}
var report = BLL.HandoverCertificateService.GetHandoverCertificateByProjectId(projectId);
if (report != null)
{
this.HandoverCertificateId = report.HandoverCertificateId;
if (!string.IsNullOrEmpty(report.ContractNumber))
{
this.txtContractNumber.Text = report.ContractNumber;
}
else
{
this.txtContractNumber.Text = BLL.Base_ProjectService.GetProjectCode(projectId);
}
this.txtHandoverDate.Text = report.HandoverDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.HandoverDate) : "";
if (!string.IsNullOrEmpty(report.ProjectContent))
{
this.txtProjectContent.Text = report.ProjectContent;
}
else
{
this.txtProjectContent.Text = "本次" + BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName + "已完成100米" + steNames + "材质管道的预制与安装工作。项目配套的支架、阀门、三通等各类管道组成件,安装质量均符合设计及规范要求。共完成管道焊缝" + isoInfos.Count + "道其中20%焊缝经射线或超声波检测,合格等级全部满足设计标准。目前,管道系统已顺利完成水压试验及压缩空气吹扫工序,试验压力降与管道洁净度指标均达到设计规定。";
}
this.txtReceiveOpinions.Text = report.ReceiveOpinions;
this.txtHeaderMan.Text = report.HeaderMan;
this.txtSupervisionOpinion.Text = report.SupervisionOpinion;
}
else
{
this.HandoverCertificateId = string.Empty;
this.txtContractNumber.Text = BLL.Base_ProjectService.GetProjectCode(projectId);
this.txtProjectContent.Text = "本次" + BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName + "已完成100米" + steNames + "材质管道的预制与安装工作。项目配套的支架、阀门、三通等各类管道组成件,安装质量均符合设计及规范要求。共完成管道焊缝" + isoInfos.Count + "道其中20%焊缝经射线或超声波检测,合格等级全部满足设计标准。目前,管道系统已顺利完成水压试验及压缩空气吹扫工序,试验压力降与管道洁净度指标均达到设计规定。";
}
}
}
private void EmptyText()
{
txtContractNumber.Text = string.Empty;
txtHandoverDate.Text = string.Empty;
txtProjectContent.Text = string.Empty;
txtReceiveOpinions.Text = string.Empty;
txtHeaderMan.Text = string.Empty;
txtSupervisionOpinion.Text = string.Empty;
}
#region
/// <summary>
/// 加载树
@ -82,7 +174,8 @@ namespace FineUIPro.Web.JGZL
{
if (this.tvControlItem.SelectedNodeID != "0")
{
this.BindGrid();
//this.BindGrid();
PageData();
}
}
#endregion
@ -91,30 +184,30 @@ namespace FineUIPro.Web.JGZL
/// <summary>
/// 数据绑定
/// </summary>
private void BindGrid()
{
//string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1");
string strSql = @"SELECT * from JGZL_HandoverCertificate where 1=1";
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
strSql += " AND ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
}
//else
//{
// strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 ";
// listStr.Add(new SqlParameter("@ProjectId", projectIds));
//}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
Grid1.RecordCount = tb.Rows.Count;
//tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
//private void BindGrid()
//{
// //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1");
// string strSql = @"SELECT * from JGZL_HandoverCertificate where 1=1";
// List<SqlParameter> listStr = new List<SqlParameter>();
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
// {
// strSql += " AND ProjectId = @ProjectId";
// listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
// }
// //else
// //{
// // strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 ";
// // listStr.Add(new SqlParameter("@ProjectId", projectIds));
// //}
// SqlParameter[] parameter = listStr.ToArray();
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// // 2.获取当前分页数据
// Grid1.RecordCount = tb.Rows.Count;
// //tb = GetFilteredTable(Grid1.FilteredData, tb);
// var table = this.GetPagedDataTable(Grid1, tb);
// Grid1.DataSource = table;
// Grid1.DataBind();
//}
#endregion
#region
@ -124,10 +217,10 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
//protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
//{
// BindGrid();
//}
#endregion
#region
@ -136,10 +229,10 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
}
//protected void Grid1_Sort(object sender, GridSortEventArgs e)
//{
// BindGrid();
//}
#endregion
#region
@ -148,11 +241,11 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
//protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
//{
// Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
// BindGrid();
//}
#endregion
#endregion
@ -166,7 +259,8 @@ namespace FineUIPro.Web.JGZL
{
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
this.InitTreeMenu();
BindGrid();
//BindGrid();
PageData();
}
/// <summary>
@ -174,10 +268,10 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
//protected void TextBox_TextChanged(object sender, EventArgs e)
//{
// this.BindGrid();
//}
#endregion
#region
@ -192,13 +286,13 @@ namespace FineUIPro.Web.JGZL
if (projectId != null)
{
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
{
//if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
//{
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
BLL.Common.FastReportService.ResetData();
var report = BLL.HandoverCertificateService.GetHandoverCertificateById(this.Grid1.SelectedRowID);
var report = BLL.HandoverCertificateService.GetHandoverCertificateByProjectId(projectId);
if (report != null)
{
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
@ -210,7 +304,7 @@ namespace FineUIPro.Web.JGZL
keyValuePairs.Add("HeaderMan", report.HeaderMan);
keyValuePairs.Add("SupervisionOpinion", report.SupervisionOpinion);
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
}
initTemplatePath = "File\\Fastreport\\JGZL\\工程中间交接证书.frx";
if (File.Exists(rootPath + initTemplatePath))
{
@ -219,7 +313,7 @@ namespace FineUIPro.Web.JGZL
}
else
{
Alert.ShowInTop("请选择一条记录", MessageBoxIcon.Warning);
Alert.ShowInTop("请先保存数据", MessageBoxIcon.Warning);
return;
}
}
@ -237,140 +331,141 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAdd_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HandoverCertificateEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - ")));
}
else
{
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return;
}
}
//protected void btnAdd_Click(object sender, EventArgs e)
//{
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
// {
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HandoverCertificateEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - ")));
// }
// else
// {
// Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
// return;
// }
//}
/// <summary>
/// 双击编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_HandoverCertificateMenuId, BLL.Const.BtnModify))
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HandoverCertificateEdit.aspx?handoverCertificateId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
}
else
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
}
else
{
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
return;
}
}
else
{
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
//protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
//{
// if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_HandoverCertificateMenuId, BLL.Const.BtnModify))
// {
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
// {
// if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
// {
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HandoverCertificateEdit.aspx?handoverCertificateId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
// }
// else
// {
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
// return;
// }
// }
// else
// {
// Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
// return;
// }
// }
// else
// {
// ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
// }
//}
/// <summary>
/// 右键编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_HandoverCertificateMenuId, BLL.Const.BtnModify))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HandoverCertificateEdit.aspx?handoverCertificateId={0}", Grid1.SelectedRowID, "维护 - ")));
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
//protected void btnMenuEdit_Click(object sender, EventArgs e)
//{
// if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_HandoverCertificateMenuId, BLL.Const.BtnModify))
// {
// if (Grid1.SelectedRowIndexArray.Length == 0)
// {
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
// return;
// }
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HandoverCertificateEdit.aspx?handoverCertificateId={0}", Grid1.SelectedRowID, "维护 - ")));
// }
// else
// {
// Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
// }
//}
/// <summary>
/// 右键删除
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_HandoverCertificateMenuId, Const.BtnDelete))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
//protected void btnMenuDelete_Click(object sender, EventArgs e)
//{
// if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_HandoverCertificateMenuId, Const.BtnDelete))
// {
// if (Grid1.SelectedRowIndexArray.Length == 0)
// {
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
// return;
// }
bool isShow = true;
if (Grid1.SelectedRowIndexArray.Length > 1)
{
isShow = false;
}
bool isDelete = false;
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
if (judgementDelete(rowID, isShow))
{
isDelete = true;
BLL.HandoverCertificateService.DeleteHandoverCertificateById(rowID);
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除工程中间交接证书");
}
}
if (isDelete)
{
ShowNotify("删除成功!", MessageBoxIcon.Success);
}
this.BindGrid();
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
// bool isShow = true;
// if (Grid1.SelectedRowIndexArray.Length > 1)
// {
// isShow = false;
// }
// bool isDelete = false;
// foreach (int rowIndex in Grid1.SelectedRowIndexArray)
// {
// string rowID = Grid1.DataKeys[rowIndex][0].ToString();
// if (judgementDelete(rowID, isShow))
// {
// isDelete = true;
// BLL.HandoverCertificateService.DeleteHandoverCertificateById(rowID);
// BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除工程中间交接证书");
// }
// }
// if (isDelete)
// {
// ShowNotify("删除成功!", MessageBoxIcon.Success);
// }
// this.BindGrid();
// }
// else
// {
// Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
// }
//}
#region
/// <summary>
/// 判断是否可以删除
/// </summary>
/// <returns></returns>
private bool judgementDelete(string id, bool isShow)
{
string content = string.Empty;
//private bool judgementDelete(string id, bool isShow)
//{
// string content = string.Empty;
if (string.IsNullOrEmpty(content))
{
return true;
}
else
{
if (isShow)
{
Alert.ShowInTop(content, MessageBoxIcon.Error);
}
return false;
}
}
// if (string.IsNullOrEmpty(content))
// {
// return true;
// }
// else
// {
// if (isShow)
// {
// Alert.ShowInTop(content, MessageBoxIcon.Error);
// }
// return false;
// }
//}
#endregion
#endregion
#region
@ -379,10 +474,49 @@ namespace FineUIPro.Web.JGZL
/// </summary>
/// <param name="sender"></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
protected void btnSave_Click(object sender, EventArgs e)
{
this.InitTreeMenu();//加载树
this.BindGrid();
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_HandoverCertificateMenuId, Const.BtnSave))
{
Model.JGZL_HandoverCertificate newReport = new Model.JGZL_HandoverCertificate();
newReport.ContractNumber = this.txtContractNumber.Text.Trim();
newReport.HandoverDate = Funs.GetNewDateTime(this.txtHandoverDate.Text);
newReport.ProjectContent = this.txtProjectContent.Text;
newReport.ReceiveOpinions = this.txtReceiveOpinions.Text;
newReport.HeaderMan = this.txtHeaderMan.Text;
newReport.SupervisionOpinion = this.txtSupervisionOpinion.Text;
if (!string.IsNullOrEmpty(this.HandoverCertificateId))
{
newReport.HandoverCertificateId = this.HandoverCertificateId;
BLL.HandoverCertificateService.UpdateHandoverCertificate(newReport);
ShowNotify("修改成功!", MessageBoxIcon.Success);
}
else
{
newReport.ProjectId = this.tvControlItem.SelectedNodeID;
newReport.CompileMan = this.CurrUser.UserId;
newReport.CompileDate = DateTime.Now;
newReport.HandoverCertificateId = SQLHelper.GetNewID(typeof(Model.JGZL_HandoverCertificate));
this.HandoverCertificateId = newReport.HandoverCertificateId;
BLL.HandoverCertificateService.AddHandoverCertificate(newReport);
ShowNotify("保存成功!", MessageBoxIcon.Success);
}
PageData();
//PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
#endregion
}

View File

@ -105,13 +105,13 @@ namespace FineUIPro.Web.JGZL
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnAdd 控件。
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAdd;
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnPrint 控件。
@ -123,49 +123,67 @@ namespace FineUIPro.Web.JGZL
protected global::FineUIPro.Button btnPrint;
/// <summary>
/// Grid1 控件。
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// ToolbarSeparator1 控件。
/// txtContractNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
protected global::FineUIPro.TextBox txtContractNumber;
/// <summary>
/// ToolbarText1 控件。
/// txtHandoverDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
protected global::FineUIPro.DatePicker txtHandoverDate;
/// <summary>
/// ddlPageSize 控件。
/// txtProjectContent 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
protected global::FineUIPro.TextArea txtProjectContent;
/// <summary>
/// Window1 控件。
/// txtReceiveOpinions 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
protected global::FineUIPro.TextArea txtReceiveOpinions;
/// <summary>
/// txtHeaderMan 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtHeaderMan;
/// <summary>
/// txtSupervisionOpinion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtSupervisionOpinion;
/// <summary>
/// WindowPrint 控件。
@ -175,32 +193,5 @@ namespace FineUIPro.Web.JGZL
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
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;
}
}

View File

@ -156,6 +156,7 @@ namespace FineUIPro.Web.JGZL
}
else
{
this.CertificateId = string.Empty;
this.txtInstallationInspection.Text = "浙江省特种设备研究院";
this.txtConstructionUnit.Text = "浙江石油化工有限公司";
this.txtSpecialEquipmentProductionLicenseCode.Text = "TS3833339-2028";

View File

@ -143,9 +143,14 @@ namespace FineUIPro.Web.JGZL
{
newSummary.LosslessRatio = HJGL_DetectionService.GetNDTRateByNDTRID(item.Joty_B_Rate).NDTR_Name;//无损检测比例
}
newSummary.VoltageResistantTestMethod = "水压";//耐压试验方法
//newSummary.VoltageResistantTestMethod = "水压";//耐压试验方法
newSummary.VoltageResistantTestMedium = "水";//耐压试验介质
newSummary.LeakageTestMedium = "空气";//泄漏试验介质
newSummary.CleaningMethod = "压缩空气吹扫";//吹扫、清洗方法
newSummary.VoltageResistantTestPressure = item.ISO_TestPress.Value.ToString(("0.##")) + "MPa";//耐压试验压力
newSummary.LeakageTestPressure = item.LeakageTest + "MPa";//泄漏试验压力
newSummary.CorrosionControlMethod = item.ISO_Paint;//腐蚀控制方式
newSummary.VoltageResistantTestMethod = "水压试验";//耐压试验方法
BLL.IndustrialPipelineInstallationSummaryService.AddIndustrialPipelineInstallationSummary(newSummary);
}
}

View File

@ -210,6 +210,7 @@ namespace FineUIPro.Web.JGZL
}
else
{
this.MaintenanceId = string.Empty;
this.txtMaintenanceCode.Text = "0XXX-91330921MA2A2R3F6G-2026";
this.txtConUnit.Text = "浙江鼎盛石化工程有限公司";
this.txtEquipmentCode.Text = "/";