diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/拍片一次合格率统计表.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/拍片一次合格率统计表.frx index 200381e..b3e6e4d 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/拍片一次合格率统计表.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/拍片一次合格率统计表.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -42,7 +42,7 @@ namespace FastReport } - + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/持证焊工焊绩档案.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/持证焊工焊绩档案.frx index 9a04e89..bf2539c 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/持证焊工焊绩档案.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/持证焊工焊绩档案.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -42,7 +42,7 @@ namespace FastReport } - + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/管道无损检测结果汇总表.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/管道无损检测结果汇总表.frx new file mode 100644 index 0000000..eb8623d --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/管道无损检测结果汇总表.frx @@ -0,0 +1,368 @@ + + + using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Windows.Forms; +using System.Drawing; +using System.Data; +using FastReport; +using FastReport.Data; +using FastReport.Dialog; +using FastReport.Barcode; +using FastReport.Table; +using FastReport.Utils; + +namespace FastReport +{ + public class ReportScript + { + + private int x; + private string header=""; + private string s=""; + + private void Table9_ManualBuild(object sender, EventArgs e) + { + DataSourceBase rowData = Report.GetDataSource("Data"); + // init the data source + rowData.Init(); + x=0; + // print the first table row - it is a header + + // now enumerate the data source and print the table body + while (rowData.HasMoreRows) + { + // print the table body + x++; + Table9.PrintRow(0); + Table9.PrintColumns(); + + // go next data source row + rowData.Next(); + } + } + + private void Cell2_BeforePrint(object sender, EventArgs e) + { + if (Report.Engine.PageNo>1) + { + header="(续)"; + + } + } + + private void Cell1_BeforePrint(object sender, EventArgs e) + { + if (Report.Engine.PageNo>1) + { + s="2"; + } + else + { + s="1"; + } + } + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/CheckResultsSummary.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/CheckResultsSummary.aspx.cs index 6409574..1681738 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/CheckResultsSummary.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/CheckResultsSummary.aspx.cs @@ -7,6 +7,7 @@ using System.Data; using System.Data.SqlClient; using System.Text; using AspNet = System.Web.UI.WebControls; +using System.IO; namespace FineUIPro.Web.HJGL.CheckManage { @@ -606,6 +607,9 @@ namespace FineUIPro.Web.HJGL.CheckManage /// protected void btnPrint_Click(object sender, EventArgs e) { + string initTemplatePath = ""; + string rootPath = Server.MapPath("~/"); + BLL.Common.FastReportService.ResetData(); if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) { var pipeIds = this.tvControlItem.SelectedNodeID.Split('|').ToList(); @@ -616,7 +620,7 @@ namespace FineUIPro.Web.HJGL.CheckManage string serviceId = pipeIds[1];//介质 string steId = pipeIds[2];//材质 - string reportId = projectId + "|" + isoClassId + "|" + serviceId + "|" + steId; + //string reportId = projectId + "|" + isoClassId + "|" + serviceId + "|" + steId; List listStr = new List(); listStr.Add(new SqlParameter("@ProjectId", projectId)); @@ -626,52 +630,91 @@ namespace FineUIPro.Web.HJGL.CheckManage listStr.Add(new SqlParameter("@Flag", "0")); SqlParameter[] parameter = listStr.ToArray(); DataTable tb = BLL.SQLHelper.GetDataTableRunProc("HJGL_sp_CheckResultSummary", parameter); - string pageNum = Funs.GetPagesCountByPageSize(5, 14, tb.Rows.Count).ToString(); - string projectName = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName; - string projectCode = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectCode; - string varValue = string.Empty; - string supervisionUnit = this.txtSupervisionUnit.Text.Trim();//监理单位 - string pipeClassName = string.Empty;//管道等级 - string pipelineCode = string.Empty;//管道编号 - //var unitType = (from x in Funs.DB.Project_Unit where x.ProjectId == projectId && x.UnitType.Contains("2") select x).FirstOrDefault(); - //if (unitType != null) - //{ - // var unit = BLL.Base_UnitService.GetUnit(unitType.UnitId); - // supervisionUnit = unit.UnitName; - //} - pipeClassName = BLL.HJGL_PipingClassService.GetPipingClassByPipingClassId(isoClassId).ISC_IsoName;//管道等级 - pipelineCode = this.tvControlItem.SelectedNode.Text;//管道编号 - //V_Name6-V_Name15 - string hg = this.lblRT1.Text.Trim() + "|" + this.lblUT1.Text.Trim() + "|" + this.lblMT1.Text.Trim() + "|" + this.lblPT1.Text.Trim() + "|" + this.lblMT2.Text.Trim() + "|" + this.lblPT2.Text.Trim() + "|" + this.lblRT3.Text.Trim() + "|" + this.lblUT3.Text.Trim() + "|" + this.lblMT3.Text.Trim() + "|" + this.lblPT3.Text.Trim(); - ////V_Name16-V_Name25 - string bhg = this.lblUnRT1.Text.Trim() + "|" + this.lblUnUT1.Text.Trim() + "|" + this.lblUnMT1.Text.Trim() + "|" + this.lblUnPT1.Text.Trim() + "|" + this.lblUnMT2.Text.Trim() + "|" + this.lblUnPT2.Text.Trim() + "|" + this.lblUnRT3.Text.Trim() + "|" + this.lblUnUT3.Text.Trim() + "|" + this.lblUnMT3.Text.Trim() + "|" + this.lblUnPT3.Text.Trim(); + //string projectName = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName; + //string projectCode = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectCode; + //string varValue = string.Empty; + //string supervisionUnit = this.txtSupervisionUnit.Text.Trim();//监理单位 + //string pipeClassName = string.Empty;//管道等级 + //string pipelineCode = string.Empty;//管道编号 + //pipeClassName = BLL.HJGL_PipingClassService.GetPipingClassByPipingClassId(isoClassId).ISC_IsoName;//管道等级 + //pipelineCode = this.tvControlItem.SelectedNode.Text;//管道编号 + ////V_Name6-V_Name15 + //string hg = this.lblRT1.Text.Trim() + "|" + this.lblUT1.Text.Trim() + "|" + this.lblMT1.Text.Trim() + "|" + this.lblPT1.Text.Trim() + "|" + this.lblMT2.Text.Trim() + "|" + this.lblPT2.Text.Trim() + "|" + this.lblRT3.Text.Trim() + "|" + this.lblUT3.Text.Trim() + "|" + this.lblMT3.Text.Trim() + "|" + this.lblPT3.Text.Trim(); + //////V_Name16-V_Name25 + //string bhg = this.lblUnRT1.Text.Trim() + "|" + this.lblUnUT1.Text.Trim() + "|" + this.lblUnMT1.Text.Trim() + "|" + this.lblUnPT1.Text.Trim() + "|" + this.lblUnMT2.Text.Trim() + "|" + this.lblUnPT2.Text.Trim() + "|" + this.lblUnRT3.Text.Trim() + "|" + this.lblUnUT3.Text.Trim() + "|" + this.lblUnMT3.Text.Trim() + "|" + this.lblUnPT3.Text.Trim(); - var installation = (from x in Funs.DB.Project_Installation where x.ProjectId == projectId select x.InstallationCode).FirstOrDefault(); - var installationCode = installation;//单位工程 V_Name26 - //施工单位 - //string unitName = string.Empty;//V_Name27 - //var unitTypes = (from x in Funs.DB.Project_Unit where x.ProjectId == projectId select x).FirstOrDefault(); - //if (unitTypes != null) - //{ - // unitName = BLL.Base_UnitService.GetUnitNameByUnitId(unitTypes.UnitId); - //} - string unitName = "镇海石化建安工程有限公司"; //施工单位 V_Name27 - var testingStandard = this.txtTestingStandard.Text.Trim();//检测标准 V_Name28 - var workArea = installation;//区号 V_Name29 - var reportDate = DateTime.Now.ToShortDateString();//报告日期 V_Name30 + //var installation = (from x in Funs.DB.Project_Installation where x.ProjectId == projectId select x.InstallationCode).FirstOrDefault(); + //var installationCode = installation;//单位工程 V_Name26 + //string unitName = "浙江鼎盛石化工程有限公司"; //施工单位 V_Name27 + //var testingStandard = this.txtTestingStandard.Text.Trim();//检测标准 V_Name28 + //var workArea = installation;//区号 V_Name29 + //var reportDate = DateTime.Now.ToShortDateString();//报告日期 V_Name30 - varValue = pageNum + "|" + projectName + "|" + supervisionUnit + "|" + pipeClassName + "|" + pipelineCode + "|" + hg + "|" + bhg + "|" + installationCode + "|" + unitName + "|" + testingStandard + "|" + workArea + "|" + reportDate + "|" + projectCode; - varValue = HttpUtility.UrlEncodeUnicode(varValue); - if (tb.Rows.Count <= 5) + if (tb.Rows.Count > 0) { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Common/ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId=0", BLL.Const.HJGL_NDTSummaryReportId1, reportId, varValue, "打印 - "))); + DataTable dt = new DataTable(); + dt.TableName = "Data"; + dt.Columns.Add("SingleName"); + dt.Columns.Add("WeldJointCode"); + dt.Columns.Add("WelderCode"); + dt.Columns.Add("PointBatchCode"); + dt.Columns.Add("RTUTResult"); + dt.Columns.Add("RTUTCheckNo"); + dt.Columns.Add("MTPTResult"); + dt.Columns.Add("MTPTCheckNo"); + dt.Columns.Add("CHT_Remark"); + + dt.DefaultView.Sort = "PipelineCode,WeldJointCode asc"; + DataRow[] rows = dt.DefaultView.ToTable().Select(); + + foreach (var row in rows) + { + var newRow = dt.NewRow(); + newRow["SingleName"] = row["SingleName"].ToString(); + newRow["WeldJointCode"] = row["WeldJointCode"].ToString(); + newRow["WelderCode"] = row["WelderCode"].ToString(); + newRow["PointBatchCode"] = row["PointBatchCode"].ToString(); + newRow["RTUTResult"] = row["RTUTResult"].ToString(); + newRow["RTUTCheckNo"] = row["RTUTCheckNo"].ToString(); + newRow["MTPTResult"] = row["MTPTResult"].ToString(); + newRow["MTPTCheckNo"] = row["MTPTCheckNo"].ToString(); + newRow["CHT_Remark"] = row["CHT_Remark"].ToString(); + dt.Rows.Add(newRow); + } + BLL.Common.FastReportService.AddFastreportTable(dt); } - else + + Dictionary keyValuePairs = new Dictionary(); + //keyValuePairs.Add("welderName", welderName); + //keyValuePairs.Add("welderCode", welderCode); + //keyValuePairs.Add("years", years); + //keyValuePairs.Add("months", months); + //keyValuePairs.Add("sumTotalFilmNum", sumTotalFilmNum.ToString()); + //keyValuePairs.Add("sumOneToatalFilmNum", sumOneToatalFilmNum.ToString()); + //keyValuePairs.Add("sumOnePassFilmNum", sumOnePassFilmNum.ToString()); + //keyValuePairs.Add("sumOKRate", sumOKRate.ToString()); + BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); + + initTemplatePath = "File\\Fastreport\\管道无损检测结果汇总表.frx"; + + if (File.Exists(rootPath + initTemplatePath)) { - PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../Common/ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId=0", BLL.Const.HJGL_NDTSummaryReportId2, reportId, varValue, "打印 - "))); - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Common/ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId=0", BLL.Const.HJGL_NDTSummaryReportId1, reportId, varValue, "打印 - "))); + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); + } + + //varValue = pageNum + "|" + projectName + "|" + supervisionUnit + "|" + pipeClassName + "|" + pipelineCode + "|" + hg + "|" + bhg + "|" + installationCode + "|" + unitName + "|" + testingStandard + "|" + workArea + "|" + reportDate + "|" + projectCode; + //varValue = HttpUtility.UrlEncodeUnicode(varValue); + //if (tb.Rows.Count <= 5) + //{ + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Common/ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId=0", BLL.Const.HJGL_NDTSummaryReportId1, reportId, varValue, "打印 - "))); + //} + //else + //{ + // PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../Common/ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId=0", BLL.Const.HJGL_NDTSummaryReportId2, reportId, varValue, "打印 - "))); + // PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Common/ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId=0", BLL.Const.HJGL_NDTSummaryReportId1, reportId, varValue, "打印 - "))); + //} } } else diff --git a/HJGL_DS/FineUIPro.Web/Welder/QualifiedProject.aspx b/HJGL_DS/FineUIPro.Web/Welder/QualifiedProject.aspx index 6acab74..cf45850 100644 --- a/HJGL_DS/FineUIPro.Web/Welder/QualifiedProject.aspx +++ b/HJGL_DS/FineUIPro.Web/Welder/QualifiedProject.aspx @@ -62,11 +62,11 @@ OnCheckedChanged="drpIsLimit_CheckedChanged"> - + <%-- - - + --%> /// /// - protected void btnPrint_Click(object sender, EventArgs e) - { - if (this.drpType.SelectedValue != BLL.Const._Null) - { - if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - if (this.drpType.SelectedValue == "1") - { - PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("WelderCardPrint1.aspx?WED_ID={0}", this.tvControlItem.SelectedNodeID, "编辑 - "))); - } - else - { - PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("WelderCardPrint2.aspx?WED_ID={0}", this.tvControlItem.SelectedNodeID, "编辑 - "))); - } - } - else - { - ShowNotify("请选择焊工!", MessageBoxIcon.Warning); - return; - } - } - else - { - ShowNotify("请选择打印类型!", MessageBoxIcon.Warning); - return; - } - } + //protected void btnPrint_Click(object sender, EventArgs e) + //{ + // if (this.drpType.SelectedValue != BLL.Const._Null) + // { + // if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + // { + // if (this.drpType.SelectedValue == "1") + // { + // PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("WelderCardPrint1.aspx?WED_ID={0}", this.tvControlItem.SelectedNodeID, "编辑 - "))); + // } + // else + // { + // PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("WelderCardPrint2.aspx?WED_ID={0}", this.tvControlItem.SelectedNodeID, "编辑 - "))); + // } + // } + // else + // { + // ShowNotify("请选择焊工!", MessageBoxIcon.Warning); + // return; + // } + // } + // else + // { + // ShowNotify("请选择打印类型!", MessageBoxIcon.Warning); + // return; + // } + //} #endregion } } \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/Welder/QualifiedProject.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/Welder/QualifiedProject.aspx.designer.cs index c8fa39d..b996413 100644 --- a/HJGL_DS/FineUIPro.Web/Welder/QualifiedProject.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/Welder/QualifiedProject.aspx.designer.cs @@ -174,24 +174,6 @@ namespace FineUIPro.Web.Welder { /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - /// - /// drpType 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpType; - - /// - /// btnPrint 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnPrint; - /// /// btnAdd 控件。 ///