合并最新
This commit is contained in:
@@ -322,12 +322,12 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
/// <returns></returns>
|
||||
private bool GetButtonPower(string button)
|
||||
{
|
||||
//string menuId = Const.HJGL_ConsumablesMenuId;
|
||||
//if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
//{
|
||||
// menuId = Const.PHJGL_ConsumablesMenuId;
|
||||
//}
|
||||
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_ConsumablesMenuId, button);
|
||||
string menuId = Const.HJGL_ConsumablesMenuId;
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
menuId = Const.PHJGL_ConsumablesMenuId;
|
||||
}
|
||||
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, menuId, button);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -275,13 +275,13 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
/// <returns></returns>
|
||||
private bool GetButtonPower(string button)
|
||||
{
|
||||
//string menuId = Const.HJGL_ConsumablesMenuId;
|
||||
//if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
//{
|
||||
// menuId = Const.PHJGL_ConsumablesMenuId;
|
||||
//}
|
||||
string menuId = Const.HJGL_PipingClassMenuId;
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
menuId = Const.PHJGL_PipingClassMenuId;
|
||||
}
|
||||
|
||||
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_PipingClassMenuId, button);
|
||||
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, menuId, button);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_DetectionTypeMenuId, Const.BtnAdd))
|
||||
if (GetButtonPower( Const.BtnAdd))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TestingEdit.aspx", "新增 - ")));
|
||||
}
|
||||
@@ -306,7 +306,12 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
/// <returns></returns>
|
||||
private bool GetButtonPower(string button)
|
||||
{
|
||||
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_DetectionTypeMenuId, button);
|
||||
string menuId = Const.HJGL_DetectionTypeMenuId;
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
menuId = Const.PHJGL_DetectionTypeMenuId;
|
||||
}
|
||||
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, menuId, button);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
<f:Toolbar ID="Toolbar2" runat="server">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpCheckUnit" runat="server" Label="检测单位" LabelWidth="80px" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="Tree_TextChanged"></f:DropDownList>
|
||||
|
||||
<f:TextBox ID="txtTrust" runat="server" Label="委托单号" LabelWidth="80px" LabelAlign="Right" EmptyText="输入查询条件" AutoPostBack="true"
|
||||
OnTextChanged="Tree_TextChanged" >
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
@@ -59,7 +63,11 @@
|
||||
</f:Button>
|
||||
<f:Button ID="btnSave" Text="保存" ToolTip="保存检测单" Icon="SystemSave" runat="server" OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPrint" runat="server" Icon="Printer" EnablePostBack="true" EnableAjax="false" Text="打印" ToolTip="打印" OnClick="btnPrint_Click"></f:Button>
|
||||
<f:DropDownList ID="drpPrintType" runat="server" Label="打印报表" LabelAlign="Right" Width="350px">
|
||||
|
||||
</f:DropDownList>
|
||||
<f:Button ID="Button2" runat="server" Icon="Printer" EnableAjax="false" Text="打印" ToolTip="打印" OnClick="btnPrint_Click"></f:Button>
|
||||
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
@@ -107,7 +115,7 @@
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="RT检测单录入" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="JOT_ID" AllowCellEditing="true"
|
||||
EnableColumnLines="true" ClicksToEdit="1" DataIDField="JOT_ID"
|
||||
EnableColumnLines="true" ClicksToEdit="1" DataIDField="JOT_ID" AllowSorting="true" OnSort="Grid1_Sort"
|
||||
SortField="JOT_JointNo" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar4" runat="server" Position="Top">
|
||||
@@ -167,6 +175,23 @@
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="探伤结果" ColumnID="CHT_CheckResult" DataField="CHT_CheckResult" SortField="CHT_CheckResult"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
<Editor>
|
||||
<f:DropDownList ID="drpCHT_CheckResult" runat="server">
|
||||
<f:ListItem Value="合格" Text="合格" />
|
||||
<f:ListItem Value="不合格" Text="不合格" />
|
||||
</f:DropDownList>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="缺陷定义" ColumnID="Defects_Definition" DataField="Defects_Definition" SortField="Defects_Definition"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
<Editor>
|
||||
<f:DropDownList ID="DropDownList1" runat="server">
|
||||
<f:ListItem Value="气孔" Text="气孔" />
|
||||
<f:ListItem Value="未熔合" Text="未熔合" />
|
||||
<f:ListItem Value="条形缺陷" Text="条形缺陷" />
|
||||
<f:ListItem Value="其他" Text="其他" />
|
||||
</f:DropDownList>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="胶片规格" ColumnID="FilmSpecifications" DataField="FilmSpecifications" SortField="FilmSpecifications"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
@@ -206,7 +231,7 @@
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="非RT检测单录入" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="JOT_ID" AllowCellEditing="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="JOT_ID" AllowCellEditing="true" AllowSorting="true" OnSort="Grid1_Sort"
|
||||
EnableColumnLines="true" ClicksToEdit="1" DataIDField="JOT_ID"
|
||||
SortField="JOT_JointNo" EnableTextSelection="True" Hidden="true">
|
||||
<Toolbars>
|
||||
@@ -249,18 +274,50 @@
|
||||
<f:RenderField HeaderText="焊口数" ColumnID="JointCount" DataField="JointCount" SortField="JointCount"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="110px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="缺陷位置" ColumnID="CHT_RepairLocation" DataField="CHT_RepairLocation" SortField="CHT_RepairLocation"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="110px">
|
||||
<Editor>
|
||||
<f:TextBox ID="TextBox1" runat="server"></f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="缺陷长度" ColumnID="DefectLength" DataField="DefectLength" SortField="DefectLength"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
<Editor>
|
||||
<f:NumberBox ID="txtDefectLength" runat="server" NoDecimal="true" NoNegative="true"></f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="探伤结果*" ColumnID="CHT_CheckResult" DataField="CHT_CheckResult" SortField="CHT_CheckResult"
|
||||
<f:RenderField HeaderText="缺陷深度" ColumnID="DefectDepth" DataField="DefectDepth" SortField="DefectDepth"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
<Editor>
|
||||
<f:TextBox ID="txtCheckResult2" runat="server"></f:TextBox>
|
||||
<f:NumberBox ID="txtDefectDepth" runat="server" NoDecimal="true" NoNegative="true"></f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="缺陷高度" ColumnID="DefectHeight" DataField="DefectHeight" SortField="DefectHeight"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
<Editor>
|
||||
<f:NumberBox ID="txtDefectHeight" runat="server" NoDecimal="true" NoNegative="true"></f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="探伤结果*" ColumnID="CHT_CheckResult" DataField="CHT_CheckResult" SortField="CHT_CheckResult"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
<Editor>
|
||||
<f:DropDownList ID="drpCHT_CheckResult1" runat="server">
|
||||
<f:ListItem Value="合格" Text="合格" />
|
||||
<f:ListItem Value="不合格" Text="不合格" />
|
||||
</f:DropDownList>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="缺陷定义" ColumnID="Defects_Definition" DataField="Defects_Definition" SortField="Defects_Definition"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
<Editor>
|
||||
<f:DropDownList ID="drpDefects_Definition" runat="server">
|
||||
<f:ListItem Value="气孔" Text="气孔" />
|
||||
<f:ListItem Value="未熔合" Text="未熔合" />
|
||||
<f:ListItem Value="条形缺陷" Text="条形缺陷" />
|
||||
<f:ListItem Value="其他" Text="其他" />
|
||||
</f:DropDownList>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="延长米cm" ColumnID="ExtendingRice" DataField="ExtendingRice" SortField="ExtendingRice"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
</f:RenderField>
|
||||
@@ -293,7 +350,7 @@
|
||||
</f:Window>
|
||||
<f:Window ID="Window3" Title="打印" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
|
||||
IsModal="true" Width="1200px" Height="650px">
|
||||
IsModal="true" Width="1010px" Height="660px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -104,6 +104,15 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCheckUnit;
|
||||
|
||||
/// <summary>
|
||||
/// txtTrust 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtTrust;
|
||||
|
||||
/// <summary>
|
||||
/// tvControlItem 控件。
|
||||
/// </summary>
|
||||
@@ -186,13 +195,22 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnPrint 控件。
|
||||
/// drpPrintType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPrint;
|
||||
protected global::FineUIPro.DropDownList drpPrintType;
|
||||
|
||||
/// <summary>
|
||||
/// Button2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button Button2;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
@@ -401,6 +419,24 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtPassFilm;
|
||||
|
||||
/// <summary>
|
||||
/// drpCHT_CheckResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCHT_CheckResult;
|
||||
|
||||
/// <summary>
|
||||
/// DropDownList1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropDownList1;
|
||||
|
||||
/// <summary>
|
||||
/// drpFilmSpecifications 控件。
|
||||
/// </summary>
|
||||
@@ -482,6 +518,15 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtReportDate2;
|
||||
|
||||
/// <summary>
|
||||
/// TextBox1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox TextBox1;
|
||||
|
||||
/// <summary>
|
||||
/// txtDefectLength 控件。
|
||||
/// </summary>
|
||||
@@ -492,13 +537,40 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
protected global::FineUIPro.NumberBox txtDefectLength;
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckResult2 控件。
|
||||
/// txtDefectDepth 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCheckResult2;
|
||||
protected global::FineUIPro.NumberBox txtDefectDepth;
|
||||
|
||||
/// <summary>
|
||||
/// txtDefectHeight 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtDefectHeight;
|
||||
|
||||
/// <summary>
|
||||
/// drpCHT_CheckResult1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCHT_CheckResult1;
|
||||
|
||||
/// <summary>
|
||||
/// drpDefects_Definition 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpDefects_Definition;
|
||||
|
||||
/// <summary>
|
||||
/// CheckNo2 控件。
|
||||
|
||||
@@ -50,13 +50,12 @@
|
||||
<Items>
|
||||
<f:HiddenField runat="server" ID="hdJOTID"></f:HiddenField>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:DropDownList ID="drpPrintType" runat="server" Label="打印报表" LabelAlign="Right" Width="350px"></f:DropDownList>
|
||||
<f:Button ID="Button1" runat="server" Icon="Printer" EnableAjax="false" Text="打印" ToolTip="打印" OnClick="btnPrint_Click"></f:Button>
|
||||
|
||||
<f:Button ID="btnAudit" Text="审核" ToolTip="审核" Icon="PageEdit" runat="server" OnClick="btnAudit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnCancelAudit" Text="取消审核" ToolTip="取消审核" Icon="NoteEdit" runat="server" OnClick="btnCancelAudit_Click" Hidden="true">
|
||||
</f:Button>
|
||||
<f:DropDownList ID="drpPrintType" runat="server" Label="打印报表" LabelAlign="Right" Width="350px"></f:DropDownList>
|
||||
<f:Button ID="Button1" runat="server" Icon="Printer" EnableAjax="false" Text="打印" ToolTip="打印" OnClick="btnPrint_Click"></f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
@@ -189,6 +188,9 @@
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="探伤结果" ColumnID="CHT_CheckResult" DataField="CHT_CheckResult" SortField="CHT_CheckResult"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="缺陷定义" ColumnID="Defects_Definition" DataField="Defects_Definition" SortField="Defects_Definition"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="延长米cm" ColumnID="ExtendingRice" DataField="ExtendingRice" SortField="ExtendingRice"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
@@ -211,7 +213,7 @@
|
||||
</f:Window>
|
||||
<f:Window ID="Window3" Title="打印" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
|
||||
IsModal="true" Width="1200px" Height="650px">
|
||||
IsModal="true" Width="1010" Height="660px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using NPOI.SS.UserModel;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.IO;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using NPOI.SS.UserModel;
|
||||
using System.Runtime.Serialization;
|
||||
using NPOI.SS.Util;
|
||||
using NPOI.HSSF.UserModel;
|
||||
using System.Linq;
|
||||
namespace FineUIPro.Web.HJGL.CheckManage
|
||||
{
|
||||
public partial class CheckManageAudit : PageBase
|
||||
@@ -589,151 +584,199 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// <param name="e"></param>
|
||||
protected void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
string reportId = this.tvControlItem.SelectedNode.NodeID;
|
||||
if (!string.IsNullOrEmpty(reportId))
|
||||
string reportId = string.Empty;
|
||||
if (this.tvControlItem.SelectedNode != null)
|
||||
{
|
||||
if (drpPrintType.SelectedValue == "107")
|
||||
reportId = this.tvControlItem.SelectedNode.NodeID;
|
||||
if (drpPrintType.SelectedValue == BLL.Const.CheckReport1Id || drpPrintType.SelectedValue == BLL.Const.CheckReport2Id)
|
||||
{
|
||||
var q = BLL.CheckManageService.GetCheckByCHT_CheckID(this.CHT_CheckID);
|
||||
string varValue = string.Empty;
|
||||
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
|
||||
var installationName = BLL.Project_InstallationService.GetInstallationByInstallationId(q.InstallationId).InstallationName;
|
||||
var unitName = BLL.UnitService.GetUnitNameByUnitId(q.UnitId);
|
||||
|
||||
//varValue = installationName + "|" + unitName + "|" + projectName + "|" + q.PW_PointDate.Value.ToString("yyyy-MM-dd") + "|" + q.PW_PointNo;
|
||||
|
||||
//if (!string.IsNullOrEmpty(varValue))
|
||||
//{
|
||||
// varValue = Microsoft.JScript.GlobalObject.escape(varValue.Replace("/", ","));
|
||||
//}
|
||||
//PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.CheckReportId, reportId, varValue, this.CurrUser.LoginProjectId)));
|
||||
|
||||
|
||||
string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
|
||||
//模板文件
|
||||
string TempletFileName = Server.MapPath("~/") + "File/Excel/HJGL_DataOut/管道焊口无损检测结果通知单.xlsx";
|
||||
//导出文件
|
||||
string filePath = rootPath + DateTime.Now.ToString("yyyyMMddhhmmss") + "\\";
|
||||
if (!Directory.Exists(filePath))
|
||||
if (!string.IsNullOrEmpty(reportId))
|
||||
{
|
||||
Directory.CreateDirectory(filePath);
|
||||
}
|
||||
string ReportFileName = filePath + "out.xlsx";
|
||||
var q = BLL.CheckManageService.GetCheckByCHT_CheckID(this.CHT_CheckID);
|
||||
string varValue = string.Empty;
|
||||
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
|
||||
var installationName = BLL.Project_InstallationService.GetInstallationByInstallationId(q.InstallationId).InstallationName;
|
||||
var unitName = BLL.UnitService.GetUnitNameByUnitId(q.UnitId);
|
||||
|
||||
FileStream file = new FileStream(TempletFileName, FileMode.Open, FileAccess.Read);
|
||||
XSSFWorkbook hssfworkbook = new XSSFWorkbook(file);
|
||||
BLL.Common.FastReport.ResetData();
|
||||
|
||||
ICellStyle styleCenter = hssfworkbook.CreateCellStyle();
|
||||
styleCenter.VerticalAlignment = VerticalAlignment.Center;
|
||||
styleCenter.Alignment = HorizontalAlignment.Center;
|
||||
styleCenter.BorderLeft = BorderStyle.Thin;
|
||||
styleCenter.BorderTop = BorderStyle.Thin;
|
||||
styleCenter.BorderRight = BorderStyle.Thin;
|
||||
styleCenter.BorderBottom = BorderStyle.Thin;
|
||||
styleCenter.WrapText = true;
|
||||
XSSFSheet recordSheet = (XSSFSheet)hssfworkbook.GetSheet("管道焊口无损检测结果通知单");
|
||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||
keyValuePairs.Add("projectName", projectName);
|
||||
keyValuePairs.Add("installationName", installationName);
|
||||
keyValuePairs.Add("unitName", unitName);
|
||||
keyValuePairs.Add("NDTTypeCode", this.NDTTypeCode);
|
||||
keyValuePairs.Add("CHT_CheckCode", q.CHT_CheckCode);
|
||||
BLL.Common.FastReport.AddFastreportParameter(keyValuePairs);
|
||||
|
||||
// recordSheet.AddMergedRegion(new CellRangeAddress(0, 0, 8, 9));
|
||||
|
||||
|
||||
recordSheet.GetRow(0).CreateCell(7).SetCellValue(projectName.ToString());
|
||||
recordSheet.GetRow(0).GetCell(7).CellStyle = styleCenter;
|
||||
recordSheet.GetRow(1).CreateCell(7).SetCellValue(installationName);
|
||||
recordSheet.GetRow(1).GetCell(7).CellStyle = styleCenter;
|
||||
recordSheet.GetRow(2).CreateCell(1).SetCellValue(unitName);
|
||||
recordSheet.GetRow(2).GetCell(1).CellStyle = styleCenter;
|
||||
recordSheet.GetRow(2).CreateCell(4).SetCellValue(this.NDTTypeCode);
|
||||
recordSheet.GetRow(2).GetCell(4).CellStyle = styleCenter;
|
||||
recordSheet.GetRow(2).CreateCell(7).SetCellValue(q.CHT_CheckCode);
|
||||
recordSheet.GetRow(2).GetCell(7).CellStyle = styleCenter;
|
||||
|
||||
int i = 0;
|
||||
List<Model.CH_CheckItem> items = BLL.CheckItemManageService.GetTrustItemByCheck(CHT_CheckID);
|
||||
|
||||
|
||||
if (items.Count > 12)
|
||||
{
|
||||
recordSheet.ShiftRows(8, 27, items.Count - 12);
|
||||
for (int j = 0; j < items.Count - 12; j++)
|
||||
string strSql = @"select CH_TrustCode,CHT_CheckCode,checkItem.ISO_IsoNumber,checkItem.JOT_JointNo,checkItem.WelderCode,checkItem.CHT_CheckResult,checkItem.CHT_RepairLocation,DefectLength
|
||||
from View_CH_CheckItem checkItem left join CH_Check chcheck on checkItem.CHT_CheckID=chcheck.CHT_CheckID
|
||||
where checkItem.CHT_CheckID =@CHT_CheckID order by dbo.Fun_GetParseInt(JOT_JointNo)";
|
||||
List<SqlParameter> listpar = new List<SqlParameter>
|
||||
{
|
||||
recordSheet.CopyRow(4 + j, 5 + j);
|
||||
new SqlParameter("@CHT_CheckID", this.CHT_CheckID)
|
||||
};
|
||||
|
||||
SqlParameter[] parameter = listpar.ToArray();
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
if (dt != null)
|
||||
{
|
||||
dt.TableName = "Table1";
|
||||
}
|
||||
}
|
||||
|
||||
BLL.Common.FastReport.AddFastreportTable(dt);
|
||||
|
||||
foreach (var t in items)
|
||||
{
|
||||
var checkItem = BLL.CheckItemManageService.GetTrustItemByCheckItem(t.CHT_CheckItemID);
|
||||
if (checkItem != null)
|
||||
string initTemplatePath = "";
|
||||
string rootPath = Server.MapPath("~/");
|
||||
if (drpPrintType.SelectedValue == BLL.Const.CheckReport1Id)
|
||||
{
|
||||
#region 查找委托中的检测类型并赋给检测类型变量
|
||||
if (!string.IsNullOrEmpty(t.CH_TrustItemID))
|
||||
{
|
||||
var trustId = (from x in Funs.DB.CH_TrustItem where x.CH_TrustItemID == t.CH_TrustItemID select x.CH_TrustID).FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(trustId))
|
||||
{
|
||||
var trust = BLL.TrustManageEditService.GetCH_TrustByID(trustId);
|
||||
if (trust != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(trust.CH_NDTMethod))
|
||||
{
|
||||
var ndtt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(trust.CH_NDTMethod);
|
||||
initTemplatePath = "File\\Fastreport\\管道焊口无损检测结果通知单.frx";
|
||||
}
|
||||
if (drpPrintType.SelectedValue == BLL.Const.CheckReport2Id)
|
||||
{
|
||||
initTemplatePath = "File\\Fastreport\\设备焊口无损检测结果通知单.frx";
|
||||
}
|
||||
if (File.Exists(rootPath + initTemplatePath))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../TrustManage/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
||||
|
||||
}
|
||||
recordSheet.GetRow(i + 4).CreateCell(0).SetCellValue(trust.CH_TrustCode);
|
||||
recordSheet.GetRow(i + 4).GetCell(0).CellStyle = styleCenter;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
// checkItems.Add(checkItem);
|
||||
|
||||
recordSheet.GetRow(i + 4).CreateCell(1).SetCellValue(q.CHT_CheckCode);
|
||||
recordSheet.GetRow(i + 4).GetCell(1).CellStyle = styleCenter;
|
||||
recordSheet.GetRow(i + 4).CreateCell(2).SetCellValue(checkItem.ISO_IsoNumber);
|
||||
recordSheet.GetRow(i + 4).GetCell(2).CellStyle = styleCenter;
|
||||
|
||||
recordSheet.GetRow(i + 4).CreateCell(4).SetCellValue(checkItem.JOT_JointNo);
|
||||
recordSheet.GetRow(i + 4).GetCell(4).CellStyle = styleCenter;
|
||||
|
||||
|
||||
recordSheet.GetRow(i + 4).CreateCell(5).SetCellValue(checkItem.WelderCode);
|
||||
recordSheet.GetRow(i + 4).GetCell(5).CellStyle = styleCenter;
|
||||
|
||||
recordSheet.GetRow(i + 4).CreateCell(6).SetCellValue(checkItem.CHT_CheckResult);
|
||||
recordSheet.GetRow(i + 4).GetCell(6).CellStyle = styleCenter;
|
||||
recordSheet.GetRow(i + 4).CreateCell(7).SetCellValue(checkItem.CHT_RepairLocation);
|
||||
recordSheet.GetRow(i + 4).GetCell(7).CellStyle = styleCenter;
|
||||
|
||||
|
||||
i++;
|
||||
|
||||
}
|
||||
}
|
||||
using (FileStream filess = File.OpenWrite(ReportFileName))
|
||||
{
|
||||
hssfworkbook.Write(filess);
|
||||
}
|
||||
//PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.CurrUser.LoginProjectId)));
|
||||
////varValue = installationName + "|" + unitName + "|" + projectName + "|" + q.PW_PointDate.Value.ToString("yyyy-MM-dd") + "|" + q.PW_PointNo;
|
||||
|
||||
FileInfo filet = new FileInfo(ReportFileName);
|
||||
Response.Clear();
|
||||
Response.Charset = "GB2312";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
// 添加头信息,为"文件下载/另存为"对话框指定默认文件名
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=管道焊口无损检测结果通知单_" + Server.UrlEncode(DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx"));
|
||||
// 添加头信息,指定文件大小,让浏览器能够显示下载进度
|
||||
Response.AddHeader("Content-Length", filet.Length.ToString());
|
||||
// 指定返回的是一个不能被客户端读取的流,必须被下载
|
||||
Response.ContentType = "application/ms-excel";
|
||||
// 把文件流发送到客户端
|
||||
Response.WriteFile(filet.FullName);
|
||||
// 停止页面的执行
|
||||
Response.End();
|
||||
////if (!string.IsNullOrEmpty(varValue))
|
||||
////{
|
||||
//// varValue = Microsoft.JScript.GlobalObject.escape(varValue.Replace("/", ","));
|
||||
////}
|
||||
////PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.CheckReportId, reportId, varValue, this.CurrUser.LoginProjectId)));
|
||||
|
||||
|
||||
//string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
|
||||
////模板文件
|
||||
//string TempletFileName = Server.MapPath("~/") + "File/Excel/HJGL_DataOut/管道焊口无损检测结果通知单.xlsx";
|
||||
////导出文件
|
||||
//string filePath = rootPath + DateTime.Now.ToString("yyyyMMddhhmmss") + "\\";
|
||||
//if (!Directory.Exists(filePath))
|
||||
//{
|
||||
// Directory.CreateDirectory(filePath);
|
||||
//}
|
||||
//string ReportFileName = filePath + "out.xlsx";
|
||||
|
||||
//FileStream file = new FileStream(TempletFileName, FileMode.Open, FileAccess.Read);
|
||||
//XSSFWorkbook hssfworkbook = new XSSFWorkbook(file);
|
||||
|
||||
//ICellStyle styleCenter = hssfworkbook.CreateCellStyle();
|
||||
//styleCenter.VerticalAlignment = VerticalAlignment.Center;
|
||||
//styleCenter.Alignment = HorizontalAlignment.Center;
|
||||
//styleCenter.BorderLeft = BorderStyle.Thin;
|
||||
//styleCenter.BorderTop = BorderStyle.Thin;
|
||||
//styleCenter.BorderRight = BorderStyle.Thin;
|
||||
//styleCenter.BorderBottom = BorderStyle.Thin;
|
||||
//styleCenter.WrapText = true;
|
||||
//XSSFSheet recordSheet = (XSSFSheet)hssfworkbook.GetSheet("管道焊口无损检测结果通知单");
|
||||
|
||||
//// recordSheet.AddMergedRegion(new CellRangeAddress(0, 0, 8, 9));
|
||||
|
||||
|
||||
//recordSheet.GetRow(0).CreateCell(7).SetCellValue(projectName.ToString());
|
||||
//recordSheet.GetRow(0).GetCell(7).CellStyle = styleCenter;
|
||||
//recordSheet.GetRow(1).CreateCell(7).SetCellValue(installationName);
|
||||
//recordSheet.GetRow(1).GetCell(7).CellStyle = styleCenter;
|
||||
//recordSheet.GetRow(2).CreateCell(1).SetCellValue(unitName);
|
||||
//recordSheet.GetRow(2).GetCell(1).CellStyle = styleCenter;
|
||||
//recordSheet.GetRow(2).CreateCell(4).SetCellValue(this.NDTTypeCode);
|
||||
//recordSheet.GetRow(2).GetCell(4).CellStyle = styleCenter;
|
||||
//recordSheet.GetRow(2).CreateCell(7).SetCellValue(q.CHT_CheckCode);
|
||||
//recordSheet.GetRow(2).GetCell(7).CellStyle = styleCenter;
|
||||
|
||||
//int i = 0;
|
||||
//List<Model.CH_CheckItem> items = BLL.CheckItemManageService.GetTrustItemByCheck(CHT_CheckID);
|
||||
|
||||
|
||||
//if (items.Count > 12)
|
||||
//{
|
||||
// recordSheet.ShiftRows(8, 27, items.Count - 12);
|
||||
// for (int j = 0; j < items.Count - 12; j++)
|
||||
// {
|
||||
// recordSheet.CopyRow(4 + j, 5 + j);
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
//foreach (var t in items)
|
||||
//{
|
||||
// var checkItem = BLL.CheckItemManageService.GetTrustItemByCheckItem(t.CHT_CheckItemID);
|
||||
// if (checkItem != null)
|
||||
// {
|
||||
// #region 查找委托中的检测类型并赋给检测类型变量
|
||||
// if (!string.IsNullOrEmpty(t.CH_TrustItemID))
|
||||
// {
|
||||
// var trustId = (from x in Funs.DB.CH_TrustItem where x.CH_TrustItemID == t.CH_TrustItemID select x.CH_TrustID).FirstOrDefault();
|
||||
// if (!string.IsNullOrEmpty(trustId))
|
||||
// {
|
||||
// var trust = BLL.TrustManageEditService.GetCH_TrustByID(trustId);
|
||||
// if (trust != null)
|
||||
// {
|
||||
// if (!string.IsNullOrEmpty(trust.CH_NDTMethod))
|
||||
// {
|
||||
// var ndtt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(trust.CH_NDTMethod);
|
||||
|
||||
// }
|
||||
// recordSheet.GetRow(i + 4).CreateCell(0).SetCellValue(trust.CH_TrustCode);
|
||||
// recordSheet.GetRow(i + 4).GetCell(0).CellStyle = styleCenter;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// #endregion
|
||||
// // checkItems.Add(checkItem);
|
||||
|
||||
// recordSheet.GetRow(i + 4).CreateCell(1).SetCellValue(q.CHT_CheckCode);
|
||||
// recordSheet.GetRow(i + 4).GetCell(1).CellStyle = styleCenter;
|
||||
// recordSheet.GetRow(i + 4).CreateCell(2).SetCellValue(checkItem.ISO_IsoNumber);
|
||||
// recordSheet.GetRow(i + 4).GetCell(2).CellStyle = styleCenter;
|
||||
|
||||
// recordSheet.GetRow(i + 4).CreateCell(4).SetCellValue(checkItem.JOT_JointNo);
|
||||
// recordSheet.GetRow(i + 4).GetCell(4).CellStyle = styleCenter;
|
||||
|
||||
|
||||
// recordSheet.GetRow(i + 4).CreateCell(5).SetCellValue(checkItem.WelderCode);
|
||||
// recordSheet.GetRow(i + 4).GetCell(5).CellStyle = styleCenter;
|
||||
|
||||
// recordSheet.GetRow(i + 4).CreateCell(6).SetCellValue(checkItem.CHT_CheckResult);
|
||||
// recordSheet.GetRow(i + 4).GetCell(6).CellStyle = styleCenter;
|
||||
// recordSheet.GetRow(i + 4).CreateCell(7).SetCellValue(checkItem.CHT_RepairLocation);
|
||||
// recordSheet.GetRow(i + 4).GetCell(7).CellStyle = styleCenter;
|
||||
|
||||
|
||||
// i++;
|
||||
|
||||
// }
|
||||
//}
|
||||
//using (FileStream filess = File.OpenWrite(ReportFileName))
|
||||
//{
|
||||
// hssfworkbook.Write(filess);
|
||||
//}
|
||||
////PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.CurrUser.LoginProjectId)));
|
||||
|
||||
//FileInfo filet = new FileInfo(ReportFileName);
|
||||
//Response.Clear();
|
||||
//Response.Charset = "GB2312";
|
||||
//Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
//// 添加头信息,为"文件下载/另存为"对话框指定默认文件名
|
||||
//Response.AddHeader("Content-Disposition", "attachment; filename=管道焊口无损检测结果通知单_" + Server.UrlEncode(DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx"));
|
||||
//// 添加头信息,指定文件大小,让浏览器能够显示下载进度
|
||||
//Response.AddHeader("Content-Length", filet.Length.ToString());
|
||||
//// 指定返回的是一个不能被客户端读取的流,必须被下载
|
||||
//Response.ContentType = "application/ms-excel";
|
||||
//// 把文件流发送到客户端
|
||||
//Response.WriteFile(filet.FullName);
|
||||
//// 停止页面的执行
|
||||
//Response.End();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
else if (drpPrintType.SelectedValue == BLL.Const.WeldJointCheckReportId)
|
||||
{
|
||||
var q = BLL.CheckManageService.GetCheckByCHT_CheckID(this.CHT_CheckID);
|
||||
string varValue = string.Empty;
|
||||
@@ -772,8 +815,8 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
styleCenter.BorderRight = BorderStyle.Thin;
|
||||
styleCenter.BorderBottom = BorderStyle.Thin;
|
||||
styleCenter.WrapText = true;
|
||||
IFont font= styleCenter.GetFont(hssfworkbook);
|
||||
// font.Color = 10;//颜色
|
||||
IFont font = styleCenter.GetFont(hssfworkbook);
|
||||
// font.Color = 10;//颜色
|
||||
font.FontHeightInPoints = 10;//字体高度(与excel中的字号一致)
|
||||
styleCenter.SetFont(font);
|
||||
XSSFSheet recordSheet = (XSSFSheet)hssfworkbook.GetSheet("管道焊接接头报检检查记录");
|
||||
@@ -795,7 +838,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
int i = 0;
|
||||
List<Model.CH_CheckItem> items = BLL.CheckItemManageService.GetTrustItemByCheck(CHT_CheckID);
|
||||
|
||||
recordSheet.GetRow(3).CreateCell(14).SetCellValue(items.Count+"个");
|
||||
recordSheet.GetRow(3).CreateCell(14).SetCellValue(items.Count + "个");
|
||||
recordSheet.GetRow(3).GetCell(14).CellStyle = styleCenter;
|
||||
if (items.Count > 12)
|
||||
{
|
||||
@@ -819,7 +862,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
var dDetectionRate = Funs.DB.Base_DetectionRate.FirstOrDefault(x => x.DetectionRateId == iso.DetectionRateId);
|
||||
if (dDetectionRate != null)
|
||||
{
|
||||
recordSheet.GetRow(3).CreateCell(18).SetCellValue(dDetectionRate.DetectionRateValue+"%");
|
||||
recordSheet.GetRow(3).CreateCell(18).SetCellValue(dDetectionRate.DetectionRateValue + "%");
|
||||
recordSheet.GetRow(3).GetCell(18).CellStyle = styleCenter;
|
||||
}
|
||||
}
|
||||
@@ -883,14 +926,129 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
Response.End();
|
||||
|
||||
}
|
||||
else if (drpPrintType.SelectedValue == BLL.Const.CheckReport3Id)
|
||||
{
|
||||
|
||||
var q = BLL.CheckManageService.GetCheckByCHT_CheckID(this.CHT_CheckID);
|
||||
string varValue = string.Empty;
|
||||
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
|
||||
var installationName = BLL.Project_InstallationService.GetInstallationByInstallationId(q.InstallationId).InstallationName;
|
||||
var unitName = BLL.UnitService.GetUnitNameByUnitId(q.UnitId);
|
||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||
keyValuePairs.Add("projectName", projectName);
|
||||
keyValuePairs.Add("installationName", installationName);
|
||||
keyValuePairs.Add("conUnit", unitName);
|
||||
var supUnitList = UnitService.GetUnitByProjectIdUnitTypeList(q.ProjectId, Const.ProjectUnitType_3);
|
||||
string supUnitName = "";
|
||||
foreach (var unit in supUnitList)
|
||||
{
|
||||
supUnitName += unit.UnitName + ",";
|
||||
}
|
||||
keyValuePairs.Add("supUnit", supUnitName);
|
||||
var trust = TrustManageEditService.GetCH_TrustByID(q.CH_TrustID);
|
||||
keyValuePairs.Add("checkStandard", trust.CH_NDTCriteria);
|
||||
BLL.Common.FastReport.ResetData();
|
||||
BLL.Common.FastReport.AddFastreportParameter(keyValuePairs);
|
||||
string strSql = @"select ISO_ID ,CH_TrustCode,CHT_CheckCode,checkItem.ISO_IsoNumber,checkItem.JOT_JointNo,checkItem.WelderCode,checkItem.CHT_CheckResult,checkItem.CHT_RepairLocation
|
||||
from View_CH_CheckItem checkItem left join CH_Check chcheck on checkItem.CHT_CheckID=chcheck.CHT_CheckID
|
||||
where checkItem.CHT_CheckID =@CHT_CheckID order by dbo.Fun_GetParseInt(JOT_JointNo)";
|
||||
List<SqlParameter> listpar = new List<SqlParameter>
|
||||
{
|
||||
new SqlParameter("@CHT_CheckID", this.CHT_CheckID)
|
||||
};
|
||||
|
||||
SqlParameter[] parameter = listpar.ToArray();
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
if (dt != null)
|
||||
{
|
||||
dt.TableName = "Table1";
|
||||
}
|
||||
|
||||
|
||||
BLL.Common.FastReport.AddFastreportTable(dt);
|
||||
|
||||
string initTemplatePath = "";
|
||||
string rootPath = Server.MapPath("~/");
|
||||
|
||||
initTemplatePath = "File\\Fastreport\\管道无损检测结果汇总表.frx";
|
||||
|
||||
if (File.Exists(rootPath + initTemplatePath))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../TrustManage/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
||||
|
||||
}
|
||||
}
|
||||
else if (drpPrintType.SelectedValue == BLL.Const.CheckReport4Id)
|
||||
{
|
||||
var q = BLL.CheckManageService.GetCheckByCHT_CheckID(this.CHT_CheckID);
|
||||
string varValue = string.Empty;
|
||||
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
|
||||
var installation = BLL.Project_InstallationService.GetInstallationByInstallationId(q.InstallationId);
|
||||
var unitName = BLL.UnitService.GetUnitNameByUnitId(q.UnitId);
|
||||
var workarea = WorkAreaService.GetWorkAreaByProjectIdAndInstalltionIdAndUnitId(this.CurrUser.LoginProjectId, q.InstallationId, q.UnitId);
|
||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||
keyValuePairs.Add("projectName", projectName);
|
||||
keyValuePairs.Add("install", installation != null ? installation.InstallationName : "");
|
||||
keyValuePairs.Add("conUnit", unitName);
|
||||
keyValuePairs.Add("workarea", workarea != null ? workarea.WorkAreaName : "");
|
||||
var trust = TrustManageEditService.GetCH_TrustByID(q.CH_TrustID);
|
||||
if (trust != null)
|
||||
{
|
||||
keyValuePairs.Add("CH_NDTCriteria", trust.CH_NDTCriteria);//检测标志着
|
||||
|
||||
}
|
||||
var supUnitList = UnitService.GetUnitByProjectIdUnitTypeList(q.ProjectId, Const.ProjectUnitType_3);
|
||||
string supUnitName = "";
|
||||
foreach (var unit in supUnitList)
|
||||
{
|
||||
supUnitName += unit.UnitName + ",";
|
||||
}
|
||||
keyValuePairs.Add("supUnit", supUnitName);
|
||||
|
||||
|
||||
|
||||
BLL.Common.FastReport.ResetData();
|
||||
BLL.Common.FastReport.AddFastreportParameter(keyValuePairs);
|
||||
string strSql = @"select distinct ISO_IsoNo
|
||||
from View_CH_CheckItem checkItem left join CH_Check chcheck on checkItem.CHT_CheckID=chcheck.CHT_CheckID
|
||||
where checkItem.CHT_CheckID =@CHT_CheckID ";
|
||||
List<SqlParameter> listpar = new List<SqlParameter>
|
||||
{
|
||||
new SqlParameter("@CHT_CheckID", this.CHT_CheckID)
|
||||
};
|
||||
|
||||
SqlParameter[] parameter = listpar.ToArray();
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
if (dt != null)
|
||||
{
|
||||
dt.TableName = "Table1";
|
||||
}
|
||||
|
||||
|
||||
BLL.Common.FastReport.AddFastreportTable(dt);
|
||||
|
||||
string initTemplatePath = "";
|
||||
string rootPath = Server.MapPath("~/");
|
||||
|
||||
initTemplatePath = "File\\Fastreport\\管道无损检测数量统计表.frx";
|
||||
|
||||
if (File.Exists(rootPath + initTemplatePath))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../TrustManage/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择要打印的无损检测单!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -7,13 +7,11 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.CheckManage
|
||||
{
|
||||
|
||||
|
||||
public partial class CheckManageAudit
|
||||
{
|
||||
|
||||
namespace FineUIPro.Web.HJGL.CheckManage {
|
||||
|
||||
|
||||
public partial class CheckManageAudit {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ckFind 控件。
|
||||
/// </summary>
|
||||
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ckFind;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckTime 控件。
|
||||
/// </summary>
|
||||
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtCheckTime;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtSearchCode 控件。
|
||||
/// </summary>
|
||||
@@ -85,7 +83,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSearchCode;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
@@ -94,7 +92,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpCheckUnit 控件。
|
||||
/// </summary>
|
||||
@@ -103,7 +101,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCheckUnit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// tvControlItem 控件。
|
||||
/// </summary>
|
||||
@@ -112,7 +110,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Tree tvControlItem;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
@@ -121,7 +119,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar3 控件。
|
||||
/// </summary>
|
||||
@@ -130,7 +128,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar3;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// hdJOTID 控件。
|
||||
/// </summary>
|
||||
@@ -139,7 +137,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdJOTID;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
@@ -148,25 +146,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// drpPrintType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpPrintType;
|
||||
|
||||
/// <summary>
|
||||
/// Button1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button Button1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit 控件。
|
||||
/// </summary>
|
||||
@@ -175,7 +155,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnCancelAudit 控件。
|
||||
/// </summary>
|
||||
@@ -184,7 +164,25 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnCancelAudit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpPrintType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpPrintType;
|
||||
|
||||
/// <summary>
|
||||
/// Button1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button Button1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
@@ -193,7 +191,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckCode 控件。
|
||||
/// </summary>
|
||||
@@ -202,7 +200,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCheckCode;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtUnitName 控件。
|
||||
/// </summary>
|
||||
@@ -211,7 +209,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUnitName;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtInstallationName 控件。
|
||||
/// </summary>
|
||||
@@ -220,7 +218,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtInstallationName;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckType 控件。
|
||||
/// </summary>
|
||||
@@ -229,7 +227,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCheckType;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtTabler 控件。
|
||||
/// </summary>
|
||||
@@ -238,7 +236,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtTabler;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtTableDate 控件。
|
||||
/// </summary>
|
||||
@@ -247,7 +245,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtTableDate;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckDate 控件。
|
||||
/// </summary>
|
||||
@@ -256,7 +254,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtCheckDate;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ddlAuditMan 控件。
|
||||
/// </summary>
|
||||
@@ -265,7 +263,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlAuditMan;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtAuditDate 控件。
|
||||
/// </summary>
|
||||
@@ -274,7 +272,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtAuditDate;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtCheckMan 控件。
|
||||
/// </summary>
|
||||
@@ -283,7 +281,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCheckMan;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtContractualUnits 控件。
|
||||
/// </summary>
|
||||
@@ -292,7 +290,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtContractualUnits;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbtnToTrust 控件。
|
||||
/// </summary>
|
||||
@@ -301,7 +299,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.LinkButton lbtnToTrust;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
@@ -310,7 +308,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtRemark;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
@@ -319,7 +317,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid2 控件。
|
||||
/// </summary>
|
||||
@@ -328,7 +326,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
@@ -337,7 +335,7 @@ namespace FineUIPro.Web.HJGL.CheckManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window3 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -134,8 +134,7 @@
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
|
||||
<Items>
|
||||
<f:TextBox ID="txtValue33" Label="是否需热处理" runat="server" MaxLength="1" LabelWidth="120px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtValue34" Label="热处理编号" runat="server" LabelWidth="120px">
|
||||
@@ -171,9 +170,7 @@
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
|
||||
|
||||
<Items>
|
||||
<f:CheckBox ID="ckAll" runat="server" Checked="true" Text="是否批量修改"></f:CheckBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -19,10 +19,6 @@
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
|
||||
|
||||
|
||||
/*定义父容器*/
|
||||
.content{
|
||||
width: 550px;
|
||||
@@ -56,7 +52,9 @@
|
||||
<f:CheckBox ID="ckUpdate" runat="server" Text="更新导入"></f:CheckBox>
|
||||
<f:Button ID="btnSave" runat="server" Text="保存" ToolTip="审核保存" Icon="SystemSave" OnClick="btnSave_Click"></f:Button>
|
||||
<f:Button ID="btnRefresh" runat="server" ClientIDMode="Static" Text="刷新" Icon="SystemSave" OnClick="btnRefresh_Click" Hidden="true"></f:Button>
|
||||
|
||||
<f:Button ID="btnD" runat="server" Icon="Delete" Text="删除重复焊口" ToolTip="删除临时表中同管线下重复焊口" ConfirmText="删除临时表中重复管线焊口?"
|
||||
ConfirmTarget="Top" OnClick="btnD_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnAllDelete" runat="server" Icon="Delete" Text="删除记录" ToolTip="删除当前人所有临时导入记录" ConfirmText="删除当前人所有临时导入记录?"
|
||||
ConfirmTarget="Top" OnClick="btnAllDelete_Click">
|
||||
</f:Button>
|
||||
@@ -248,11 +246,7 @@
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" Selected="true" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:Label Label="错误记录数" runat="server" ID="lbDataCout" CssClass="Label" LabelAlign="right" LabelWidth="120px"></f:Label>
|
||||
</PageItems>
|
||||
@@ -261,7 +255,7 @@
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="数据信息" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Top" EnableResize="true" runat="server"
|
||||
IsModal="true" Width="1200px" Height="600px">
|
||||
IsModal="true" Width="1200px" Height="620px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" Hidden="true" runat="server" MinHeight="30px"
|
||||
Target="Parent" ShowHeader="false" BodyPadding="0" Margin="0"
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
if (percent == null)
|
||||
{
|
||||
percent = new Dictionary<string, int>();
|
||||
@@ -265,7 +266,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
@@ -275,8 +276,8 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region 文件上传
|
||||
/// <summary>
|
||||
/// 文件上传
|
||||
@@ -345,7 +346,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
//oleDBConn.Close();
|
||||
//oleDBConn.Dispose();
|
||||
//this.AddDatasetToSQL(ds.Tables[0]);
|
||||
DataTable dt = NPOIHelper.ExcelToDataTable1(fileUrl);
|
||||
DataTable dt = NPOIHelper.ExcelToDataTable1(fileUrl);
|
||||
|
||||
this.AddDatasetToSQL(dt);
|
||||
|
||||
@@ -363,6 +364,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
@@ -379,6 +381,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
Response.End();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 将Dataset的数据导入数据库
|
||||
/// <summary>
|
||||
/// 将Dataset的数据导入数据库
|
||||
@@ -502,15 +505,15 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
percent.Add(CurrUser.UserId, 0);
|
||||
|
||||
}
|
||||
PageContext.RegisterStartupScript("printX()");
|
||||
PageContext.RegisterStartupScript("printX()");
|
||||
|
||||
}
|
||||
protected void btnRefresh_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
protected void btnSaveMethod(string LoginProjectId,string UserId, string IsPDMS)
|
||||
|
||||
protected void btnSaveMethod(string LoginProjectId, string UserId, string IsPDMS)
|
||||
{
|
||||
//beginProgress();
|
||||
var units = from x in Funs.DB.Base_Unit
|
||||
@@ -530,7 +533,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
var components = from x in Funs.DB.Base_Components select x;
|
||||
var dns = from x in Funs.DB.Base_DNCompare select x;
|
||||
var dataInTemp = from x in Funs.DB.Sys_DataInTemp
|
||||
where x.ProjectId == LoginProjectId && x.UserId ==UserId && x.Type == IsPDMS
|
||||
where x.ProjectId == LoginProjectId && x.UserId == UserId && x.Type == IsPDMS
|
||||
select x;
|
||||
int okCount = 0;
|
||||
int i = 0;
|
||||
@@ -538,7 +541,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
string erreMessage = "";
|
||||
foreach (var tempData in dataInTemp)
|
||||
{
|
||||
|
||||
|
||||
//if (i % (ir / 100 + 1) == 0 && i < ir && i > 0)
|
||||
//{
|
||||
// setProgress(i / (ir / 100 + 1));
|
||||
@@ -548,11 +551,11 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
//}
|
||||
//i++;
|
||||
if (tempData != null)
|
||||
{
|
||||
i++;
|
||||
{
|
||||
i++;
|
||||
percent[UserId] = (int)(100 * i / ir);
|
||||
string errInfo = string.Empty;
|
||||
var isExitValue = Funs.DB.View_JointInfoAndIsoInfo.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitCode == tempData.Value1
|
||||
var isExitValue = Funs.DB.View_JointInfoAndIsoInfo.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitCode == tempData.Value1
|
||||
&& x.WorkAreaCode == tempData.Value2 && x.ISO_IsoNo == tempData.Value3 && x.JOT_JointNo == tempData.Value4);
|
||||
if (isExitValue == null || this.ckUpdate.Checked)
|
||||
{
|
||||
@@ -562,7 +565,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
isoInfo.Is_Standard = false;
|
||||
if (!string.IsNullOrEmpty(tempData.Value1))
|
||||
{
|
||||
var unit = units.FirstOrDefault(x => x.UnitCode == tempData.Value1 );
|
||||
var unit = units.FirstOrDefault(x => x.UnitCode == tempData.Value1);
|
||||
if (unit == null)
|
||||
{
|
||||
errInfo += "单位代码[" + tempData.Value1 + "]不存在;";
|
||||
@@ -625,7 +628,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
jointInfo.MaterialType = materialType.MaterialTypeId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(tempData.Value8))
|
||||
{
|
||||
jointInfo.Material1 = tempData.Value8;
|
||||
@@ -733,7 +736,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
isoInfo.ISO_DesignTemperature = tempData.Value24;
|
||||
}
|
||||
catch (Exception)
|
||||
@@ -827,10 +830,10 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "焊接区域为必填项;";
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// errInfo += "焊接区域为必填项;";
|
||||
//}
|
||||
if (!string.IsNullOrEmpty(tempData.Value13))
|
||||
{
|
||||
if (tempData.Value13 != "固定" && tempData.Value13 != "活动")
|
||||
@@ -842,10 +845,10 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
jointInfo.JOT_JointAttribute = tempData.Value13;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "焊口属性为必填项;";
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// errInfo += "焊口属性为必填项;";
|
||||
//}
|
||||
if (!string.IsNullOrEmpty(tempData.Value14))
|
||||
{
|
||||
try
|
||||
@@ -997,10 +1000,10 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
jointInfo.JOT_Location = tempData.Value35;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "焊接位置必填项;";
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// errInfo += "焊接位置必填项;";
|
||||
//}
|
||||
if (!string.IsNullOrEmpty(tempData.Value36))
|
||||
{
|
||||
try
|
||||
@@ -1129,7 +1132,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
{
|
||||
isoInfo.ProjectId = this.CurrUser.LoginProjectId;
|
||||
jointInfo.ProjectId = this.CurrUser.LoginProjectId;
|
||||
var isExitISOValue = Funs.DB.View_JointInfoAndIsoInfo.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitCode == tempData.Value1
|
||||
var isExitISOValue = Funs.DB.View_JointInfoAndIsoInfo.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitCode == tempData.Value1
|
||||
&& x.WorkAreaCode == tempData.Value2 && x.ISO_IsoNo == tempData.Value3);
|
||||
if (isExitISOValue != null) ///管线已存在
|
||||
{
|
||||
@@ -1143,7 +1146,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
jointInfo.ISO_ID = isoInfo.ISO_ID;
|
||||
BLL.PW_IsoInfoService.AddIsoInfo(isoInfo);
|
||||
}
|
||||
var isExitJotNoValue = Funs.DB.View_JointInfoAndIsoInfo.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitCode == tempData.Value1
|
||||
var isExitJotNoValue = Funs.DB.View_JointInfoAndIsoInfo.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitCode == tempData.Value1
|
||||
&& x.WorkAreaCode == tempData.Value2 && x.ISO_IsoNo == tempData.Value3 && x.JOT_JointNo == tempData.Value4 && x.JOT_JointStatus != "104");
|
||||
if (isExitJotNoValue == null)
|
||||
{
|
||||
@@ -1271,8 +1274,8 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
}
|
||||
#endregion
|
||||
|
||||
public static Dictionary<string,int> percent { get; set; }
|
||||
public static Dictionary<string,string >url { get; set; }
|
||||
public static Dictionary<string, int> percent { get; set; }
|
||||
public static Dictionary<string, string> url { get; set; }
|
||||
|
||||
[System.Web.Services.WebMethod]
|
||||
public static int getPercent(string id)
|
||||
@@ -1280,6 +1283,27 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
return percent[id];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnD_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
int count = 0;
|
||||
var getD = db.Sys_DataInTemp.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.ToopValue == "该条记录已存在于管线、焊口信息表中。");
|
||||
if (getD.Count() > 0)
|
||||
{
|
||||
count = getD.Count();
|
||||
db.Sys_DataInTemp.DeleteAllOnSubmit(getD);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
this.BindGrid();
|
||||
ShowNotify("删除成功!"+count.ToString(), MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+40
-33
@@ -7,13 +7,11 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.DataIn
|
||||
{
|
||||
|
||||
|
||||
public partial class DataInTable
|
||||
{
|
||||
|
||||
namespace FineUIPro.Web.HJGL.DataIn {
|
||||
|
||||
|
||||
public partial class DataInTable {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// id 控件。
|
||||
/// </summary>
|
||||
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField id;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// FileExcel 控件。
|
||||
/// </summary>
|
||||
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FileUpload FileExcel;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// imgbtnImport 控件。
|
||||
/// </summary>
|
||||
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button imgbtnImport;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
@@ -85,7 +83,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ckUpdate 控件。
|
||||
/// </summary>
|
||||
@@ -94,7 +92,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckUpdate;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
@@ -103,7 +101,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnRefresh 控件。
|
||||
/// </summary>
|
||||
@@ -112,7 +110,16 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnRefresh;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnD 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnD;
|
||||
|
||||
/// <summary>
|
||||
/// btnAllDelete 控件。
|
||||
/// </summary>
|
||||
@@ -121,7 +128,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAllDelete;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
@@ -130,7 +137,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// imgbtnUpload 控件。
|
||||
/// </summary>
|
||||
@@ -139,7 +146,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button imgbtnUpload;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lkAchievements 控件。
|
||||
/// </summary>
|
||||
@@ -148,7 +155,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button lkAchievements;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
@@ -157,7 +164,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
@@ -166,7 +173,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
@@ -175,7 +182,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
@@ -184,7 +191,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbDataCout 控件。
|
||||
/// </summary>
|
||||
@@ -193,7 +200,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbDataCout;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
@@ -202,7 +209,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
@@ -211,7 +218,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel3 控件。
|
||||
/// </summary>
|
||||
@@ -220,7 +227,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel3;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
@@ -229,7 +236,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
@@ -238,7 +245,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
@@ -247,7 +254,7 @@ namespace FineUIPro.Web.HJGL.DataIn
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ScriptManager2 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -27,11 +27,19 @@
|
||||
<f:Button ID="btnNew" Text="增加" ToolTip="增加" Icon="Add" EnablePostBack="true"
|
||||
runat="server" OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="labNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="110px" ColumnID="WED_Code" DataField="WED_Code" FieldType="String"
|
||||
HeaderText="代号" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
@@ -62,11 +70,7 @@
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
@@ -86,7 +90,7 @@
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
<f:Window ID="WindowAtt" Title="附件" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
@@ -103,4 +107,4 @@
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Text;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PersonManage
|
||||
{
|
||||
@@ -17,7 +18,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
@@ -239,7 +240,6 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
object[] keys = Grid1.DataKeys[e.RowIndex];
|
||||
@@ -257,9 +257,27 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}",
|
||||
-1, fileId, Const.NDTPersonRegisterMenuId)));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("无损检测人员登记表" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = Encoding.UTF8;
|
||||
this.Grid1.PageSize = this.Grid1.RecordCount;
|
||||
this.BindGrid();
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -7,13 +7,11 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PersonManage
|
||||
{
|
||||
|
||||
|
||||
public partial class NDTPersonRegister
|
||||
{
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PersonManage {
|
||||
|
||||
|
||||
public partial class NDTPersonRegister {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
@@ -76,7 +74,25 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// labNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label labNumber;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
@@ -85,7 +101,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
@@ -94,7 +110,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
@@ -103,7 +119,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
@@ -112,7 +128,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
@@ -121,7 +137,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
@@ -130,7 +146,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
@@ -139,7 +155,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -22,35 +22,44 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnitId" runat="server" Label="单位" EnableEdit="true" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="drpUnitId_SelectedIndexChanged" Width="300px"></f:DropDownList>
|
||||
<f:DropDownList ID="drpTeamGroupId" runat="server" Label="班组" EnableEdit="true" LabelAlign="Right" Width="300px"></f:DropDownList>
|
||||
<f:DropDownList ID="drpUnitId" runat="server" Label="单位" EnableEdit="true"
|
||||
LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="drpUnitId_SelectedIndexChanged"
|
||||
Width="220px" LabelWidth="80px"></f:DropDownList>
|
||||
<f:DropDownList ID="drpTeamGroupId" runat="server" Label="班组" EnableEdit="true"
|
||||
LabelAlign="Right" Width="220px" LabelWidth="80px"></f:DropDownList>
|
||||
<f:TextBox ID="txtWelderCode" runat="server" Label="焊工代号" EmptyText="输入查询条件"
|
||||
LabelAlign="Right" Width="300px">
|
||||
LabelAlign="Right" Width="220px" LabelWidth="80px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtWelderName" runat="server" Label="焊工姓名" EmptyText="输入查询条件"
|
||||
LabelAlign="Right" Width="300px">
|
||||
LabelAlign="Right" Width="220px" LabelWidth="80px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtWorkCodeS" runat="server" Label="上岗证号"
|
||||
EmptyText="输入查询条件" LabelAlign="Right" Width="220px" LabelWidth="80px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar2" runat="server">
|
||||
<Items>
|
||||
<f:TextBox ID="txtWorkCodeS" runat="server" Label="上岗证号" EmptyText="输入查询条件" LabelAlign="Right" Width="300px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtClassS" runat="server" Label="焊工等级" EmptyText="输入查询条件" LabelAlign="Right" Width="300px">
|
||||
<f:TextBox ID="txtClassS" runat="server" Label="焊工等级"
|
||||
EmptyText="输入查询条件" LabelAlign="Right" Width="220px" LabelWidth="80px">
|
||||
</f:TextBox>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnQuery" Text="查询" ToolTip="查询" Icon="SystemSearch"
|
||||
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" Text="增加" ToolTip="增加" Icon="Add" EnablePostBack="true"
|
||||
runat="server" OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="labNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="300px" ColumnID="UnitName" DataField="UnitName" FieldType="String"
|
||||
HeaderText="单位" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
|
||||
@@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Text;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PersonManage
|
||||
{
|
||||
@@ -18,8 +19,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
|
||||
Funs.FineUIPleaseSelect(drpTeamGroupId);
|
||||
|
||||
@@ -361,5 +361,24 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_WelderManageMenuId, button);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("焊工信息表" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = Encoding.UTF8;
|
||||
this.Grid1.PageSize = this.Grid1.RecordCount;
|
||||
this.BindGrid();
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+27
-18
@@ -93,15 +93,6 @@ namespace FineUIPro.Web.HJGL.PersonManage {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWelderName;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// txtWorkCodeS 控件。
|
||||
/// </summary>
|
||||
@@ -120,15 +111,6 @@ namespace FineUIPro.Web.HJGL.PersonManage {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtClassS;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
@@ -138,6 +120,15 @@ namespace FineUIPro.Web.HJGL.PersonManage {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
@@ -147,6 +138,24 @@ namespace FineUIPro.Web.HJGL.PersonManage {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// labNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label labNumber;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -1000,6 +1000,11 @@ namespace FineUIPro.Web.HJGL.RepairManage
|
||||
/// <param name="e"></param>
|
||||
protected void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.tvControlItem.SelectedNode == null || string.IsNullOrEmpty(this.tvControlItem.SelectedNode.NodeID))
|
||||
{
|
||||
Alert.ShowInParent("请选择要打印单据!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string reportId = this.tvControlItem.SelectedNode.NodeID;
|
||||
var q = BLL.TrustManageEditService.GetCH_TrustByID(reportId);
|
||||
if (q != null)
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
|
||||
{
|
||||
ReportPath = Request.Params["ReportPath"];
|
||||
WebReport1.StartReport += WebReport1_StartReport;
|
||||
if (dataTables.Count > 0)
|
||||
if (dataTables!=null&&dataTables.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < dataTables.Count; i++)
|
||||
{
|
||||
|
||||
@@ -48,14 +48,18 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:Button ID="btnAudit" ToolTip="审核" Icon="TableKey" runat="server" EnablePostBack="true" OnClick="btnAudit_Click" Hidden="true"
|
||||
<f:Button ID="btnAudit" ToolTip="审核" Icon="TableKey" runat="server" Text="审核"
|
||||
EnablePostBack="true" OnClick="btnAudit_Click" Hidden="true"
|
||||
>
|
||||
</f:Button>
|
||||
<f:Button ID="btnCancelAudit" ToolTip="取消审核" Icon="ArrowUndo" runat="server" EnablePostBack="true" OnClick="btnCancelAudit_Click"
|
||||
<f:Button ID="btnCancelAudit" ToolTip="取消审核" Icon="ArrowUndo" Text="取消审核"
|
||||
runat="server" EnablePostBack="true" OnClick="btnCancelAudit_Click"
|
||||
Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPrint" runat="server" Icon="Printer" ToolTip="管道焊口打印" EnableAjax="false" OnClick="btnPrint_Click"></f:Button>
|
||||
<f:Button ID="Button1" runat="server" Icon="Printer" ToolTip="设备焊口打印" EnableAjax="false" OnClick="btnPrint1_Click"></f:Button>
|
||||
<f:Button ID="btnPrint" runat="server" Icon="Printer" ToolTip="管道焊口打印" Text="管道焊口"
|
||||
EnableAjax="false" OnClick="btnPrint_Click"></f:Button>
|
||||
<f:Button ID="Button1" runat="server" Icon="Printer" ToolTip="设备焊口打印" Text="设备焊口"
|
||||
EnableAjax="false" OnClick="btnPrint1_Click"></f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -39,19 +39,19 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server"
|
||||
<f:Button ID="btnNew" ToolTip="新增" Text="新增" Icon="Add" EnablePostBack="false" runat="server"
|
||||
>
|
||||
</f:Button>
|
||||
<f:Button ID="btnEdit" ToolTip="编辑" Icon="BulletEdit" runat="server" EnablePostBack="true" OnClick="btnEdit_Click"
|
||||
<f:Button ID="btnEdit" ToolTip="编辑" Text="编辑" Icon="BulletEdit" runat="server" EnablePostBack="true" OnClick="btnEdit_Click"
|
||||
>
|
||||
</f:Button>
|
||||
<f:Button ID="btnDelete" ToolTip="删除" Icon="Delete" runat="server" ConfirmText="删除选中记录?" ConfirmTarget="Top"
|
||||
<f:Button ID="btnDelete" ToolTip="删除" Text="删除" Icon="Delete" runat="server" ConfirmText="删除选中记录?" ConfirmTarget="Top"
|
||||
EnablePostBack="true" OnClick="btnDelete_Click" >
|
||||
</f:Button>
|
||||
<f:Button ID="btnPrint" runat="server" Icon="Printer" EnablePostBack="true" EnableAjax="false" ToolTip="管道焊口打印" OnClick="btnPrint_Click" DisableControlBeforePostBack="false">
|
||||
<f:Button ID="btnPrint" runat="server" Icon="Printer" EnablePostBack="true" Text="管道" ToolTip="管道焊口打印" OnClick="btnPrint_Click" DisableControlBeforePostBack="false">
|
||||
|
||||
</f:Button>
|
||||
<f:Button ID="Button1" runat="server" Icon="Printer" EnablePostBack="true" EnableAjax="false" ToolTip="设备焊口打印" OnClick="btnPrint1_Click" DisableControlBeforePostBack="false">
|
||||
<f:Button ID="Button1" runat="server" Icon="Printer" EnablePostBack="true" Text="设备" ToolTip="设备焊口打印" OnClick="btnPrint1_Click" DisableControlBeforePostBack="false">
|
||||
|
||||
</f:Button>
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
|
||||
var days = (from x in Funs.DB.CH_Trust
|
||||
where x.InstallationId == e.Node.ParentNode.NodeID.Split('|')[1]
|
||||
&& x.CH_TrustUnit == e.Node.ParentNode.ParentNode.NodeID
|
||||
&& x.CH_TrustDate >= startDate && x.CH_TrustDate < endDate
|
||||
&& x.CH_TrustDate >= startDate && x.CH_TrustDate < endDate && x.CH_TrustType == "1"
|
||||
orderby x.CH_TrustDate
|
||||
select x.CH_TrustDate).Distinct();
|
||||
foreach (var day in days)
|
||||
@@ -173,7 +173,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
|
||||
var trusts = from x in Funs.DB.CH_Trust
|
||||
where x.InstallationId.ToString() == e.Node.ParentNode.ParentNode.NodeID.Split('|')[1]
|
||||
&& x.CH_TrustUnit == e.Node.ParentNode.ParentNode.ParentNode.NodeID
|
||||
&& x.CH_TrustDate == Convert.ToDateTime(e.Node.NodeID.Split('|')[3])
|
||||
&& x.CH_TrustDate == Convert.ToDateTime(e.Node.NodeID.Split('|')[3]) && x.CH_TrustType=="1"
|
||||
orderby x.CH_TrustCode
|
||||
select x;
|
||||
foreach (var trust in trusts)
|
||||
@@ -647,7 +647,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
|
||||
|
||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||
keyValuePairs.Add("CH_TrustID", reportId);
|
||||
keyValuePairs.Add("totalUnit", "中国成达工程有限公司");
|
||||
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());
|
||||
@@ -852,7 +852,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
|
||||
// recordSheet.GetRow(20 + tb.Rows.Count - 16).GetCell(0).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(unit.UnitId).ToString());
|
||||
|
||||
// }
|
||||
// recordSheet.GetRow(20 + tb.Rows.Count - 16).GetCell(2).SetCellValue("中国成达工程有限公司");
|
||||
// recordSheet.GetRow(20 + tb.Rows.Count - 16).GetCell(2).SetCellValue("中国天辰工程有限公司");
|
||||
// if (!string.IsNullOrEmpty(trust.CH_TrustUnit))
|
||||
// {
|
||||
// recordSheet.GetRow(20 + tb.Rows.Count - 16).GetCell(5).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(trust.CH_TrustUnit).ToString());
|
||||
@@ -873,7 +873,444 @@ namespace FineUIPro.Web.HJGL.TrustManage
|
||||
// recordSheet.GetRow(20).GetCell(0).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(unit.UnitId).ToString());
|
||||
|
||||
// }
|
||||
// recordSheet.GetRow(20).GetCell(2).SetCellValue("中国成达工程有限公司");
|
||||
// recordSheet.GetRow(20).GetCell(2).SetCellValue("中国天辰工程有限公司");
|
||||
|
||||
// if (!string.IsNullOrEmpty(trust.CH_TrustUnit))
|
||||
// {
|
||||
// recordSheet.GetRow(20).GetCell(5).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(trust.CH_TrustUnit).ToString());
|
||||
|
||||
// }
|
||||
|
||||
// if (!string.IsNullOrEmpty(trust.CH_CheckUnit))
|
||||
// {
|
||||
// recordSheet.GetRow(20).GetCell(7).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(trust.CH_CheckUnit).ToString());
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
// for (int i = 0; i < tb.Rows.Count; i++)
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// recordSheet.GetRow(8 + i).GetCell(0).SetCellValue("" + (i + 1));
|
||||
// recordSheet.GetRow(8 + i).GetCell(1).SetCellValue(tb.Rows[i]["ISO_IsoNo"] != null ? tb.Rows[i]["ISO_IsoNo"].ToString() : "");
|
||||
// recordSheet.GetRow(8 + i).GetCell(2).SetCellValue(tb.Rows[i]["ISO_IsoNumber"] != null ? tb.Rows[i]["ISO_IsoNumber"].ToString() : "");
|
||||
// recordSheet.GetRow(8 + i).GetCell(3).SetCellValue(tb.Rows[i]["JOT_JointNo"] != null ? tb.Rows[i]["JOT_JointNo"].ToString() : "");
|
||||
// //recordSheet.GetRow(7 + i).GetCell(4).SetCellValue(tb.Rows[i]["ISO_IsoNumber"] != null ? tb.Rows[i]["ISO_IsoNumber"].ToString() : "");
|
||||
// recordSheet.GetRow(8 + i).GetCell(7).SetCellValue(tb.Rows[i]["STE_Name1"] != null ? tb.Rows[i]["STE_Name1"].ToString() : "");
|
||||
// recordSheet.GetRow(8 + i).GetCell(6).SetCellValue(tb.Rows[i]["JOT_JointDesc"] != null ? tb.Rows[i]["JOT_JointDesc"].ToString() : "");
|
||||
|
||||
// string WED_Name = "";
|
||||
// if (!string.IsNullOrEmpty(tb.Rows[i]["WED_Code1"].ToString()))
|
||||
// WED_Name += tb.Rows[i]["WED_Code1"].ToString();
|
||||
|
||||
// if (!string.IsNullOrEmpty(tb.Rows[i]["WED_Code2"].ToString()) && WED_Name != tb.Rows[i]["WED_Code2"].ToString())
|
||||
// WED_Name += " " + tb.Rows[i]["WED_Code2"].ToString();
|
||||
// recordSheet.GetRow(8 + i).GetCell(5).SetCellValue(WED_Name);
|
||||
|
||||
// }
|
||||
// catch (Exception)
|
||||
// {
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
// using (FileStream filess = File.OpenWrite(ReportFileName))
|
||||
// {
|
||||
// hssfworkbook.Write(filess);
|
||||
// }
|
||||
// //PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.CurrUser.LoginProjectId)));
|
||||
|
||||
// FileInfo filet = new FileInfo(ReportFileName);
|
||||
// Response.Clear();
|
||||
// Response.Charset = "GB2312";
|
||||
// Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
// // 添加头信息,为"文件下载/另存为"对话框指定默认文件名
|
||||
// Response.AddHeader("Content-Disposition", "attachment; filename=管道焊口检测委托单_" + Server.UrlEncode(DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx"));
|
||||
// // 添加头信息,指定文件大小,让浏览器能够显示下载进度
|
||||
// Response.AddHeader("Content-Length", filet.Length.ToString());
|
||||
// // 指定返回的是一个不能被客户端读取的流,必须被下载
|
||||
// Response.ContentType = "application/ms-excel";
|
||||
// // 把文件流发送到客户端
|
||||
// Response.WriteFile(filet.FullName);
|
||||
// // 停止页面的执行
|
||||
// Response.End();
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择要打印的委托单!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
protected void btnPrint1_Click(object sender, EventArgs e)
|
||||
{
|
||||
// string reportId = this.tvControlItem.SelectedNode.NodeID;
|
||||
// var trust = BLL.TrustManageEditService.GetCH_TrustByID(reportId);
|
||||
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;
|
||||
var trust = BLL.TrustManageEditService.GetCH_TrustByID(reportId);
|
||||
if (trust != null)
|
||||
{
|
||||
string varValue = string.Empty;
|
||||
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
|
||||
var installation = BLL.Project_InstallationService.GetInstallationByInstallationId(trust.InstallationId);
|
||||
|
||||
dr["ProjectName"] = projectName;
|
||||
if (!string.IsNullOrEmpty(trust.CH_CheckUnit))
|
||||
{
|
||||
dr["CH_CheckUnit"] = BLL.UnitService.GetUnitNameByUnitId(trust.CH_CheckUnit).ToString();
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trust.CH_TrustMan))
|
||||
{
|
||||
dr["CH_TrustMan"] = BLL.UserService.GetUserNameByUserId(trust.CH_TrustMan);
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trust.CH_TrustCode))
|
||||
{
|
||||
dr["CH_TrustCode"] = trust.CH_TrustCode;
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trust.CH_NDTCriteria))
|
||||
{
|
||||
dr["CH_NDTCriteria"] = trust.CH_NDTCriteria;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trust.CH_WeldMethod))
|
||||
{
|
||||
var type = BLL.Base_WeldingMethodService.GetWeldingMethodByWeldingMethodId(trust.CH_WeldMethod);
|
||||
|
||||
if (type != null)
|
||||
{
|
||||
dr["CH_WeldMethod"] = type.WeldingMethodName;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(trust.CH_AcceptGrade))
|
||||
{
|
||||
|
||||
var list = BLL.TrustManageEditService.GetAcceptGradeList();
|
||||
var grade = list.FirstOrDefault(x => x.Value == trust.CH_AcceptGrade);
|
||||
if (grade != null)
|
||||
{
|
||||
dr["CH_AcceptGrade"] = grade.Text;
|
||||
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trust.CH_NDTMethod))
|
||||
{
|
||||
var type = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(trust.CH_NDTMethod);
|
||||
|
||||
if (type != null)
|
||||
{
|
||||
dr["CH_NDTMethod"] = type.DetectionTypeName;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trust.CH_NDTRate))
|
||||
{
|
||||
var list = BLL.Base_DetectionRateService.GetNDTRateNameList();
|
||||
var rate = list.FirstOrDefault(x => x.Value == trust.CH_NDTRate);
|
||||
if (rate != null)
|
||||
{
|
||||
dr["CH_NDTRate"] = rate.Text;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(trust.CH_SlopeType))
|
||||
{
|
||||
var type = BLL.Base_GrooveTypeService.GetGrooveTypeByGrooveTypeId(trust.CH_SlopeType);
|
||||
if (type != null)
|
||||
{
|
||||
dr["CH_SlopeType"] = type.GrooveTypeName;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
string strSql = @"SELECT *
|
||||
FROM dbo.View_CH_TrustItem jot
|
||||
WHERE CH_TrustID=@CH_TrustID";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@CH_TrustID", tvControlItem.SelectedNodeID));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
if (tb.Rows.Count > 0 && tb.Rows[0]["WorkAreaId"] != null)
|
||||
{
|
||||
|
||||
var PworkArea = Funs.DB.ProjectData_WorkArea.FirstOrDefault(x => x.WorkAreaId == tb.Rows[0]["WorkAreaId"].ToString());
|
||||
if (PworkArea != null)
|
||||
{
|
||||
//var cel = recordSheet.GetRow(3).CreateCell(1);
|
||||
//cel.SetCellValue(PworkArea.WorkAreaCode);
|
||||
//cel.CellStyle = styleCenter;
|
||||
dr["WorkAreaName"] = PworkArea.WorkAreaName;
|
||||
dr["WorkAreaCode"] = PworkArea.WorkAreaCode;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
dt.Rows.Add(dr);
|
||||
|
||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||
keyValuePairs.Add("CH_TrustID", reportId);
|
||||
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());
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trust.CH_CheckUnit))
|
||||
{
|
||||
keyValuePairs.Add("CheckUnit", BLL.UnitService.GetUnitNameByUnitId(trust.CH_CheckUnit).ToString());
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trust.CH_TrustUnit))
|
||||
{
|
||||
keyValuePairs.Add("ConUnit", BLL.UnitService.GetUnitNameByUnitId(trust.CH_TrustUnit).ToString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
BLL.Common.FastReport.ResetData();
|
||||
BLL.Common.FastReport.AddFastreportTable(dt);
|
||||
BLL.Common.FastReport.AddFastreportParameter(keyValuePairs);
|
||||
|
||||
// Session["Table"] = dt;
|
||||
// Session["CH_TrustID"] = reportId;
|
||||
string initTemplatePath = "";
|
||||
string rootPath = Server.MapPath("~/");
|
||||
var sysSet = Funs.DB.Project_Sys_Set.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.SetId == "3").FirstOrDefault();
|
||||
if (sysSet != null && sysSet.IsAuto.HasValue && sysSet.IsAuto.Value)
|
||||
{
|
||||
initTemplatePath = "File\\Fastreport\\设备焊口检测委托单NoPic.frx";
|
||||
}
|
||||
else
|
||||
{
|
||||
initTemplatePath = "File\\Fastreport\\设备焊口检测委托单.frx";
|
||||
}
|
||||
if (File.Exists(rootPath + initTemplatePath))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("./Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
||||
|
||||
|
||||
}
|
||||
//if (trust != null)
|
||||
//{
|
||||
// string varValue = string.Empty;
|
||||
// var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
|
||||
// var installation = BLL.Project_InstallationService.GetInstallationByInstallationId(trust.InstallationId);
|
||||
|
||||
|
||||
// string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
|
||||
// //模板文件
|
||||
// string TempletFileName = Server.MapPath("~/") + "File/Excel/HJGL_DataOut/管道焊口检测委托单.xlsx";
|
||||
// //导出文件
|
||||
// string filePath = rootPath + DateTime.Now.ToString("yyyyMMddhhmmss") + "\\";
|
||||
// if (!Directory.Exists(filePath))
|
||||
// {
|
||||
// Directory.CreateDirectory(filePath);
|
||||
// }
|
||||
// string ReportFileName = filePath + "out.xlsx";
|
||||
|
||||
// FileStream file = new FileStream(TempletFileName, FileMode.Open, FileAccess.Read);
|
||||
// XSSFWorkbook hssfworkbook = new XSSFWorkbook(file);
|
||||
|
||||
// ICellStyle styleCenter = hssfworkbook.CreateCellStyle();
|
||||
// styleCenter.VerticalAlignment = VerticalAlignment.Center;
|
||||
// styleCenter.Alignment = HorizontalAlignment.Center;
|
||||
// styleCenter.BorderLeft = BorderStyle.Thin;
|
||||
// styleCenter.BorderTop = BorderStyle.Thin;
|
||||
// styleCenter.BorderRight = BorderStyle.Thin;
|
||||
// styleCenter.BorderBottom = BorderStyle.Thin;
|
||||
// styleCenter.WrapText = true;
|
||||
// IFont font = styleCenter.GetFont(hssfworkbook);
|
||||
// font.Color = 10;//颜色
|
||||
// font.FontHeightInPoints = 10;//字体高度(与excel中的字号一致)
|
||||
// styleCenter.SetFont(font);
|
||||
// XSSFSheet recordSheet = (XSSFSheet)hssfworkbook.GetSheet("管道焊口检测委托单");
|
||||
|
||||
// // recordSheet.AddMergedRegion(new CellRangeAddress(0, 0, 8, 9));
|
||||
|
||||
|
||||
// recordSheet.GetRow(1).CreateCell(8).SetCellValue(projectName.ToString());
|
||||
// recordSheet.GetRow(1).GetCell(8).CellStyle = styleCenter;
|
||||
// //recordSheet.GetRow(1).CreateCell(8).SetCellValue(installation.InstallationName);
|
||||
// //recordSheet.GetRow(1).GetCell(8).CellStyle = styleCenter;
|
||||
// if (!string.IsNullOrEmpty(trust.CH_CheckUnit))
|
||||
// {
|
||||
// // recordSheet.AddMergedRegion(new CellRangeAddress(2, 2, 1, 2));
|
||||
// var cel = recordSheet.GetRow(3).CreateCell(1);
|
||||
// cel.SetCellValue(BLL.UnitService.GetUnitNameByUnitId(trust.CH_CheckUnit).ToString());
|
||||
// cel.CellStyle = styleCenter;
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(trust.CH_TrustMan))
|
||||
// {
|
||||
// var cel = recordSheet.GetRow(3).CreateCell(5);
|
||||
// cel.SetCellValue(BLL.UserService.GetUserNameByUserId(trust.CH_TrustMan));
|
||||
// cel.CellStyle = styleCenter;
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(trust.CH_TrustCode))
|
||||
// {
|
||||
// var cel = recordSheet.GetRow(3).CreateCell(7);
|
||||
// cel.SetCellValue(trust.CH_TrustCode);
|
||||
// cel.CellStyle = styleCenter;
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(trust.CH_NDTCriteria))
|
||||
// {
|
||||
// var cel = recordSheet.GetRow(4).CreateCell(7);
|
||||
// cel.SetCellValue(trust.CH_NDTCriteria);
|
||||
// cel.CellStyle = styleCenter;
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(trust.CH_WeldMethod))
|
||||
// {
|
||||
// var type = BLL.Base_WeldingMethodService.GetWeldingMethodByWeldingMethodId(trust.CH_WeldMethod);
|
||||
|
||||
// var cel = recordSheet.GetRow(5).CreateCell(5);
|
||||
// if (type != null)
|
||||
// {
|
||||
// cel.SetCellValue(type.WeldingMethodName);
|
||||
// }
|
||||
// cel.CellStyle = styleCenter;
|
||||
// }
|
||||
|
||||
|
||||
// if (!string.IsNullOrEmpty(trust.CH_AcceptGrade))
|
||||
// {
|
||||
// var list = BLL.TrustManageEditService.GetAcceptGradeList();
|
||||
// var grade = list.FirstOrDefault(x => x.Value == trust.CH_AcceptGrade);
|
||||
// var cel = recordSheet.GetRow(5).CreateCell(7);
|
||||
// if (grade != null)
|
||||
// {
|
||||
// cel.SetCellValue(grade.Text);
|
||||
// }
|
||||
// cel.CellStyle = styleCenter;
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(trust.CH_NDTMethod))
|
||||
// {
|
||||
// var type = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(trust.CH_NDTMethod);
|
||||
// var cel = recordSheet.GetRow(6).CreateCell(1);
|
||||
|
||||
// if (type != null)
|
||||
// {
|
||||
// cel.SetCellValue(type.DetectionTypeName);
|
||||
// }
|
||||
// cel.CellStyle = styleCenter;
|
||||
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(trust.CH_NDTRate))
|
||||
// {
|
||||
// var list = BLL.Base_DetectionRateService.GetNDTRateNameList();
|
||||
// var rate = list.FirstOrDefault(x => x.Value == trust.CH_NDTRate);
|
||||
// var cel = recordSheet.GetRow(6).CreateCell(7);
|
||||
// if (rate != null)
|
||||
// {
|
||||
// cel.SetCellValue(rate.Text);
|
||||
// }
|
||||
// cel.CellStyle = styleCenter;
|
||||
|
||||
// }
|
||||
|
||||
// if (!string.IsNullOrEmpty(trust.CH_SlopeType))
|
||||
// {
|
||||
// var type = BLL.Base_GrooveTypeService.GetGrooveTypeByGrooveTypeId(trust.CH_SlopeType);
|
||||
// var cel = recordSheet.GetRow(6).CreateCell(5);
|
||||
// if (type != null)
|
||||
// {
|
||||
// cel.SetCellValue(type.GrooveTypeName);
|
||||
// }
|
||||
// cel.CellStyle = styleCenter;
|
||||
// }
|
||||
|
||||
// string strSql = @"SELECT *
|
||||
// FROM dbo.View_CH_TrustItem jot
|
||||
// WHERE CH_TrustID=@CH_TrustID";
|
||||
// List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
// listStr.Add(new SqlParameter("@CH_TrustID", tvControlItem.SelectedNodeID));
|
||||
// SqlParameter[] parameter = listStr.ToArray();
|
||||
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// if (tb.Rows.Count > 0 && tb.Rows[0]["WorkAreaId"] != null)
|
||||
// {
|
||||
|
||||
// var PworkArea = Funs.DB.ProjectData_WorkArea.FirstOrDefault(x => x.WorkAreaId == tb.Rows[0]["WorkAreaId"].ToString());
|
||||
// if (PworkArea != null)
|
||||
// {
|
||||
// //var cel = recordSheet.GetRow(3).CreateCell(1);
|
||||
// //cel.SetCellValue(PworkArea.WorkAreaCode);
|
||||
// //cel.CellStyle = styleCenter;
|
||||
|
||||
// recordSheet.GetRow(2).CreateCell(8).SetCellValue(PworkArea.WorkAreaName);
|
||||
// recordSheet.GetRow(2).GetCell(8).CellStyle = styleCenter;
|
||||
// recordSheet.GetRow(4).CreateCell(1).SetCellValue(PworkArea.WorkAreaCode);
|
||||
// recordSheet.GetRow(4).GetCell(1).CellStyle = styleCenter;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// if (tb.Rows.Count > 16)
|
||||
// {
|
||||
// recordSheet.ShiftRows(9, 28, tb.Rows.Count - 16);
|
||||
// for (int j = 0; j < tb.Rows.Count - 16; j++)
|
||||
// {
|
||||
// recordSheet.CopyRow(8 + j, 9 + j);
|
||||
// }
|
||||
// var unit = Funs.DB.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == trust.ProjectId && x.UnitType == Const.ProjectUnitType_3);
|
||||
// if (unit != null && !string.IsNullOrEmpty(unit.UnitId))
|
||||
// {
|
||||
// recordSheet.GetRow(20 + tb.Rows.Count - 16).GetCell(0).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(unit.UnitId).ToString());
|
||||
|
||||
// }
|
||||
// recordSheet.GetRow(20 + tb.Rows.Count - 16).GetCell(2).SetCellValue("中国天辰工程有限公司");
|
||||
// if (!string.IsNullOrEmpty(trust.CH_TrustUnit))
|
||||
// {
|
||||
// recordSheet.GetRow(20 + tb.Rows.Count - 16).GetCell(5).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(trust.CH_TrustUnit).ToString());
|
||||
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(trust.CH_CheckUnit))
|
||||
// {
|
||||
// recordSheet.GetRow(20 + tb.Rows.Count - 16).CreateCell(7).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(trust.CH_CheckUnit).ToString());
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// var unit = Funs.DB.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == trust.ProjectId && x.UnitType == Const.ProjectUnitType_3);
|
||||
// if (unit != null && !string.IsNullOrEmpty(unit.UnitId))
|
||||
// {
|
||||
// recordSheet.GetRow(20).GetCell(0).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(unit.UnitId).ToString());
|
||||
|
||||
// }
|
||||
// recordSheet.GetRow(20).GetCell(2).SetCellValue("中国天辰工程有限公司");
|
||||
|
||||
// if (!string.IsNullOrEmpty(trust.CH_TrustUnit))
|
||||
// {
|
||||
@@ -945,266 +1382,267 @@ namespace FineUIPro.Web.HJGL.TrustManage
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnPrint1_Click(object sender, EventArgs e)
|
||||
{
|
||||
string reportId = this.tvControlItem.SelectedNode.NodeID;
|
||||
var trust = BLL.TrustManageEditService.GetCH_TrustByID(reportId);
|
||||
if (trust != null)
|
||||
{
|
||||
string varValue = string.Empty;
|
||||
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
|
||||
var installation = BLL.Project_InstallationService.GetInstallationByInstallationId(trust.InstallationId);
|
||||
|
||||
//protected void btnPrint1_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// string reportId = this.tvControlItem.SelectedNode.NodeID;
|
||||
// var trust = BLL.TrustManageEditService.GetCH_TrustByID(reportId);
|
||||
// if (trust != null)
|
||||
// {
|
||||
// string varValue = string.Empty;
|
||||
// var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
|
||||
// var installation = BLL.Project_InstallationService.GetInstallationByInstallationId(trust.InstallationId);
|
||||
|
||||
|
||||
string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
|
||||
//模板文件
|
||||
string TempletFileName = Server.MapPath("~/") + "File/Excel/HJGL_DataOut/设备焊口检测委托单.xlsx";
|
||||
//导出文件
|
||||
string filePath = rootPath + DateTime.Now.ToString("yyyyMMddhhmmss") + "\\";
|
||||
if (!Directory.Exists(filePath))
|
||||
{
|
||||
Directory.CreateDirectory(filePath);
|
||||
}
|
||||
string ReportFileName = filePath + "out.xlsx";
|
||||
// string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
|
||||
// //模板文件
|
||||
// string TempletFileName = Server.MapPath("~/") + "File/Excel/HJGL_DataOut/设备焊口检测委托单.xlsx";
|
||||
// //导出文件
|
||||
// string filePath = rootPath + DateTime.Now.ToString("yyyyMMddhhmmss") + "\\";
|
||||
// if (!Directory.Exists(filePath))
|
||||
// {
|
||||
// Directory.CreateDirectory(filePath);
|
||||
// }
|
||||
// string ReportFileName = filePath + "out.xlsx";
|
||||
|
||||
FileStream file = new FileStream(TempletFileName, FileMode.Open, FileAccess.Read);
|
||||
XSSFWorkbook hssfworkbook = new XSSFWorkbook(file);
|
||||
// FileStream file = new FileStream(TempletFileName, FileMode.Open, FileAccess.Read);
|
||||
// XSSFWorkbook hssfworkbook = new XSSFWorkbook(file);
|
||||
|
||||
ICellStyle styleCenter = hssfworkbook.CreateCellStyle();
|
||||
styleCenter.VerticalAlignment = VerticalAlignment.Center;
|
||||
styleCenter.Alignment = HorizontalAlignment.Center;
|
||||
styleCenter.BorderLeft = BorderStyle.Thin;
|
||||
styleCenter.BorderTop = BorderStyle.Thin;
|
||||
styleCenter.BorderRight = BorderStyle.Thin;
|
||||
styleCenter.BorderBottom = BorderStyle.Thin;
|
||||
styleCenter.WrapText = true;
|
||||
IFont font = styleCenter.GetFont(hssfworkbook);
|
||||
font.Color = 10;//颜色
|
||||
font.FontHeightInPoints = 10;//字体高度(与excel中的字号一致)
|
||||
styleCenter.SetFont(font);
|
||||
XSSFSheet recordSheet = (XSSFSheet)hssfworkbook.GetSheet("管道焊口检测委托单");
|
||||
// ICellStyle styleCenter = hssfworkbook.CreateCellStyle();
|
||||
// styleCenter.VerticalAlignment = VerticalAlignment.Center;
|
||||
// styleCenter.Alignment = HorizontalAlignment.Center;
|
||||
// styleCenter.BorderLeft = BorderStyle.Thin;
|
||||
// styleCenter.BorderTop = BorderStyle.Thin;
|
||||
// styleCenter.BorderRight = BorderStyle.Thin;
|
||||
// styleCenter.BorderBottom = BorderStyle.Thin;
|
||||
// styleCenter.WrapText = true;
|
||||
// IFont font = styleCenter.GetFont(hssfworkbook);
|
||||
// font.Color = 10;//颜色
|
||||
// font.FontHeightInPoints = 10;//字体高度(与excel中的字号一致)
|
||||
// styleCenter.SetFont(font);
|
||||
// XSSFSheet recordSheet = (XSSFSheet)hssfworkbook.GetSheet("管道焊口检测委托单");
|
||||
|
||||
// recordSheet.AddMergedRegion(new CellRangeAddress(0, 0, 8, 9));
|
||||
// // recordSheet.AddMergedRegion(new CellRangeAddress(0, 0, 8, 9));
|
||||
|
||||
|
||||
recordSheet.GetRow(1).CreateCell(8).SetCellValue(projectName.ToString());
|
||||
recordSheet.GetRow(1).GetCell(8).CellStyle = styleCenter;
|
||||
//recordSheet.GetRow(1).CreateCell(8).SetCellValue(installation.InstallationName);
|
||||
//recordSheet.GetRow(1).GetCell(8).CellStyle = styleCenter;
|
||||
if (!string.IsNullOrEmpty(trust.CH_CheckUnit))
|
||||
{
|
||||
// recordSheet.AddMergedRegion(new CellRangeAddress(2, 2, 1, 2));
|
||||
var cel = recordSheet.GetRow(3).CreateCell(1);
|
||||
cel.SetCellValue(BLL.UnitService.GetUnitNameByUnitId(trust.CH_CheckUnit).ToString());
|
||||
cel.CellStyle = styleCenter;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trust.CH_TrustMan))
|
||||
{
|
||||
var cel = recordSheet.GetRow(3).CreateCell(5);
|
||||
cel.SetCellValue(BLL.UserService.GetUserNameByUserId(trust.CH_TrustMan));
|
||||
cel.CellStyle = styleCenter;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trust.CH_TrustCode))
|
||||
{
|
||||
var cel = recordSheet.GetRow(3).CreateCell(7);
|
||||
cel.SetCellValue(trust.CH_TrustCode);
|
||||
cel.CellStyle = styleCenter;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trust.CH_NDTCriteria))
|
||||
{
|
||||
var cel = recordSheet.GetRow(4).CreateCell(7);
|
||||
cel.SetCellValue(trust.CH_NDTCriteria);
|
||||
cel.CellStyle = styleCenter;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trust.CH_WeldMethod))
|
||||
{
|
||||
var type = BLL.Base_WeldingMethodService.GetWeldingMethodByWeldingMethodId(trust.CH_WeldMethod);
|
||||
// recordSheet.GetRow(1).CreateCell(8).SetCellValue(projectName.ToString());
|
||||
// recordSheet.GetRow(1).GetCell(8).CellStyle = styleCenter;
|
||||
// //recordSheet.GetRow(1).CreateCell(8).SetCellValue(installation.InstallationName);
|
||||
// //recordSheet.GetRow(1).GetCell(8).CellStyle = styleCenter;
|
||||
// if (!string.IsNullOrEmpty(trust.CH_CheckUnit))
|
||||
// {
|
||||
// // recordSheet.AddMergedRegion(new CellRangeAddress(2, 2, 1, 2));
|
||||
// var cel = recordSheet.GetRow(3).CreateCell(1);
|
||||
// cel.SetCellValue(BLL.UnitService.GetUnitNameByUnitId(trust.CH_CheckUnit).ToString());
|
||||
// cel.CellStyle = styleCenter;
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(trust.CH_TrustMan))
|
||||
// {
|
||||
// var cel = recordSheet.GetRow(3).CreateCell(5);
|
||||
// cel.SetCellValue(BLL.UserService.GetUserNameByUserId(trust.CH_TrustMan));
|
||||
// cel.CellStyle = styleCenter;
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(trust.CH_TrustCode))
|
||||
// {
|
||||
// var cel = recordSheet.GetRow(3).CreateCell(7);
|
||||
// cel.SetCellValue(trust.CH_TrustCode);
|
||||
// cel.CellStyle = styleCenter;
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(trust.CH_NDTCriteria))
|
||||
// {
|
||||
// var cel = recordSheet.GetRow(4).CreateCell(7);
|
||||
// cel.SetCellValue(trust.CH_NDTCriteria);
|
||||
// cel.CellStyle = styleCenter;
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(trust.CH_WeldMethod))
|
||||
// {
|
||||
// var type = BLL.Base_WeldingMethodService.GetWeldingMethodByWeldingMethodId(trust.CH_WeldMethod);
|
||||
|
||||
var cel = recordSheet.GetRow(5).CreateCell(5);
|
||||
if (type != null)
|
||||
{
|
||||
cel.SetCellValue(type.WeldingMethodName);
|
||||
}
|
||||
cel.CellStyle = styleCenter;
|
||||
}
|
||||
// var cel = recordSheet.GetRow(5).CreateCell(5);
|
||||
// if (type != null)
|
||||
// {
|
||||
// cel.SetCellValue(type.WeldingMethodName);
|
||||
// }
|
||||
// cel.CellStyle = styleCenter;
|
||||
// }
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(trust.CH_AcceptGrade))
|
||||
{
|
||||
var list = BLL.TrustManageEditService.GetAcceptGradeList();
|
||||
var grade = list.FirstOrDefault(x => x.Value == trust.CH_AcceptGrade);
|
||||
var cel = recordSheet.GetRow(5).CreateCell(7);
|
||||
if (grade != null)
|
||||
{
|
||||
cel.SetCellValue(grade.Text);
|
||||
}
|
||||
cel.CellStyle = styleCenter;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trust.CH_NDTMethod))
|
||||
{
|
||||
var type = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(trust.CH_NDTMethod);
|
||||
var cel = recordSheet.GetRow(6).CreateCell(1);
|
||||
// if (!string.IsNullOrEmpty(trust.CH_AcceptGrade))
|
||||
// {
|
||||
// var list = BLL.TrustManageEditService.GetAcceptGradeList();
|
||||
// var grade = list.FirstOrDefault(x => x.Value == trust.CH_AcceptGrade);
|
||||
// var cel = recordSheet.GetRow(5).CreateCell(7);
|
||||
// if (grade != null)
|
||||
// {
|
||||
// cel.SetCellValue(grade.Text);
|
||||
// }
|
||||
// cel.CellStyle = styleCenter;
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(trust.CH_NDTMethod))
|
||||
// {
|
||||
// var type = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(trust.CH_NDTMethod);
|
||||
// var cel = recordSheet.GetRow(6).CreateCell(1);
|
||||
|
||||
if (type != null)
|
||||
{
|
||||
cel.SetCellValue(type.DetectionTypeName);
|
||||
}
|
||||
cel.CellStyle = styleCenter;
|
||||
// if (type != null)
|
||||
// {
|
||||
// cel.SetCellValue(type.DetectionTypeName);
|
||||
// }
|
||||
// cel.CellStyle = styleCenter;
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trust.CH_NDTRate))
|
||||
{
|
||||
var list = BLL.Base_DetectionRateService.GetNDTRateNameList();
|
||||
var rate = list.FirstOrDefault(x => x.Value == trust.CH_NDTRate);
|
||||
var cel = recordSheet.GetRow(6).CreateCell(7);
|
||||
if (rate != null)
|
||||
{
|
||||
cel.SetCellValue(rate.Text);
|
||||
}
|
||||
cel.CellStyle = styleCenter;
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(trust.CH_NDTRate))
|
||||
// {
|
||||
// var list = BLL.Base_DetectionRateService.GetNDTRateNameList();
|
||||
// var rate = list.FirstOrDefault(x => x.Value == trust.CH_NDTRate);
|
||||
// var cel = recordSheet.GetRow(6).CreateCell(7);
|
||||
// if (rate != null)
|
||||
// {
|
||||
// cel.SetCellValue(rate.Text);
|
||||
// }
|
||||
// cel.CellStyle = styleCenter;
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
if (!string.IsNullOrEmpty(trust.CH_SlopeType))
|
||||
{
|
||||
var type = BLL.Base_GrooveTypeService.GetGrooveTypeByGrooveTypeId(trust.CH_SlopeType);
|
||||
var cel = recordSheet.GetRow(6).CreateCell(5);
|
||||
if (type != null)
|
||||
{
|
||||
cel.SetCellValue(type.GrooveTypeName);
|
||||
}
|
||||
cel.CellStyle = styleCenter;
|
||||
}
|
||||
// if (!string.IsNullOrEmpty(trust.CH_SlopeType))
|
||||
// {
|
||||
// var type = BLL.Base_GrooveTypeService.GetGrooveTypeByGrooveTypeId(trust.CH_SlopeType);
|
||||
// var cel = recordSheet.GetRow(6).CreateCell(5);
|
||||
// if (type != null)
|
||||
// {
|
||||
// cel.SetCellValue(type.GrooveTypeName);
|
||||
// }
|
||||
// cel.CellStyle = styleCenter;
|
||||
// }
|
||||
|
||||
string strSql = @"SELECT *
|
||||
FROM dbo.View_CH_TrustItem jot
|
||||
WHERE CH_TrustID=@CH_TrustID";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@CH_TrustID", tvControlItem.SelectedNodeID));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
if (tb.Rows.Count > 0 && tb.Rows[0]["WorkAreaId"] != null)
|
||||
{
|
||||
// string strSql = @"SELECT *
|
||||
// FROM dbo.View_CH_TrustItem jot
|
||||
// WHERE CH_TrustID=@CH_TrustID";
|
||||
// List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
// listStr.Add(new SqlParameter("@CH_TrustID", tvControlItem.SelectedNodeID));
|
||||
// SqlParameter[] parameter = listStr.ToArray();
|
||||
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// if (tb.Rows.Count > 0 && tb.Rows[0]["WorkAreaId"] != null)
|
||||
// {
|
||||
|
||||
var PworkArea = Funs.DB.ProjectData_WorkArea.FirstOrDefault(x => x.WorkAreaId == tb.Rows[0]["WorkAreaId"].ToString());
|
||||
if (PworkArea != null)
|
||||
{
|
||||
//var cel = recordSheet.GetRow(3).CreateCell(1);
|
||||
//cel.SetCellValue(PworkArea.WorkAreaCode);
|
||||
//cel.CellStyle = styleCenter;
|
||||
// var PworkArea = Funs.DB.ProjectData_WorkArea.FirstOrDefault(x => x.WorkAreaId == tb.Rows[0]["WorkAreaId"].ToString());
|
||||
// if (PworkArea != null)
|
||||
// {
|
||||
// //var cel = recordSheet.GetRow(3).CreateCell(1);
|
||||
// //cel.SetCellValue(PworkArea.WorkAreaCode);
|
||||
// //cel.CellStyle = styleCenter;
|
||||
|
||||
recordSheet.GetRow(2).CreateCell(8).SetCellValue(PworkArea.WorkAreaName);
|
||||
recordSheet.GetRow(2).GetCell(8).CellStyle = styleCenter;
|
||||
recordSheet.GetRow(4).CreateCell(1).SetCellValue(PworkArea.WorkAreaCode);
|
||||
recordSheet.GetRow(4).GetCell(1).CellStyle = styleCenter;
|
||||
}
|
||||
}
|
||||
// recordSheet.GetRow(2).CreateCell(8).SetCellValue(PworkArea.WorkAreaName);
|
||||
// recordSheet.GetRow(2).GetCell(8).CellStyle = styleCenter;
|
||||
// recordSheet.GetRow(4).CreateCell(1).SetCellValue(PworkArea.WorkAreaCode);
|
||||
// recordSheet.GetRow(4).GetCell(1).CellStyle = styleCenter;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
if (tb.Rows.Count > 16)
|
||||
{
|
||||
recordSheet.ShiftRows(9, 28, tb.Rows.Count - 16);
|
||||
for (int j = 0; j < tb.Rows.Count - 16; j++)
|
||||
{
|
||||
recordSheet.CopyRow(8 + j, 9 + j);
|
||||
}
|
||||
var unit = Funs.DB.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == trust.ProjectId && x.UnitType == Const.ProjectUnitType_3);
|
||||
if (unit != null && !string.IsNullOrEmpty(unit.UnitId))
|
||||
{
|
||||
recordSheet.GetRow(20 + tb.Rows.Count - 16).GetCell(0).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(unit.UnitId).ToString());
|
||||
// if (tb.Rows.Count > 16)
|
||||
// {
|
||||
// recordSheet.ShiftRows(9, 28, tb.Rows.Count - 16);
|
||||
// for (int j = 0; j < tb.Rows.Count - 16; j++)
|
||||
// {
|
||||
// recordSheet.CopyRow(8 + j, 9 + j);
|
||||
// }
|
||||
// var unit = Funs.DB.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == trust.ProjectId && x.UnitType == Const.ProjectUnitType_3);
|
||||
// if (unit != null && !string.IsNullOrEmpty(unit.UnitId))
|
||||
// {
|
||||
// recordSheet.GetRow(20 + tb.Rows.Count - 16).GetCell(0).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(unit.UnitId).ToString());
|
||||
|
||||
}
|
||||
recordSheet.GetRow(20 + tb.Rows.Count - 16).GetCell(2).SetCellValue("中国成达工程有限公司");
|
||||
if (!string.IsNullOrEmpty(trust.CH_TrustUnit))
|
||||
{
|
||||
recordSheet.GetRow(20 + tb.Rows.Count - 16).GetCell(5).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(trust.CH_TrustUnit).ToString());
|
||||
// }
|
||||
// recordSheet.GetRow(20 + tb.Rows.Count - 16).GetCell(2).SetCellValue("中国天辰工程有限公司");
|
||||
// if (!string.IsNullOrEmpty(trust.CH_TrustUnit))
|
||||
// {
|
||||
// recordSheet.GetRow(20 + tb.Rows.Count - 16).GetCell(5).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(trust.CH_TrustUnit).ToString());
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trust.CH_CheckUnit))
|
||||
{
|
||||
recordSheet.GetRow(20 + tb.Rows.Count - 16).CreateCell(7).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(trust.CH_CheckUnit).ToString());
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(trust.CH_CheckUnit))
|
||||
// {
|
||||
// recordSheet.GetRow(20 + tb.Rows.Count - 16).CreateCell(7).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(trust.CH_CheckUnit).ToString());
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var unit = Funs.DB.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == trust.ProjectId && x.UnitType == Const.ProjectUnitType_3);
|
||||
if (unit != null && !string.IsNullOrEmpty(unit.UnitId))
|
||||
{
|
||||
recordSheet.GetRow(20).GetCell(0).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(unit.UnitId).ToString());
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// var unit = Funs.DB.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == trust.ProjectId && x.UnitType == Const.ProjectUnitType_3);
|
||||
// if (unit != null && !string.IsNullOrEmpty(unit.UnitId))
|
||||
// {
|
||||
// recordSheet.GetRow(20).GetCell(0).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(unit.UnitId).ToString());
|
||||
|
||||
}
|
||||
recordSheet.GetRow(20).GetCell(2).SetCellValue("中国成达工程有限公司");
|
||||
// }
|
||||
// recordSheet.GetRow(20).GetCell(2).SetCellValue("中国天辰工程有限公司");
|
||||
|
||||
if (!string.IsNullOrEmpty(trust.CH_TrustUnit))
|
||||
{
|
||||
recordSheet.GetRow(20).GetCell(5).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(trust.CH_TrustUnit).ToString());
|
||||
// if (!string.IsNullOrEmpty(trust.CH_TrustUnit))
|
||||
// {
|
||||
// recordSheet.GetRow(20).GetCell(5).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(trust.CH_TrustUnit).ToString());
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
if (!string.IsNullOrEmpty(trust.CH_CheckUnit))
|
||||
{
|
||||
recordSheet.GetRow(20).GetCell(7).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(trust.CH_CheckUnit).ToString());
|
||||
// if (!string.IsNullOrEmpty(trust.CH_CheckUnit))
|
||||
// {
|
||||
// recordSheet.GetRow(20).GetCell(7).SetCellValue(BLL.UnitService.GetUnitNameByUnitId(trust.CH_CheckUnit).ToString());
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
for (int i = 0; i < tb.Rows.Count; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
recordSheet.GetRow(8 + i).GetCell(0).SetCellValue("" + (i + 1));
|
||||
recordSheet.GetRow(8 + i).GetCell(1).SetCellValue(tb.Rows[i]["ISO_IsoNo"] != null ? tb.Rows[i]["ISO_IsoNo"].ToString() : "");
|
||||
//recordSheet.GetRow(8 + i).GetCell(2).SetCellValue(tb.Rows[i]["ISO_IsoNumber"] != null ? tb.Rows[i]["ISO_IsoNumber"].ToString() : "");
|
||||
recordSheet.GetRow(8 + i).GetCell(2).SetCellValue(tb.Rows[i]["JOT_JointNo"] != null ? tb.Rows[i]["JOT_JointNo"].ToString() : "");
|
||||
//recordSheet.GetRow(7 + i).GetCell(4).SetCellValue(tb.Rows[i]["ISO_IsoNumber"] != null ? tb.Rows[i]["ISO_IsoNumber"].ToString() : "");
|
||||
recordSheet.GetRow(8 + i).GetCell(7).SetCellValue(tb.Rows[i]["STE_Name1"] != null ? tb.Rows[i]["STE_Name1"].ToString() : "");
|
||||
recordSheet.GetRow(8 + i).GetCell(6).SetCellValue(tb.Rows[i]["JOT_JointDesc"] != null ? tb.Rows[i]["JOT_JointDesc"].ToString() : "");
|
||||
// }
|
||||
// for (int i = 0; i < tb.Rows.Count; i++)
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// recordSheet.GetRow(8 + i).GetCell(0).SetCellValue("" + (i + 1));
|
||||
// recordSheet.GetRow(8 + i).GetCell(1).SetCellValue(tb.Rows[i]["ISO_IsoNo"] != null ? tb.Rows[i]["ISO_IsoNo"].ToString() : "");
|
||||
// //recordSheet.GetRow(8 + i).GetCell(2).SetCellValue(tb.Rows[i]["ISO_IsoNumber"] != null ? tb.Rows[i]["ISO_IsoNumber"].ToString() : "");
|
||||
// recordSheet.GetRow(8 + i).GetCell(2).SetCellValue(tb.Rows[i]["JOT_JointNo"] != null ? tb.Rows[i]["JOT_JointNo"].ToString() : "");
|
||||
// //recordSheet.GetRow(7 + i).GetCell(4).SetCellValue(tb.Rows[i]["ISO_IsoNumber"] != null ? tb.Rows[i]["ISO_IsoNumber"].ToString() : "");
|
||||
// recordSheet.GetRow(8 + i).GetCell(7).SetCellValue(tb.Rows[i]["STE_Name1"] != null ? tb.Rows[i]["STE_Name1"].ToString() : "");
|
||||
// recordSheet.GetRow(8 + i).GetCell(6).SetCellValue(tb.Rows[i]["JOT_JointDesc"] != null ? tb.Rows[i]["JOT_JointDesc"].ToString() : "");
|
||||
|
||||
string WED_Name = "";
|
||||
if (!string.IsNullOrEmpty(tb.Rows[i]["WED_Code1"].ToString()))
|
||||
WED_Name += tb.Rows[i]["WED_Code1"].ToString();
|
||||
// string WED_Name = "";
|
||||
// if (!string.IsNullOrEmpty(tb.Rows[i]["WED_Code1"].ToString()))
|
||||
// WED_Name += tb.Rows[i]["WED_Code1"].ToString();
|
||||
|
||||
if (!string.IsNullOrEmpty(tb.Rows[i]["WED_Code2"].ToString()) && WED_Name != tb.Rows[i]["WED_Code2"].ToString())
|
||||
WED_Name += " " + tb.Rows[i]["WED_Code2"].ToString();
|
||||
recordSheet.GetRow(8 + i).GetCell(5).SetCellValue(WED_Name);
|
||||
// if (!string.IsNullOrEmpty(tb.Rows[i]["WED_Code2"].ToString()) && WED_Name != tb.Rows[i]["WED_Code2"].ToString())
|
||||
// WED_Name += " " + tb.Rows[i]["WED_Code2"].ToString();
|
||||
// recordSheet.GetRow(8 + i).GetCell(5).SetCellValue(WED_Name);
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// }
|
||||
// catch (Exception)
|
||||
// {
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
using (FileStream filess = File.OpenWrite(ReportFileName))
|
||||
{
|
||||
hssfworkbook.Write(filess);
|
||||
}
|
||||
//PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.CurrUser.LoginProjectId)));
|
||||
// using (FileStream filess = File.OpenWrite(ReportFileName))
|
||||
// {
|
||||
// hssfworkbook.Write(filess);
|
||||
// }
|
||||
// //PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.CurrUser.LoginProjectId)));
|
||||
|
||||
FileInfo filet = new FileInfo(ReportFileName);
|
||||
Response.Clear();
|
||||
Response.Charset = "GB2312";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
// 添加头信息,为"文件下载/另存为"对话框指定默认文件名
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=设备焊口检测委托单_" + Server.UrlEncode(DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx"));
|
||||
// 添加头信息,指定文件大小,让浏览器能够显示下载进度
|
||||
Response.AddHeader("Content-Length", filet.Length.ToString());
|
||||
// 指定返回的是一个不能被客户端读取的流,必须被下载
|
||||
Response.ContentType = "application/ms-excel";
|
||||
// 把文件流发送到客户端
|
||||
Response.WriteFile(filet.FullName);
|
||||
// 停止页面的执行
|
||||
Response.End();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择要打印的委托单!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// FileInfo filet = new FileInfo(ReportFileName);
|
||||
// Response.Clear();
|
||||
// Response.Charset = "GB2312";
|
||||
// Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
// // 添加头信息,为"文件下载/另存为"对话框指定默认文件名
|
||||
// Response.AddHeader("Content-Disposition", "attachment; filename=设备焊口检测委托单_" + Server.UrlEncode(DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx"));
|
||||
// // 添加头信息,指定文件大小,让浏览器能够显示下载进度
|
||||
// Response.AddHeader("Content-Length", filet.Length.ToString());
|
||||
// // 指定返回的是一个不能被客户端读取的流,必须被下载
|
||||
// Response.ContentType = "application/ms-excel";
|
||||
// // 把文件流发送到客户端
|
||||
// Response.WriteFile(filet.FullName);
|
||||
// // 停止页面的执行
|
||||
// Response.End();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Alert.ShowInTop("请选择要打印的委托单!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -49,6 +49,9 @@
|
||||
<f:Button ID="btnNew" Text="增加" Icon="Add" runat="server" OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnBatchAdd" Text="批量增加" Icon="TableAdd" runat="server" OnClick="btnBatchAdd_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="betDel" Text="批量删除" ToolTip="批量删除当前条件下焊口" Icon="Delete"
|
||||
runat="server" OnClick="betDel_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut2" runat="server" Text="导出" ToolTip="导出焊口初始数据信息" EnablePostBack="true" Icon="FolderUp" OnClick="btnOut2_Click">
|
||||
</f:Button>
|
||||
|
||||
@@ -188,18 +188,23 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// <param name="e"></param>
|
||||
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
||||
{
|
||||
IQueryable<Model.PW_IsoInfo> isoInfo = from x in Funs.DB.PW_IsoInfo
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkAreaId == e.Node.NodeID.Split('_')[0]
|
||||
orderby x.ISO_IsoNo
|
||||
select x;
|
||||
string a = this.txtIsono.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(a))
|
||||
{
|
||||
isoInfo = isoInfo.Where(x => x.ISO_IsoNo.Contains(a));
|
||||
}
|
||||
|
||||
if (e.Node.ToolTip == "区域非标管线")
|
||||
{
|
||||
e.Node.Nodes.Clear();
|
||||
List<Model.PW_IsoInfo> isoInfo = new List<Model.PW_IsoInfo>();
|
||||
isoInfo = (from x in BLL.Funs.DB.PW_IsoInfo
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkAreaId == e.Node.NodeID.Split('_')[0] && x.Is_Standard==true
|
||||
&& x.ISO_IsoNo.Contains(this.txtIsono.Text.Trim())
|
||||
orderby x.ISO_IsoNo
|
||||
select x).ToList();
|
||||
foreach (var item in isoInfo)
|
||||
var getS = isoInfo.Where(x => x.Is_Standard == true).OrderBy(x => x.ISO_IsoNo);
|
||||
foreach (var item in getS)
|
||||
{
|
||||
var jotCount = (from x in Funs.DB.PW_JointInfo where x.ISO_ID == item.ISO_ID select x).Count();
|
||||
var jotCount = Funs.DB.PW_JointInfo.Where(x => x.ISO_ID == item.ISO_ID).Count();
|
||||
TreeNode newNode = new TreeNode();
|
||||
if (!String.IsNullOrEmpty(item.ISO_Sheet))
|
||||
{
|
||||
@@ -219,15 +224,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
else if (e.Node.ToolTip == "区域标准管线")
|
||||
{
|
||||
e.Node.Nodes.Clear();
|
||||
List<Model.PW_IsoInfo> isoInfo = new List<Model.PW_IsoInfo>();
|
||||
isoInfo = (from x in BLL.Funs.DB.PW_IsoInfo
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkAreaId == e.Node.NodeID.Split('_')[0] && x.Is_Standard == false
|
||||
&& x.ISO_IsoNo.Contains(this.txtIsono.Text.Trim())
|
||||
orderby x.ISO_IsoNo
|
||||
select x).ToList();
|
||||
foreach (var item in isoInfo)
|
||||
var getNS = isoInfo.Where(x => x.Is_Standard == false).OrderBy(x => x.ISO_IsoNo);
|
||||
foreach (var item in getNS)
|
||||
{
|
||||
var jotCount = (from x in Funs.DB.PW_JointInfo where x.ISO_ID == item.ISO_ID select x).Count();
|
||||
var jotCount = Funs.DB.PW_JointInfo.Where(x => x.ISO_ID == item.ISO_ID).Count();
|
||||
TreeNode newNode = new TreeNode();
|
||||
if (!String.IsNullOrEmpty(item.ISO_Sheet))
|
||||
{
|
||||
@@ -237,8 +237,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
newNode.Text = item.ISO_IsoNo;
|
||||
}
|
||||
|
||||
newNode.Text += "【" + jotCount.ToString() + "焊口】";
|
||||
newNode.ToolTip = "管线(页数)【焊口数】";
|
||||
newNode.ToolTip = "管线(页数)【焊口数】";
|
||||
newNode.NodeID = item.ISO_ID;
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
@@ -957,18 +958,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
private bool judgementDelete(string id, bool isShow)
|
||||
{
|
||||
string content = string.Empty;
|
||||
//if (BLL.HJGL_HotProessManageEditService.GetHotProessByJotId(id) > 0)
|
||||
//{
|
||||
// content = "热处理已经使用了该焊口,不能删除!";
|
||||
//}
|
||||
//if (BLL.Funs.DB.HJGL_CH_TrustItem.FirstOrDefault(x => x.JOT_ID == id) != null)
|
||||
//{
|
||||
// content = "无损委托已经使用了该焊口,不能删除!";
|
||||
//}
|
||||
//if (BLL.Funs.DB.HJGL_CH_CheckItem.FirstOrDefault(x => x.JOT_ID == id) != null)
|
||||
//{
|
||||
// content = "检测单已经使用了该焊口,不能删除!";
|
||||
//}
|
||||
var jot = Funs.DB.PW_JointInfo.FirstOrDefault(x => x.JOT_ID == id);
|
||||
if (jot != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(jot.DReportID))
|
||||
{
|
||||
var dr = Funs.DB.BO_WeldReportMain.FirstOrDefault(x => x.DReportID == jot.DReportID);
|
||||
if (dr != null)
|
||||
{
|
||||
content = "日报:"+dr.JOT_DailyReportNo+ "使用了该焊口,不能删除!";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
content = "删除焊口不存在!";
|
||||
}
|
||||
if (string.IsNullOrEmpty(content))
|
||||
{
|
||||
return true;
|
||||
@@ -1121,5 +1126,30 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
string strCode = "WeldedJoint$" + Grid1.SelectedRowID;
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/Controls/SeeQRImage.aspx?JOT_ID={0}&strCode={1}", Grid1.SelectedRowID, strCode), "二维码查看", 400, 400));
|
||||
}
|
||||
|
||||
protected void betDel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GetButtonPower(Const.BtnDelete))
|
||||
{
|
||||
var getMess = PW_JointInfoService.DelAllJots(this.CurrUser.LoginProjectId, this.tvControlItem.SelectedNodeID, this.txtJOT_JointNo.Text.Trim());
|
||||
if (getMess != null)
|
||||
{
|
||||
if (getMess.code == 1)
|
||||
{
|
||||
this.InitTreeMenu();//加载树
|
||||
this.BindGrid();//加载树
|
||||
ShowNotify(getMess.message, MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop(getMess.message, MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -138,6 +138,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnBatchAdd;
|
||||
|
||||
/// <summary>
|
||||
/// betDel 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button betDel;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut2 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -37,34 +37,33 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="txtIsoNo" runat="server" Label="管线代号" LabelAlign="Right" Width="220px" LabelWidth="90px" EmptyText="输入查询条件"></f:TextBox>
|
||||
<f:DropDownList ID="drpIsStanded" runat="server" Label="是否非标" LabelAlign="Right" Width="200px" LabelWidth="90px" EnableEdit="true"></f:DropDownList>
|
||||
<f:DropDownList ID="drpSer" runat="server" Label="介质" LabelAlign="Right" Width="200px" LabelWidth="70px" EnableEdit="true"></f:DropDownList>
|
||||
<f:DropDownList ID="drpNDT" runat="server" Label="探伤类型" LabelAlign="Right" Width="220px" LabelWidth="90px" EnableEdit="true"></f:DropDownList>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="txtIso_IsoNumber" runat="server" Label="单线图号" LabelAlign="Right" Width="220px" LabelWidth="90px" EmptyText="输入查询条件"></f:TextBox>
|
||||
<f:DropDownList ID="drpSteId" runat="server" Label="材质" LabelAlign="Right" Width="220px" LabelWidth="90px" EnableEdit="true"></f:DropDownList>
|
||||
<f:TextBox ID="txtISO_Specification" runat="server" Label="规格" LabelAlign="Right" Width="200px" LabelWidth="70px" EmptyText="输入查询条件"></f:TextBox>
|
||||
<f:TextBox ID="txtIsoNo" runat="server" Label="管线代号" LabelAlign="Right" Width="220px" LabelWidth="80px" EmptyText="输入查询条件"></f:TextBox>
|
||||
<f:DropDownList ID="drpIsStanded" runat="server" Label="是否非标" LabelAlign="Right" Width="220px" LabelWidth="80px" EnableEdit="true"></f:DropDownList>
|
||||
<f:DropDownList ID="drpSer" runat="server" Label="介质" LabelAlign="Right" Width="220px" LabelWidth="80px" EnableEdit="true"></f:DropDownList>
|
||||
<f:DropDownList ID="drpNDT" runat="server" Label="探伤类型" LabelAlign="Right" Width="220px" LabelWidth="80px" EnableEdit="true"></f:DropDownList>
|
||||
<f:TextBox ID="txtIso_IsoNumber" runat="server" Label="单线图号" LabelAlign="Right" Width="220px" LabelWidth="80px" EmptyText="输入查询条件"></f:TextBox>
|
||||
<f:DropDownList ID="drpSteId" runat="server" Label="材质" LabelAlign="Right" Width="220px" LabelWidth="80px" EnableEdit="true"></f:DropDownList>
|
||||
<f:TextBox ID="txtISO_Specification" runat="server" Label="规格" LabelAlign="Right" Width="220px" LabelWidth="80px" EmptyText="输入查询条件"></f:TextBox>
|
||||
<f:Button ID="btnSearch" runat="server" Icon="SystemSearch" Text="查询" ToolTip="查询" OnClick="btnSearch_Click"></f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnSelectColumn" Text="选择显示列" Icon="ShapesManySelect" runat="server"
|
||||
OnClick="btnSelectColumn_Click">
|
||||
OnClick="btnSelectColumn_Click" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnNew" Text="增加" ToolTip="增加" Icon="Add" runat="server" OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="betDel" Text="批量删除" ToolTip="批量删除当前条件下管线" Icon="Delete"
|
||||
runat="server" OnClick="betDel_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnQR" Text="批量二维码" ToolTip="批量生成二维码" Icon="TableRefresh" runat="server" OnClick="btnQR_Click">
|
||||
</f:Button>
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管线信息" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ISO_ID" AllowCellEditing="true"
|
||||
EnableColumnLines="true" ClicksToEdit="2" DataIDField="ISO_ID" AllowSorting="true"
|
||||
SortField="ISO_IsoNo" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ISO_ID" AllowPaging="true" IsDatabasePaging="true"
|
||||
EnableColumnLines="true" DataIDField="ISO_ID" AllowSorting="true"
|
||||
SortField="ISO_IsoNo" SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" AllowColumnLocking="true">
|
||||
<Columns>
|
||||
@@ -72,7 +71,13 @@
|
||||
<f:RenderField Width="200px" ColumnID="ISO_IsoNo" DataField="ISO_IsoNo"
|
||||
FieldType="String" HeaderText="管线代号" HeaderTextAlign="Center" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:TemplateField Width="90px" HeaderText="总达因数" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<f:RenderField Width="90px" ColumnID="TotalDin" DataField="TotalDin"
|
||||
FieldType="Double" HeaderText="总达因数" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="JointCount" DataField="JointCount"
|
||||
FieldType="Int" HeaderText="总焊口量" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<%-- <f:TemplateField Width="90px" HeaderText="总达因数" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label8" runat="server" Text='<%# ConvertTotalDin(Eval("ISO_ID")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
@@ -81,7 +86,7 @@
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# ConvertJointQty(Eval("ISO_ID")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
</f:TemplateField>--%>
|
||||
<f:RenderField Width="220px" ColumnID="UnitName" DataField="UnitName" FieldType="String" HeaderText="单位" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="MediumName" DataField="MediumName" FieldType="String" HeaderText="介质" HeaderTextAlign="Center">
|
||||
@@ -93,95 +98,15 @@
|
||||
<f:RenderField Width="100px" ColumnID="DetectionTypeName" DataField="DetectionTypeName" FieldType="String" HeaderText="探伤类型" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="WorkAreaCode" DataField="WorkAreaCode" FieldType="String" HeaderText="施工区域" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ISO_SysNo" DataField="ISO_SysNo" FieldType="String" HeaderText="系统号" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ISO_SubSysNo" DataField="ISO_SubSysNo" FieldType="String" HeaderText="分系统号" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ISO_CwpNo" DataField="ISO_CwpNo" FieldType="String" HeaderText="工作包号" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ISO_IsoNumber" DataField="ISO_IsoNumber" FieldType="String" HeaderText="单线图号" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ISO_Rev" DataField="ISO_Rev" FieldType="String" HeaderText="图纸版次" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ISO_Sheet" DataField="ISO_Sheet" FieldType="String" HeaderText="页数" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ISO_PipeQty" DataField="ISO_PipeQty" FieldType="String" HeaderText="总管段数" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ISO_Paint" DataField="ISO_Paint" FieldType="String" HeaderText="涂漆类别" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="ISO_Insulator" DataField="ISO_Insulator" FieldType="String" HeaderText="绝热类别" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="110px" HeaderText="材质" ColumnID="MaterialType" DataField="MaterialType" FieldType="String" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" HeaderText="执行标准" ColumnID="ISO_Executive" DataField="ISO_Executive" FieldType="String" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="修改人" ColumnID="ISO_Modifier" DataField="ISO_Modifier" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="修改日期" ColumnID="ISO_ModifyDate" DataField="ISO_ModifyDate" FieldType="Date" Renderer="Date" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="建档人" ColumnID="ISO_Creator" DataField="ISO_Creator" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="建档日期" ColumnID="ISO_CreateDate" DataField="ISO_CreateDate" FieldType="Date" Renderer="Date" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="设计压力" ColumnID="ISO_DesignPress" DataField="ISO_DesignPress" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="设计温度" ColumnID="ISO_DesignTemperature" DataField="ISO_DesignTemperature" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="试验压力" ColumnID="ISO_TestPress" DataField="ISO_TestPress" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="试验温度" ColumnID="ISO_TestTemperature" DataField="ISO_TestTemperature" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="合格等级" ColumnID="ISO_NDTClass" DataField="ISO_NDTClass" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="渗透比例" ColumnID="ISO_PTRate" DataField="ISO_PTRate" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="合格等级" ColumnID="ISO_NDTClass" DataField="ISO_NDTClass" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="管道等级" ColumnID="PipingClassName" DataField="PipingClassName" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="渗透等级" ColumnID="ISO_PTClass" DataField="ISO_PTClass" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="是否酸洗" ColumnID="ISO_IfPickling" DataField="ISO_IfPickling" SortField="ISO_IfPickling"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="是否抛光" ColumnID="ISO_IfChasing" DataField="ISO_IfChasing" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:TemplateField Width="120px" HeaderText="试压包编号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPTP_TestPackageNo" runat="server" Text='<%# ConvertTestPackageNo(Eval("ISO_ID")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField HeaderText="备注" ColumnID="ISO_Remark" DataField="ISO_Remark" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:TemplateField HeaderText="编辑CAD" Width="80px">
|
||||
<ItemTemplate>
|
||||
<a href='<%# "../../FileManage/editCAD.aspx?officetype=1&url=" + Eval("ISO_ID") %>'
|
||||
target="_blank">编辑CAD</a>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField HeaderText="变更1" Width="80px">
|
||||
<ItemTemplate>
|
||||
<a href='<%# "../FileManage/editCAD.aspx?officetype=1&type=1&url=" + Eval("ISO_ID") %>'
|
||||
target="_blank">编辑CAD</a>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField HeaderText="变更2" Width="80px">
|
||||
<ItemTemplate>
|
||||
<a href='<%# "../FileManage/editCAD.aspx?officetype=1&type=3&url=" + Eval("ISO_ID") %>'
|
||||
target="_blank">编辑CAD</a>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField HeaderText="变更3" Width="80px">
|
||||
<ItemTemplate>
|
||||
<a href='<%# "../FileManage/editCAD.aspx?officetype=1&type=3&url=" + Eval("ISO_ID") %>'
|
||||
target="_blank">编辑CAD</a>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField HeaderText="重置CAD编辑" Width="100px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtnReset" runat="server" CommandArgument='<%# Bind("ISO_ID") %>'
|
||||
ToolTip="重置CAD编辑" CommandName="Reset" CssClass="ItemLink" Text="重置"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
@@ -192,12 +117,7 @@
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
<f:ListItem Text="所有行" Value="10000" />
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
public partial class PipelineManage : PageBase
|
||||
{
|
||||
|
||||
|
||||
public string treeNodeId
|
||||
{
|
||||
get
|
||||
@@ -44,13 +44,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
BLL.Base_TestMediumService.InitMediumDropDownList(this.drpSer, true);//介质
|
||||
BLL.Base_DetectionTypeService.InitDetectionTypeDropDownList(this.drpNDT, true);//探伤类型
|
||||
BLL.Base_MaterialService.InitMaterialDropDownList(this.drpSteId, true,this.CurrUser.LoginProjectId);//材质
|
||||
BLL.Base_MaterialService.InitMaterialDropDownList(this.drpSteId, true, this.CurrUser.LoginProjectId);//材质
|
||||
ListItem[] lis = new ListItem[3];
|
||||
lis[0] = new ListItem("- 请选择 -", "");
|
||||
lis[1] = new ListItem("是","1");
|
||||
lis[1] = new ListItem("是", "1");
|
||||
lis[2] = new ListItem("否", "0");
|
||||
this.drpIsStanded.DataValueField = "Value";
|
||||
this.drpIsStanded.DataTextField = "Text";
|
||||
@@ -196,9 +196,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
this.unitId = e.Node.ParentNode.NodeID.Split('|')[0];
|
||||
|
||||
treeNodeId = e.NodeID;
|
||||
this.BindGrid(e.NodeID);
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -206,120 +205,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// <summary>
|
||||
/// 数据绑定
|
||||
/// </summary>
|
||||
private void BindGrid(string treeNodeId="")
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT iso.ISO_ID,
|
||||
iso.ProjectId,
|
||||
iso.ISO_IsoNo,
|
||||
iso.UnitId,
|
||||
unit.UnitName,
|
||||
iso.TestMediumId,
|
||||
testMedium.MediumName,
|
||||
iso.DetectionRateId,
|
||||
detectionRate.DetectionRateValue,
|
||||
iso.DetectionTypeId,
|
||||
detectionType.DetectionTypeName,
|
||||
iso.WorkAreaId,
|
||||
workArea.WorkAreaCode,
|
||||
iso.ISO_SysNo,
|
||||
iso.ISO_SubSysNo,
|
||||
iso.ISO_CwpNo,
|
||||
iso.ISO_IsoNumber,
|
||||
iso.ISO_Rev,
|
||||
iso.ISO_Sheet,
|
||||
iso.ISO_PipeQty,
|
||||
iso.ISO_Paint,
|
||||
iso.ISO_Insulator,
|
||||
iso.MaterialId,
|
||||
material.MaterialType,
|
||||
iso.ISO_Executive,
|
||||
iso.ISO_Modifier,
|
||||
iso.ISO_ModifyDate,
|
||||
iso.ISO_Creator,
|
||||
iso.ISO_CreateDate,
|
||||
iso.ISO_DesignPress,
|
||||
iso.ISO_DesignTemperature,
|
||||
iso.ISO_TestPress,
|
||||
iso.ISO_TestTemperature,
|
||||
iso.ISO_NDTClass,
|
||||
iso.ISO_PTRate,
|
||||
case when iso.Is_Standard=1 then '是'else '否' end as Is_Standard,
|
||||
iso.PipingClassId,
|
||||
pipingClass.PipingClassName,
|
||||
iso.ISO_PTClass,
|
||||
(CASE WHEN iso.ISO_IfPickling='True' THEN '是' ELSE '否' END) AS ISO_IfPickling,
|
||||
(CASE WHEN iso.ISO_IfChasing='True' THEN '是' ELSE '否' END) AS ISO_IfChasing,
|
||||
iso.ISO_Remark"
|
||||
+ @" FROM PW_IsoInfo AS iso"
|
||||
+ @" LEFT JOIN Base_Unit AS unit ON unit.UnitId = iso.UnitId"
|
||||
+ @" LEFT JOIN Base_TestMedium AS testMedium ON testMedium.TestMediumId = iso.TestMediumId"
|
||||
+ @" LEFT JOIN Base_DetectionRate AS detectionRate ON detectionRate.DetectionRateId = iso.DetectionRateId"
|
||||
+ @" LEFT JOIN Base_DetectionType AS detectionType ON detectionType.DetectionTypeId = iso.DetectionTypeId"
|
||||
+ @" LEFT JOIN ProjectData_WorkArea AS workArea ON workArea.WorkAreaId = iso.WorkAreaId"
|
||||
+ @" LEFT JOIN Base_Material AS material ON material.MaterialId = iso.MaterialId"
|
||||
+ @" LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId = iso.PipingClassId"
|
||||
+ @" WHERE iso.ProjectId=@ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
|
||||
if (!string.IsNullOrEmpty(treeNodeId))
|
||||
{
|
||||
strSql += " AND workArea.WorkAreaId=@treeNodeId ";
|
||||
listStr.Add(new SqlParameter("@treeNodeId", treeNodeId));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(unitId))
|
||||
{
|
||||
strSql += " AND iso.UnitId=@unitId ";
|
||||
listStr.Add(new SqlParameter("@unitId", unitId));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.drpIsStanded.SelectedValue))
|
||||
{
|
||||
strSql += " AND iso.Is_Standard=@Is_Standard ";
|
||||
listStr.Add(new SqlParameter("@Is_Standard", this.drpIsStanded.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtIsoNo.Text.Trim()))
|
||||
{
|
||||
strSql += " AND iso.ISO_IsoNo LIKE @ISO_IsoNo";
|
||||
listStr.Add(new SqlParameter("@ISO_IsoNo", "%" + this.txtIsoNo.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.drpSer.SelectedValue) && this.drpSer.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND iso.TestMediumId = @TestMediumId";
|
||||
listStr.Add(new SqlParameter("@TestMediumId", this.drpSer.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.drpNDT.SelectedValue) && this.drpNDT.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND iso.DetectionTypeId = @DetectionTypeId";
|
||||
listStr.Add(new SqlParameter("@DetectionTypeId", this.drpNDT.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtIso_IsoNumber.Text.Trim()))
|
||||
{
|
||||
strSql += " AND iso.ISO_IsoNumber LIKE @isoNumber";
|
||||
listStr.Add(new SqlParameter("@isoNumber", "%" + this.txtIso_IsoNumber.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.drpSteId.SelectedValue) && this.drpSteId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND iso.MaterialId = @MaterialId";
|
||||
listStr.Add(new SqlParameter("@MaterialId", this.drpSteId.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtISO_Specification.Text.Trim()))
|
||||
{
|
||||
strSql += " AND iso.ISO_Specification LIKE @ISO_Specification";
|
||||
listStr.Add(new SqlParameter("@ISO_Specification", "%" + this.txtISO_Specification.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
//this.OutputSummaryData(tb); ///取合计值
|
||||
Grid1.DataSource = table;
|
||||
var getData = PipelineService.getListData(this.CurrUser.LoginProjectId, treeNodeId, unitId, this.drpIsStanded.SelectedValue, this.txtIsoNo.Text.Trim()
|
||||
, this.drpSer.SelectedValue, this.drpNDT.SelectedValue, this.txtIso_IsoNumber.Text.Trim(), this.drpSteId.SelectedValue
|
||||
, this.txtISO_Specification.Text.Trim(), Grid1);
|
||||
Grid1.RecordCount = PipelineService.count;
|
||||
Grid1.DataSource = getData;
|
||||
Grid1.DataBind();
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -354,7 +248,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid(this.treeNodeId);
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -407,9 +301,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
if (!string.IsNullOrEmpty(treeNodeId))
|
||||
{
|
||||
BindGrid(treeNodeId);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 增加管线信息
|
||||
@@ -520,16 +413,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(treeNodeId))
|
||||
{
|
||||
this.BindGrid(treeNodeId);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
|
||||
this.BindGrid();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -785,8 +670,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
protected void btnQR_Click(object sender, EventArgs e)
|
||||
{
|
||||
var getJointInfos = from x in Funs.DB.PW_JointInfo
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.QRCodeAttachUrl == null
|
||||
select x;
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.QRCodeAttachUrl == null
|
||||
select x;
|
||||
int num = 0;
|
||||
if (getJointInfos.Count() > 0)
|
||||
{
|
||||
@@ -819,11 +704,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
return;
|
||||
}
|
||||
string iso_Id = Grid1.SelectedRowID;
|
||||
var getJots = Funs.DB.PW_JointInfo.Where(x => x.ISO_ID == iso_Id).Select(x=>x.JOT_ID);
|
||||
var getJots = Funs.DB.PW_JointInfo.Where(x => x.ISO_ID == iso_Id).Select(x => x.JOT_ID);
|
||||
if (getJots.Count() > 0)
|
||||
{
|
||||
string pList = string.Empty;
|
||||
foreach (var id in getJots)
|
||||
foreach (var id in getJots)
|
||||
{
|
||||
if (string.IsNullOrEmpty(pList))
|
||||
{
|
||||
@@ -846,5 +731,32 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void betDel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GetButtonPower(Const.BtnDelete))
|
||||
{
|
||||
var getMess = PipelineService.DelAllPopeline(this.CurrUser.LoginProjectId, treeNodeId, unitId, this.drpIsStanded.SelectedValue, this.txtIsoNo.Text.Trim()
|
||||
, this.drpSer.SelectedValue, this.drpNDT.SelectedValue, this.txtIso_IsoNumber.Text.Trim(), this.drpSteId.SelectedValue
|
||||
, this.txtISO_Specification.Text.Trim());
|
||||
if (getMess != null)
|
||||
{
|
||||
if (getMess.code == 1)
|
||||
{
|
||||
this.InitTreeMenu();//加载树
|
||||
this.BindGrid();//加载树
|
||||
ShowNotify(getMess.message, MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop(getMess.message, MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -129,15 +129,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpNDT;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// txtIso_IsoNumber 控件。
|
||||
/// </summary>
|
||||
@@ -201,6 +192,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// betDel 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button betDel;
|
||||
|
||||
/// <summary>
|
||||
/// btnQR 控件。
|
||||
/// </summary>
|
||||
@@ -219,42 +219,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Label8 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label8;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label1;
|
||||
|
||||
/// <summary>
|
||||
/// lblPTP_TestPackageNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPTP_TestPackageNo;
|
||||
|
||||
/// <summary>
|
||||
/// lbtnReset 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtnReset;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</f:Button>
|
||||
<f:Button ID="btnGenerate" Text="委托" ToolTip="生成委托单" Icon="TableGo" runat="server" OnClick="btnGenerate_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPrint" runat="server" Text="打印" ToolTip="打印" Icon="Printer" OnClick="btnPrint_Click"></f:Button>
|
||||
<f:Button ID="btnPrint" runat="server" Text="打印" ToolTip="打印" Icon="Printer" OnClick="btnPrint_Click" Hidden="true"></f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -52,39 +52,32 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BodyPadding="10px"
|
||||
runat="server" RedStarPosition="BeforeText" LabelAlign="Left">
|
||||
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BodyPadding="5px"
|
||||
runat="server" RedStarPosition="BeforeText" LabelAlign="Left" LabelWidth="80px">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<f:FormRow ColumnWidths="30% 40% 30%">
|
||||
<Items>
|
||||
<f:Label ID="txtDailyReportNo" Label="日报告号" runat="server"
|
||||
LabelWidth="100px" LabelAlign="Right">
|
||||
<f:Label ID="txtDailyReportNo" Label="日报告号" runat="server">
|
||||
</f:Label>
|
||||
<f:Label ID="txtUnit" Label="单位" runat="server"
|
||||
LabelWidth="100px" LabelAlign="Right">
|
||||
<f:Label ID="txtUnit" Label="单位" runat="server">
|
||||
</f:Label>
|
||||
<f:Label ID="txtInstallation" Label="装置" runat="server"
|
||||
LabelWidth="100px" LabelAlign="Right">
|
||||
<f:Label ID="txtInstallation" Label="装置" runat="server">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ColumnWidths="30% 40% 30%">
|
||||
<Items>
|
||||
<f:Label ID="txtCHT_Tabler" Label="制单人" runat="server">
|
||||
</f:Label>
|
||||
<f:Label ID="txtCHT_TableDate" Label="制单日期" runat="server">
|
||||
</f:Label>
|
||||
<f:Label ID="txtJOT_WeldDate" Label="焊接日期" runat="server">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="txtCHT_Tabler" Label="制单人" runat="server"
|
||||
LabelWidth="100px" LabelAlign="Right">
|
||||
</f:Label>
|
||||
<f:Label ID="txtCHT_TableDate" Label="制单日期" runat="server"
|
||||
LabelWidth="100px" LabelAlign="Right">
|
||||
</f:Label>
|
||||
<f:Label ID="txtJOT_WeldDate" Label="焊接日期" runat="server"
|
||||
LabelWidth="100px" LabelAlign="Right">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="txtJOT_Remark" Label="备注" runat="server"
|
||||
LabelWidth="100px" LabelAlign="Right">
|
||||
<f:Label ID="txtJOT_Remark" Label="备注" runat="server">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:HiddenField ID="hdfileName" runat="server"></f:HiddenField>
|
||||
<f:DropDownList ID="drpWorkArea" runat="server" Label="施工区域" LabelAlign="Right"></f:DropDownList>
|
||||
<f:DropDownList ID="drpWorkArea" runat="server" EnableEdit="true"
|
||||
Label="施工区域" LabelAlign="Right" ></f:DropDownList>
|
||||
<f:Button ID="btnSearch" runat="server" Text="区域焊口数" Icon="Find" OnClick="btnSearch_Click"></f:Button>
|
||||
<f:FileUpload ID="FileExcel" runat="server" Label="数据文件" EmptyText="请上传EXCEl格式文件" Width="350px" LabelWidth="90px" LabelAlign="Right"></f:FileUpload>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
|
||||
@@ -249,19 +249,29 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
if (string.IsNullOrEmpty(jointInfo.DReportID))
|
||||
{
|
||||
string row0 = pds.Rows[i][0].ToString();
|
||||
var unit = units.Where(x => x.UnitCode == row0.Trim() && x.UnitId == this.CurrUser.UnitId).FirstOrDefault();
|
||||
Model.Base_Unit unit = new Model.Base_Unit();
|
||||
if (!string.IsNullOrEmpty(row0))
|
||||
{
|
||||
if (units.Where(x => x.UnitCode == row0.Trim()).FirstOrDefault() == null)
|
||||
unit = units.FirstOrDefault(x => x.UnitCode == row0.Trim());
|
||||
if (unit == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "单位代号" + "," + "[" + row0 + "]不存在!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
var area = workAreas.Where(x => x.UnitId == unit.UnitId && x.WorkAreaId == this.drpWorkArea.SelectedValue).FirstOrDefault();
|
||||
if (area == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "区域" + "," + "该单位没有此区域号!" + "|";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "单位代号" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
|
||||
|
||||
string row1 = pds.Rows[i][1].ToString();
|
||||
if (!string.IsNullOrEmpty(row1))
|
||||
{
|
||||
@@ -275,17 +285,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "装置代号" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(row0))
|
||||
{
|
||||
if (unit != null)
|
||||
{
|
||||
var area = workAreas.Where(x => x.UnitId == unit.UnitId && x.WorkAreaId == this.drpWorkArea.SelectedValue).FirstOrDefault();
|
||||
if (area == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "区域" + "," + "该单位没有此区域号!" + "|";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (string.IsNullOrEmpty(pds.Rows[i][2].ToString()))
|
||||
{
|
||||
@@ -732,7 +732,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
report.DReportID = SQLHelper.GetNewID(typeof(Model.BO_WeldReportMain));
|
||||
report.ProjectId = this.CurrUser.LoginProjectId;
|
||||
report.InstallationId = Funs.DB.Project_Installation.FirstOrDefault(e => e.ProjectId == this.CurrUser.LoginProjectId && e.InstallationCode == pds.Rows[i][1].ToString().Trim()).InstallationId;
|
||||
report.UnitId = Funs.DB.Base_Unit.FirstOrDefault(e => e.UnitCode == pds.Rows[i][0].ToString().Trim()&&e.UnitId == this.CurrUser.UnitId).UnitId;
|
||||
report.UnitId = Funs.DB.Base_Unit.FirstOrDefault(e => e.UnitCode == pds.Rows[i][0].ToString().Trim()).UnitId;
|
||||
report.JOT_WeldDate = Convert.ToDateTime(pds.Rows[i][18].ToString().Trim());
|
||||
report.JOT_DailyReportNo = reportNo;
|
||||
report.CHT_Tabler = this.CurrUser.UserId;
|
||||
@@ -762,17 +762,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
jointInfo.WME_ID = methods.First(e => e.WeldingMethodCode == pds.Rows[i][12].ToString().Trim()).WeldingMethodId;
|
||||
}
|
||||
jointInfo.DReportID = dReportID;
|
||||
var unit = units.Where(x => x.UnitCode == pds.Rows[i][0].ToString().Trim()&&x.UnitId==this.CurrUser.UnitId).FirstOrDefault();
|
||||
if (string.IsNullOrEmpty(pds.Rows[i][14].ToString().Trim()))
|
||||
var unit = units.FirstOrDefault(x => x.UnitCode == pds.Rows[i][0].ToString().Trim());
|
||||
if (unit != null)
|
||||
{
|
||||
jointInfo.JOT_CellWelder = welders.First(e => e.WED_Unit == unit.UnitId && e.WED_Code == pds.Rows[i][15].ToString().Trim()).WED_ID;
|
||||
jointInfo.JOT_FloorWelder = welders.First(e => e.WED_Unit == unit.UnitId && e.WED_Code == pds.Rows[i][16].ToString().Trim()).WED_ID;
|
||||
}
|
||||
else
|
||||
{
|
||||
var teamGroup = teamGroups.Where(x => x.UnitId == unit.UnitId && x.TeamGroupCode == pds.Rows[i][14].ToString().Trim()).FirstOrDefault();
|
||||
jointInfo.JOT_CellWelder = welders.First(e => e.WED_Unit == unit.UnitId && e.TeamGroupId == teamGroup.TeamGroupId && e.WED_Code == pds.Rows[i][15].ToString().Trim()).WED_ID;
|
||||
jointInfo.JOT_FloorWelder = welders.First(e => e.WED_Unit == unit.UnitId && e.TeamGroupId == teamGroup.TeamGroupId && e.WED_Code == pds.Rows[i][16].ToString().Trim()).WED_ID;
|
||||
if (string.IsNullOrEmpty(pds.Rows[i][14].ToString().Trim()))
|
||||
{
|
||||
jointInfo.JOT_CellWelder = welders.First(e => e.WED_Unit == unit.UnitId && e.WED_Code == pds.Rows[i][15].ToString().Trim()).WED_ID;
|
||||
jointInfo.JOT_FloorWelder = welders.First(e => e.WED_Unit == unit.UnitId && e.WED_Code == pds.Rows[i][16].ToString().Trim()).WED_ID;
|
||||
}
|
||||
else
|
||||
{
|
||||
var teamGroup = teamGroups.Where(x => x.UnitId == unit.UnitId && x.TeamGroupCode == pds.Rows[i][14].ToString().Trim()).FirstOrDefault();
|
||||
jointInfo.JOT_CellWelder = welders.First(e => e.WED_Unit == unit.UnitId && e.TeamGroupId == teamGroup.TeamGroupId && e.WED_Code == pds.Rows[i][15].ToString().Trim()).WED_ID;
|
||||
jointInfo.JOT_FloorWelder = welders.First(e => e.WED_Unit == unit.UnitId && e.TeamGroupId == teamGroup.TeamGroupId && e.WED_Code == pds.Rows[i][16].ToString().Trim()).WED_ID;
|
||||
}
|
||||
}
|
||||
jointInfo.JOT_Location = pds.Rows[i][17].ToString().Trim();
|
||||
jointInfo.JOT_Electricity = pds.Rows[i][19].ToString().Trim(); //电流
|
||||
|
||||
Reference in New Issue
Block a user