2023-09-07
This commit is contained in:
@@ -170,6 +170,11 @@
|
||||
EnableMaximize="true" Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close"
|
||||
IsModal="true" Width="1050px" Height="650px">
|
||||
</f:Window>
|
||||
|
||||
<f:Window ID="Window2" Title="打印" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
|
||||
IsModal="true" Width="1010px" Height="660px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
function reloadGrid() {
|
||||
|
||||
@@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
@@ -445,6 +446,122 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataTable dt = new DataTable("Table1");
|
||||
dt.Columns.Add("ProjectName", typeof(String));
|
||||
dt.Columns.Add("CH_CheckUnit", typeof(String));
|
||||
dt.Columns.Add("WorkAreaName", typeof(String));
|
||||
dt.Columns.Add("CH_TrustUnit", typeof(String));
|
||||
dt.Columns.Add("CH_TrustMan", typeof(String));
|
||||
dt.Columns.Add("CH_TrustCode", typeof(String));
|
||||
dt.Columns.Add("WorkAreaCode", typeof(String));
|
||||
dt.Columns.Add("CH_NDTCriteria", typeof(String));
|
||||
dt.Columns.Add("CH_WeldMethod", typeof(String));
|
||||
dt.Columns.Add("CH_AcceptGrade", typeof(String));
|
||||
dt.Columns.Add("CH_NDTMethod", typeof(String));
|
||||
dt.Columns.Add("CH_SlopeType", typeof(String));
|
||||
dt.Columns.Add("CH_NDTRate", typeof(String));
|
||||
|
||||
|
||||
|
||||
DataRow dr = dt.NewRow();
|
||||
if (this.tvControlItem.SelectedNode == null)
|
||||
{
|
||||
Alert.ShowInTop("请选择要打印的委托单!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string reportId = this.tvControlItem.SelectedNode.NodeID;
|
||||
// Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID);
|
||||
// Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID);
|
||||
|
||||
// var trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(reportId);
|
||||
var trust = BLL.Batch_BatchTrustService.GetBatchTrustViewById(this.tvControlItem.SelectedNodeID);
|
||||
if (trust != null)
|
||||
{
|
||||
string varValue = string.Empty;
|
||||
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
|
||||
|
||||
dr["ProjectName"] = projectName;
|
||||
if (!string.IsNullOrEmpty(trust.NDEUnit))
|
||||
{
|
||||
dr["CH_CheckUnit"] = BLL.UnitService.GetUnitNameByUnitId(trust.NDEUnit).ToString();
|
||||
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(trust.TrustBatchCode))
|
||||
{
|
||||
dr["CH_TrustCode"] = trust.TrustBatchCode;
|
||||
|
||||
}
|
||||
/* if (!string.IsNullOrEmpty(trust.CH_NDTCriteria))
|
||||
{
|
||||
dr["CH_NDTCriteria"] = trust.CH_NDTCriteria;
|
||||
}*/
|
||||
if (!string.IsNullOrEmpty(trust.DetectionTypeCode))
|
||||
{
|
||||
dr["CH_NDTMethod"] = trust.DetectionTypeCode;
|
||||
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(trust.DetectionRateId))
|
||||
{
|
||||
var list = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(trust.DetectionRateId);
|
||||
if (list != null)
|
||||
{
|
||||
dr["CH_NDTRate"] = list.DetectionRateCode;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var PworkArea = Funs.DB.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == trust.UnitWorkId);
|
||||
if (PworkArea != null)
|
||||
{
|
||||
//var cel = recordSheet.GetRow(3).CreateCell(1);
|
||||
//cel.SetCellValue(PworkArea.WorkAreaCode);
|
||||
//cel.CellStyle = styleCenter;
|
||||
dr["WorkAreaName"] = PworkArea.UnitWorkName;
|
||||
dr["WorkAreaCode"] = PworkArea.UnitWorkCode;
|
||||
|
||||
}
|
||||
dt.Rows.Add(dr);
|
||||
|
||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||
keyValuePairs.Add("TrustBatchId", trust.TrustBatchId);
|
||||
keyValuePairs.Add("totalUnit", "赛鼎工程有限公司");
|
||||
var unitcheck = Funs.DB.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == trust.ProjectId && x.UnitType == Const.ProjectUnitType_3);
|
||||
if (unitcheck != null && !string.IsNullOrEmpty(unitcheck.UnitId))
|
||||
{
|
||||
keyValuePairs.Add("supUnit", BLL.UnitService.GetUnitNameByUnitId(unitcheck.UnitId).ToString());
|
||||
}
|
||||
|
||||
|
||||
BLL.FastReportService.ResetData();
|
||||
BLL.FastReportService.AddFastreportTable(dt);
|
||||
BLL.FastReportService.AddFastreportParameter(keyValuePairs);
|
||||
|
||||
// Session["Table"] = dt;
|
||||
// Session["CH_TrustID"] = reportId;
|
||||
string initTemplatePath = "";
|
||||
string rootPath = Server.MapPath("~/");
|
||||
initTemplatePath = "File\\Fastreport\\管道焊口返修委托单NoPic.frx";
|
||||
|
||||
if (File.Exists(rootPath + initTemplatePath))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择要打印的委托单!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
protected void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
@@ -480,6 +597,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand
|
||||
// return;
|
||||
//}
|
||||
}
|
||||
*/
|
||||
|
||||
#region 判断是否可删除
|
||||
/// <summary>
|
||||
|
||||
@@ -7,11 +7,13 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
|
||||
|
||||
public partial class RepairTrust {
|
||||
|
||||
namespace FineUIPro.Web.HJGL.RepairAndExpand
|
||||
{
|
||||
|
||||
|
||||
public partial class RepairTrust
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtTrustDateMonth 控件。
|
||||
/// </summary>
|
||||
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtTrustDateMonth;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar5 控件。
|
||||
/// </summary>
|
||||
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar5;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtSearchCode 控件。
|
||||
/// </summary>
|
||||
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSearchCode;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// tvControlItem 控件。
|
||||
/// </summary>
|
||||
@@ -92,7 +94,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Tree tvControlItem;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
@@ -101,7 +103,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar3 控件。
|
||||
/// </summary>
|
||||
@@ -110,7 +112,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar3;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
@@ -119,7 +121,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit 控件。
|
||||
/// </summary>
|
||||
@@ -128,7 +130,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnPointAudit 控件。
|
||||
/// </summary>
|
||||
@@ -137,7 +139,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPointAudit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete 控件。
|
||||
/// </summary>
|
||||
@@ -146,7 +148,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDelete;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnPrint 控件。
|
||||
/// </summary>
|
||||
@@ -155,7 +157,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPrint;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
@@ -164,7 +166,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtTrustBatchCode 控件。
|
||||
/// </summary>
|
||||
@@ -173,7 +175,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtTrustBatchCode;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtTrustDate 控件。
|
||||
/// </summary>
|
||||
@@ -182,7 +184,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtTrustDate;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtDetectionTypeCode 控件。
|
||||
/// </summary>
|
||||
@@ -191,7 +193,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtDetectionTypeCode;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbNDEUnit 控件。
|
||||
/// </summary>
|
||||
@@ -200,7 +202,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbNDEUnit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbIsCheck 控件。
|
||||
/// </summary>
|
||||
@@ -209,7 +211,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbIsCheck;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbIsAudit 控件。
|
||||
/// </summary>
|
||||
@@ -218,7 +220,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbIsAudit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
@@ -227,7 +229,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
@@ -236,7 +238,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
@@ -245,7 +247,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
@@ -254,7 +256,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
@@ -263,5 +265,14 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user