20260514 硬度值导入

This commit is contained in:
毕文静 2026-05-14 16:26:33 +08:00
parent d68b257852
commit b570239439
27 changed files with 2658 additions and 495 deletions

View File

@ -0,0 +1,50 @@
CREATE TABLE [dbo].[Sys_DataInTemp](
[TempId] [nvarchar](50) NOT NULL,
[ProjectId] [nvarchar](50) NULL,
[UserId] [nvarchar](50) NULL,
[Time] [datetime] NULL,
[RowNo] [int] NULL,
[ToopValue] [nvarchar](2000) NULL,
[Type] [nvarchar](50) NULL,
[Value1] [nvarchar](100) NULL,
[Value2] [nvarchar](100) NULL,
[Value3] [nvarchar](100) NULL,
[Value4] [nvarchar](100) NULL,
[Value5] [nvarchar](100) NULL,
[Value6] [nvarchar](100) NULL,
[Value7] [nvarchar](100) NULL,
[Value8] [nvarchar](100) NULL,
[Value9] [nvarchar](100) NULL,
[Value10] [nvarchar](100) NULL,
[Value11] [nvarchar](100) NULL,
[Value12] [nvarchar](100) NULL,
[Value13] [nvarchar](100) NULL,
[Value14] [nvarchar](100) NULL,
[Value15] [nvarchar](100) NULL,
[Value16] [nvarchar](100) NULL,
[Value17] [nvarchar](100) NULL,
[Value18] [nvarchar](100) NULL,
[Value19] [nvarchar](100) NULL,
[Value20] [nvarchar](100) NULL,
CONSTRAINT [PK_Sys_DataInTemp] PRIMARY KEY CLUSTERED
(
[TempId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Sys_DataInTemp] WITH CHECK ADD CONSTRAINT [FK_Sys_DataInTemp_Base_Project] FOREIGN KEY([ProjectId])
REFERENCES [dbo].[Base_Project] ([ProjectId])
GO
ALTER TABLE [dbo].[Sys_DataInTemp] CHECK CONSTRAINT [FK_Sys_DataInTemp_Base_Project]
GO
ALTER TABLE [dbo].[Sys_DataInTemp] WITH CHECK ADD CONSTRAINT [FK_Sys_DataInTemp_Sys_User] FOREIGN KEY([UserId])
REFERENCES [dbo].[Sys_User] ([UserId])
GO
ALTER TABLE [dbo].[Sys_DataInTemp] CHECK CONSTRAINT [FK_Sys_DataInTemp_Sys_User]
GO

View File

@ -166,6 +166,7 @@
<Compile Include="Common\SysManage\Sys_UserService.cs" /> <Compile Include="Common\SysManage\Sys_UserService.cs" />
<Compile Include="Common\SysManage\Sys_UserSettingsService.cs" /> <Compile Include="Common\SysManage\Sys_UserSettingsService.cs" />
<Compile Include="Common\SysManage\Sys_UserShowColumnsService.cs" /> <Compile Include="Common\SysManage\Sys_UserShowColumnsService.cs" />
<Compile Include="Common\Sys_DataInTempService.cs" />
<Compile Include="Common\UploadAttachmentService.cs" /> <Compile Include="Common\UploadAttachmentService.cs" />
<Compile Include="Common\CommonService.cs" /> <Compile Include="Common\CommonService.cs" />
<Compile Include="Common\Const.cs" /> <Compile Include="Common\Const.cs" />

View File

@ -633,6 +633,11 @@ namespace BLL
/// </summary> /// </summary>
public const string WeldingProcedureTemplateUrl = "File\\Excel\\HJGL_DataIn\\焊接工艺评定台账导入模板.xls"; public const string WeldingProcedureTemplateUrl = "File\\Excel\\HJGL_DataIn\\焊接工艺评定台账导入模板.xls";
/// <summary>
/// 硬度值导入模板
/// </summary>
public const string HardReportSetTemplateUrl = "File\\Excel\\HJGL_DataIn\\硬度值导入模板.xls";
/// <summary> /// <summary>
/// 通用附件上传路径 /// 通用附件上传路径
/// </summary> /// </summary>

View File

@ -101,8 +101,8 @@ namespace BLL.Common
{ {
// 2007版本 // 2007版本
XSSFWorkbook workbook = new XSSFWorkbook(fs); XSSFWorkbook workbook = new XSSFWorkbook(fs);
sheetNumber = workbook.NumberOfSheets; //sheetNumber = workbook.NumberOfSheets;
for (int i = 0; i < sheetNumber; i++) for (int i = 0; i < sheetNumber + 1; i++)
{ {
string sheetName = workbook.GetSheetName(i); string sheetName = workbook.GetSheetName(i);
sheet = workbook.GetSheet(sheetName); sheet = workbook.GetSheet(sheetName);
@ -125,8 +125,8 @@ namespace BLL.Common
{ {
// 2003版本 // 2003版本
HSSFWorkbook workbook = new HSSFWorkbook(fs); HSSFWorkbook workbook = new HSSFWorkbook(fs);
sheetNumber = workbook.NumberOfSheets; //sheetNumber = workbook.NumberOfSheets;
for (int i = 0; i < sheetNumber; i++) for (int i = 0; i < sheetNumber + 1; i++)
{ {
string sheetName = workbook.GetSheetName(i); string sheetName = workbook.GetSheetName(i);
sheet = workbook.GetSheet(sheetName); sheet = workbook.GetSheet(sheetName);

View File

@ -0,0 +1,175 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
/// <summary>
/// 导入临时表
/// </summary>
public class Sys_DataInTempService
{
/// <summary>
/// 根据主键获取导入临时表信息
/// </summary>
/// <param name="tempId">Id</param>
/// <returns></returns>
public static Model.Sys_DataInTemp GetDataInTempByTempId(string tempId)
{
return Funs.DB.Sys_DataInTemp.FirstOrDefault(x => x.TempId == tempId);
}
/// <summary>
/// 增加导入临时表记录
/// </summary>
/// <param name="dataInTemp">委托实体</param>
public static void AddDataInTemp(Model.Sys_DataInTemp dataInTemp)
{
Model.SGGLDB db = Funs.DB;
Model.Sys_DataInTemp newDataInTemp = new Model.Sys_DataInTemp();
newDataInTemp.TempId = dataInTemp.TempId;
newDataInTemp.ProjectId = dataInTemp.ProjectId;
newDataInTemp.UserId = dataInTemp.UserId;
newDataInTemp.Time = dataInTemp.Time;
newDataInTemp.RowNo = dataInTemp.RowNo;
newDataInTemp.Type = dataInTemp.Type;
newDataInTemp.Value1 = dataInTemp.Value1;
newDataInTemp.Value2 = dataInTemp.Value2;
newDataInTemp.Value3 = dataInTemp.Value3;
newDataInTemp.Value4 = dataInTemp.Value4;
newDataInTemp.Value5 = dataInTemp.Value5;
newDataInTemp.Value6 = dataInTemp.Value6;
newDataInTemp.Value7 = dataInTemp.Value7;
newDataInTemp.Value8 = dataInTemp.Value8;
newDataInTemp.Value9 = dataInTemp.Value9;
newDataInTemp.Value10 = dataInTemp.Value10;
newDataInTemp.Value11 = dataInTemp.Value11;
newDataInTemp.Value12 = dataInTemp.Value12;
newDataInTemp.Value13 = dataInTemp.Value13;
newDataInTemp.Value14 = dataInTemp.Value14;
newDataInTemp.Value15 = dataInTemp.Value15;
newDataInTemp.Value16 = dataInTemp.Value16;
newDataInTemp.Value17 = dataInTemp.Value17;
newDataInTemp.Value18 = dataInTemp.Value18;
newDataInTemp.Value19 = dataInTemp.Value19;
newDataInTemp.Value20 = dataInTemp.Value20;
newDataInTemp.ToopValue = dataInTemp.ToopValue;
db.Sys_DataInTemp.InsertOnSubmit(newDataInTemp);
db.SubmitChanges();
}
public static void AddDataInTemp(List<Model.Sys_DataInTemp> dataInTemps)
{
Model.SGGLDB db = Funs.DB;
foreach (var dataInTemp in dataInTemps)
{
Model.Sys_DataInTemp newDataInTemp = new Model.Sys_DataInTemp();
newDataInTemp.TempId = dataInTemp.TempId;
newDataInTemp.ProjectId = dataInTemp.ProjectId;
newDataInTemp.UserId = dataInTemp.UserId;
newDataInTemp.Time = dataInTemp.Time;
newDataInTemp.RowNo = dataInTemp.RowNo;
newDataInTemp.Type = dataInTemp.Type;
newDataInTemp.Value1 = dataInTemp.Value1;
newDataInTemp.Value2 = dataInTemp.Value2;
newDataInTemp.Value3 = dataInTemp.Value3;
newDataInTemp.Value4 = dataInTemp.Value4;
newDataInTemp.Value5 = dataInTemp.Value5;
newDataInTemp.Value6 = dataInTemp.Value6;
newDataInTemp.Value7 = dataInTemp.Value7;
newDataInTemp.Value8 = dataInTemp.Value8;
newDataInTemp.Value9 = dataInTemp.Value9;
newDataInTemp.Value10 = dataInTemp.Value10;
newDataInTemp.Value11 = dataInTemp.Value11;
newDataInTemp.Value12 = dataInTemp.Value12;
newDataInTemp.Value13 = dataInTemp.Value13;
newDataInTemp.Value14 = dataInTemp.Value14;
newDataInTemp.Value15 = dataInTemp.Value15;
newDataInTemp.Value16 = dataInTemp.Value16;
newDataInTemp.Value17 = dataInTemp.Value17;
newDataInTemp.Value18 = dataInTemp.Value18;
newDataInTemp.Value19 = dataInTemp.Value19;
newDataInTemp.Value20 = dataInTemp.Value20;
newDataInTemp.ToopValue = dataInTemp.ToopValue;
db.Sys_DataInTemp.InsertOnSubmit(newDataInTemp);
}
db.SubmitChanges();
}
/// <summary>
/// 修改导入临时表记录
/// </summary>
/// <param name="weldReport">焊接实体</param>
public static void UpdateDataInTemp(Model.Sys_DataInTemp dataInTemp)
{
Model.SGGLDB db = Funs.DB;
Model.Sys_DataInTemp newDataInTemp = db.Sys_DataInTemp.FirstOrDefault(e => e.TempId == dataInTemp.TempId);
if (newDataInTemp != null)
{
newDataInTemp.UserId = dataInTemp.UserId;
newDataInTemp.Time = dataInTemp.Time;
newDataInTemp.Value1 = dataInTemp.Value1;
newDataInTemp.Value2 = dataInTemp.Value2;
newDataInTemp.Value3 = dataInTemp.Value3;
newDataInTemp.Value4 = dataInTemp.Value4;
newDataInTemp.Value5 = dataInTemp.Value5;
newDataInTemp.Value6 = dataInTemp.Value6;
newDataInTemp.Value7 = dataInTemp.Value7;
newDataInTemp.Value8 = dataInTemp.Value8;
newDataInTemp.Value9 = dataInTemp.Value9;
newDataInTemp.Value10 = dataInTemp.Value10;
newDataInTemp.Value11 = dataInTemp.Value11;
newDataInTemp.Value12 = dataInTemp.Value12;
newDataInTemp.Value13 = dataInTemp.Value13;
newDataInTemp.Value14 = dataInTemp.Value14;
newDataInTemp.Value15 = dataInTemp.Value15;
newDataInTemp.Value16 = dataInTemp.Value16;
newDataInTemp.Value17 = dataInTemp.Value17;
newDataInTemp.Value18 = dataInTemp.Value18;
newDataInTemp.Value19 = dataInTemp.Value19;
newDataInTemp.Value20 = dataInTemp.Value20;
newDataInTemp.ToopValue = dataInTemp.ToopValue;
newDataInTemp.Type = dataInTemp.Type;
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除导入临时表记录
/// </summary>
/// <param name="tempId">委托主键</param>
public static void DeleteDataInTempByDataInTempID(string tempId)
{
Model.SGGLDB db = Funs.DB;
Model.Sys_DataInTemp dataInTemp = db.Sys_DataInTemp.FirstOrDefault(e => e.TempId == tempId);
if (dataInTemp != null)
{
db.Sys_DataInTemp.DeleteOnSubmit(dataInTemp);
db.SubmitChanges();
}
}
/// <summary>
/// 根据项目用户主键删除导入临时表记录
/// </summary>
/// <param name="projectId"></param>
/// <param name="userId"></param>
public static void DeleteDataInTempByProjectIdUserId(string projectId, string userId, string type)
{
Model.SGGLDB db = Funs.DB;
var dataInTemp = from x in db.Sys_DataInTemp where x.ProjectId == projectId && x.UserId == userId && x.Type == type select x;
if (dataInTemp.Count() > 0)
{
db.Sys_DataInTemp.DeleteAllOnSubmit(dataInTemp);
db.SubmitChanges();
}
}
}
}

View File

@ -79,7 +79,8 @@
<Items> <Items>
<f:Button ID="btnWeldingRecord" BoxConfigAlign="Center" Icon="Printer" runat="server" EnableAjax="false" DisableControlBeforePostBack="false" Text="焊接接头报检检查记录打印" ToolTip="焊接接头报检检查记录打印" OnClick="btnWeldingRecord_Click"></f:Button> <f:Button ID="btnWeldingRecord" BoxConfigAlign="Center" Icon="Printer" runat="server" EnableAjax="false" DisableControlBeforePostBack="false" Text="焊接接头报检检查记录打印" ToolTip="焊接接头报检检查记录打印" OnClick="btnWeldingRecord_Click"></f:Button>
<f:DropDownList ID="drpIsoId" runat="server" Label="管线号" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="txtWeldingDate_TextChanged" EnableEdit="true"></f:DropDownList> <f:DropDownList ID="drpIsoId" runat="server" Label="管线号" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="txtWeldingDate_TextChanged" EnableEdit="true"></f:DropDownList>
<f:DatePicker ID="txtWeldingDate" runat="server" Label="焊接日期" LabelAlign="Right" AutoPostBack="true" OnTextChanged="txtWeldingDate_TextChanged" Width="220px"></f:DatePicker> <%--<f:DatePicker ID="txtWeldingDate" runat="server" Label="焊接日期" LabelAlign="Right" AutoPostBack="true" OnTextChanged="txtWeldingDate_TextChanged" Width="220px"></f:DatePicker>--%>
<f:DropDownList ID="drpWeldingDate" runat="server" Label="焊接日期" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="txtWeldingDate_TextChanged" Width="220px" EnableEdit="true"></f:DropDownList>
</Items> </Items>
</f:Toolbar> </f:Toolbar>
</Toolbars> </Toolbars>

View File

@ -1,4 +1,7 @@
using BLL; using BLL;
using FineUIPro.Web.common.BaseInfo;
using Model;
using NPOI.SS.Formula.Functions;
using NPOI.SS.UserModel; using NPOI.SS.UserModel;
using NPOI.SS.Util; using NPOI.SS.Util;
using NPOI.XSSF.UserModel; using NPOI.XSSF.UserModel;
@ -96,10 +99,10 @@ namespace FineUIPro.Web.ContinuousPrint
strSql += " AND isoInfo.ISO_ID=@isoId"; strSql += " AND isoInfo.ISO_ID=@isoId";
listStr.Add(new SqlParameter("@isoId", this.drpIsoId.SelectedValue)); listStr.Add(new SqlParameter("@isoId", this.drpIsoId.SelectedValue));
} }
if (!string.IsNullOrEmpty(this.txtWeldingDate.Text.Trim())) if (!string.IsNullOrEmpty(this.drpWeldingDate.SelectedValue))
{ {
strSql += " AND weldReport.JOT_WeldDate=@weldingDate"; strSql += " AND weldReport.JOT_WeldDate=@weldingDate";
listStr.Add(new SqlParameter("@weldingDate", this.txtWeldingDate.Text.Trim())); listStr.Add(new SqlParameter("@weldingDate", this.drpWeldingDate.SelectedValue));
} }
SqlParameter[] parameter = listStr.ToArray(); SqlParameter[] parameter = listStr.ToArray();
Grid2.DataSource = SQLHelper.GetDataTableRunText(strSql, parameter); Grid2.DataSource = SQLHelper.GetDataTableRunText(strSql, parameter);
@ -159,6 +162,19 @@ namespace FineUIPro.Web.ContinuousPrint
this.drpIsoId.SelectedValue = BLL.Const._Null; this.drpIsoId.SelectedValue = BLL.Const._Null;
BindGrid1(this.Grid1.SelectedRowID); BindGrid1(this.Grid1.SelectedRowID);
//焊接日期
this.drpWeldingDate.Items.Clear();
this.drpWeldingDate.DataTextField = "Date";
this.drpWeldingDate.DataValueField = "Date";
List<string> dateLists = (from x in Funs.DB.HJGL_BO_BatchDetail
join y in Funs.DB.HJGL_BO_Batch on x.BatchId equals y.BatchId
join z in Funs.DB.HJGL_PW_JointInfo on x.JOT_ID equals z.JOT_ID
join w in Funs.DB.HJGL_BO_WeldReportMain on z.DReportID equals w.DReportID
where y.ProjectId== this.Grid1.SelectedRowID
select w.JOT_WeldDate.ToShortDateString()).Distinct().ToList();
this.drpWeldingDate.DataSource = dateLists;
this.drpWeldingDate.DataBind();
} }
#endregion #endregion
@ -304,6 +320,8 @@ namespace FineUIPro.Web.ContinuousPrint
{ {
keyValuePairs.Add("NDTType", "PT"); keyValuePairs.Add("NDTType", "PT");
} }
string weldingDate = string.Format("{0:yyyy年MM月dd日}", Convert.ToDateTime(this.hidJOT_WeldDate.Value));
keyValuePairs.Add("WeldingDate", weldingDate);
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
initTemplatePath = "File\\Fastreport\\管道焊接接头报检检查记录.frx"; initTemplatePath = "File\\Fastreport\\管道焊接接头报检检查记录.frx";

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.ContinuousPrint { namespace FineUIPro.Web.ContinuousPrint
{
public partial class WeldingJointInspection { public partial class WeldingJointInspection
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -166,13 +168,13 @@ namespace FineUIPro.Web.ContinuousPrint {
protected global::FineUIPro.DropDownList drpIsoId; protected global::FineUIPro.DropDownList drpIsoId;
/// <summary> /// <summary>
/// txtWeldingDate 控件。 /// drpWeldingDate 控件。
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// 自动生成的字段。 /// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DatePicker txtWeldingDate; protected global::FineUIPro.DropDownList drpWeldingDate;
/// <summary> /// <summary>
/// labNumber 控件。 /// labNumber 控件。

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="11/22/2024 15:19:04" ReportInfo.Modified="06/16/2025 14:40:10" ReportInfo.CreatorVersion="2017.1.16.0"> <Report ScriptLanguage="CSharp" ReportInfo.Created="11/22/2024 15:19:04" ReportInfo.Modified="05/13/2026 09:16:16" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System; <ScriptText>using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
@ -42,7 +42,7 @@ namespace FastReport
} }
</ScriptText> </ScriptText>
<Dictionary> <Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QFIivhvgFLiGeh14nMUOBc7Q=="> <MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QFT94lOQCMExBld9V82++hQA==">
<TableDataSource Name="Data" DataType="System.Int32" PropName="Attach_Image" Enabled="true" TableName="Data"> <TableDataSource Name="Data" DataType="System.Int32" PropName="Attach_Image" Enabled="true" TableName="Data">
<Column Name="Number" DataType="System.String" PropName="attach_image_id"/> <Column Name="Number" DataType="System.String" PropName="attach_image_id"/>
<Column Name="WED_Code" DataType="System.String" PropName="image_series"/> <Column Name="WED_Code" DataType="System.String" PropName="image_series"/>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="11/23/2024 15:00:41" ReportInfo.Modified="02/12/2026 14:38:54" ReportInfo.CreatorVersion="2017.1.16.0"> <Report ScriptLanguage="CSharp" ReportInfo.Created="11/23/2024 15:00:41" ReportInfo.Modified="05/13/2026 09:16:24" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System; <ScriptText>using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
@ -42,7 +42,7 @@ namespace FastReport
} }
</ScriptText> </ScriptText>
<Dictionary> <Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QFlh0iipmnrFgvcAIjLfOHvg=="> <MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QF9BIAyY5+UaR+KsNHv+fwLw==">
<TableDataSource Name="Attach_Image" Alias="Data" DataType="System.Int32" Enabled="true" TableName="Attach_Image"> <TableDataSource Name="Attach_Image" Alias="Data" DataType="System.Int32" Enabled="true" TableName="Attach_Image">
<Column Name="Number" DataType="System.String" PropName="attach_image_id"/> <Column Name="Number" DataType="System.String" PropName="attach_image_id"/>
<Column Name="ISO_IsoNo" DataType="System.String" PropName="image_series"/> <Column Name="ISO_IsoNo" DataType="System.String" PropName="image_series"/>
@ -63,6 +63,7 @@ namespace FastReport
<Parameter Name="InspectionCount" DataType="System.String"/> <Parameter Name="InspectionCount" DataType="System.String"/>
<Parameter Name="NDTRName" DataType="System.String"/> <Parameter Name="NDTRName" DataType="System.String"/>
<Parameter Name="NDTType" DataType="System.String"/> <Parameter Name="NDTType" DataType="System.String"/>
<Parameter Name="WeldingDate" DataType="System.String"/>
</Dictionary> </Dictionary>
<ReportPage Name="Page1" Landscape="true" PaperWidth="297" PaperHeight="210" LeftMargin="20" TopMargin="25" RightMargin="20" BottomMargin="21" FirstPageSource="4" OtherPagesSource="4" Guides="0,970.7,236.25,94.5,56.7,47.25,718.2,66.15,37.8,75.6,85.05,838.4,914,132.3,330.75,434.7,633.15,781.7,189,500.85,557.55,63.5,970.33,481.4"> <ReportPage Name="Page1" Landscape="true" PaperWidth="297" PaperHeight="210" LeftMargin="20" TopMargin="25" RightMargin="20" BottomMargin="21" FirstPageSource="4" OtherPagesSource="4" Guides="0,970.7,236.25,94.5,56.7,47.25,718.2,66.15,37.8,75.6,85.05,838.4,914,132.3,330.75,434.7,633.15,781.7,189,500.85,557.55,63.5,970.33,481.4">
<PageHeaderBand Name="PageHeader1" Width="971.46" Height="179.55" Guides="0,179.55,94.5,18.9,47.25,66.15,28.35,122.85,151.2"> <PageHeaderBand Name="PageHeader1" Width="971.46" Height="179.55" Guides="0,179.55,94.5,18.9,47.25,66.15,28.35,122.85,151.2">
@ -269,8 +270,8 @@ namespace FastReport
<TableCell Name="Cell205" Border.Lines="Left, Right, Top" Text="质量检查员:" VertAlign="Center" Font="宋体, 10.5pt"/> <TableCell Name="Cell205" Border.Lines="Left, Right, Top" Text="质量检查员:" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableRow> </TableRow>
<TableRow Name="Row15" Height="25.14"> <TableRow Name="Row15" Height="25.14">
<TableCell Name="Cell209" Border.Lines="Left, Right, Bottom" Text="日期:" VertAlign="Center" Font="宋体, 10.5pt"/> <TableCell Name="Cell209" Border.Lines="Left, Right, Bottom" Text="日期:[WeldingDate]" VertAlign="Center" Font="宋体, 10.5pt"/>
<TableCell Name="Cell210" Border.Lines="Left, Right, Bottom" Text="日期:" VertAlign="Center" Font="宋体, 10.5pt"/> <TableCell Name="Cell210" Border.Lines="Left, Right, Bottom" Text="日期:[WeldingDate]" VertAlign="Center" Font="宋体, 10.5pt"/>
</TableRow> </TableRow>
</TableObject> </TableObject>
</PageFooterBand> </PageFooterBand>

View File

@ -46,6 +46,7 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@ -1139,6 +1140,8 @@
<Content Include="HJGL\FileControl\ForeignStandardsView.aspx" /> <Content Include="HJGL\FileControl\ForeignStandardsView.aspx" />
<Content Include="HJGL\FileControl\ForeignStandardsViewEdit.aspx" /> <Content Include="HJGL\FileControl\ForeignStandardsViewEdit.aspx" />
<Content Include="HJGL\HotHardManage\HardReportSet.aspx" /> <Content Include="HJGL\HotHardManage\HardReportSet.aspx" />
<Content Include="HJGL\HotHardManage\HardReportSetDataIn.aspx" />
<Content Include="HJGL\HotHardManage\HardReportSetDataInEdit.aspx" />
<Content Include="HJGL\HotHardManage\HardTestReport.aspx" /> <Content Include="HJGL\HotHardManage\HardTestReport.aspx" />
<Content Include="HJGL\HotHardManage\HardTestReportEdit.aspx" /> <Content Include="HJGL\HotHardManage\HardTestReportEdit.aspx" />
<Content Include="HJGL\HotHardManage\HardTestResult.aspx" /> <Content Include="HJGL\HotHardManage\HardTestResult.aspx" />
@ -1383,6 +1386,7 @@
<Content Include="OfficeControl\OfficeControl.ocx" /> <Content Include="OfficeControl\OfficeControl.ocx" />
<Content Include="OfficeControl\signtoolcontrol.js" /> <Content Include="OfficeControl\signtoolcontrol.js" />
<Content Include="OfficeControl\手工卸载安装NTKO OFFICE文档控件.txt" /> <Content Include="OfficeControl\手工卸载安装NTKO OFFICE文档控件.txt" />
<Content Include="res\DataInTable.js" />
<Content Include="SYBData\ApplicationForm.aspx" /> <Content Include="SYBData\ApplicationForm.aspx" />
<Content Include="SYBData\BlindFlangeInstallationAndRemoval.aspx" /> <Content Include="SYBData\BlindFlangeInstallationAndRemoval.aspx" />
<Content Include="SYBData\Cover.aspx" /> <Content Include="SYBData\Cover.aspx" />
@ -5768,6 +5772,20 @@
<Compile Include="HJGL\HotHardManage\HardReportSet.aspx.designer.cs"> <Compile Include="HJGL\HotHardManage\HardReportSet.aspx.designer.cs">
<DependentUpon>HardReportSet.aspx</DependentUpon> <DependentUpon>HardReportSet.aspx</DependentUpon>
</Compile> </Compile>
<Compile Include="HJGL\HotHardManage\HardReportSetDataIn.aspx.cs">
<DependentUpon>HardReportSetDataIn.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\HotHardManage\HardReportSetDataIn.aspx.designer.cs">
<DependentUpon>HardReportSetDataIn.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\HotHardManage\HardReportSetDataInEdit.aspx.cs">
<DependentUpon>HardReportSetDataInEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\HotHardManage\HardReportSetDataInEdit.aspx.designer.cs">
<DependentUpon>HardReportSetDataInEdit.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\HotHardManage\HardTestReport.aspx.cs"> <Compile Include="HJGL\HotHardManage\HardTestReport.aspx.cs">
<DependentUpon>HardTestReport.aspx</DependentUpon> <DependentUpon>HardTestReport.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>

View File

@ -2,7 +2,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<Use64BitIISExpress /> <Use64BitIISExpress />
<IISExpressSSLPort /> <IISExpressSSLPort />
<IISExpressAnonymousAuthentication /> <IISExpressAnonymousAuthentication />

View File

@ -60,6 +60,9 @@
<f:Button ID="btnSave" Text="提交" ToolTip="提交硬度值" Icon="SystemSave" ValidateForms="SimpleForm1" runat="server" <f:Button ID="btnSave" Text="提交" ToolTip="提交硬度值" Icon="SystemSave" ValidateForms="SimpleForm1" runat="server"
OnClick="btnSave_Click"> OnClick="btnSave_Click">
</f:Button> </f:Button>
<f:Button ID="btnImport" Text="导入" ToolTip="导入硬度值" Icon="PageExcel" runat="server"
OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnGenerating" runat="server" Text="生成硬度检测报告" Icon="FolderTable" <f:Button ID="btnGenerating" runat="server" Text="生成硬度检测报告" Icon="FolderTable"
OnClick="btnGenerating_Click"> OnClick="btnGenerating_Click">
</f:Button> </f:Button>
@ -186,6 +189,10 @@
</f:Panel> </f:Panel>
</Items> </Items>
</f:Panel> </f:Panel>
<f:Window ID="Window1" Title="导入硬度值" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Width="1200px" Height="660px">
</f:Window>
</form> </form>
<script type="text/javascript"> <script type="text/javascript">
var grid1ClientID = '<%= Grid1.ClientID %>'; var grid1ClientID = '<%= Grid1.ClientID %>';

View File

@ -1,12 +1,13 @@
using System; using BLL;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using BLL;
using System.Windows.Forms; using System.Windows.Forms;
using Newtonsoft.Json.Linq; using static System.Windows.Forms.VisualStyles.VisualStyleElement;
using AspNet = System.Web.UI.WebControls; using AspNet = System.Web.UI.WebControls;
namespace FineUIPro.Web.HJGL.HotHardManage namespace FineUIPro.Web.HJGL.HotHardManage
@ -412,5 +413,17 @@ where Item.ProjectId=@ProjectId and HardTestReportId is null ";
BindGrid(); BindGrid();
} }
#endregion #endregion
protected void btnImport_Click(object sender, EventArgs e)
{
string window = String.Format("HardReportSetDataIn.aspx?projectId={0}", drpProjectId.SelectedValue, "导入 - ");
PageContext.RegisterStartupScript(Window1.GetSaveStateReference()
+ Window1.GetShowReference(window));
}
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
BindGrid();
}
} }
} }

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.HotHardManage { namespace FineUIPro.Web.HJGL.HotHardManage
{
public partial class HardReportSet { public partial class HardReportSet
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -111,6 +113,15 @@ namespace FineUIPro.Web.HJGL.HotHardManage {
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnSave; protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary> /// <summary>
/// btnGenerating 控件。 /// btnGenerating 控件。
/// </summary> /// </summary>
@ -218,5 +229,14 @@ namespace FineUIPro.Web.HJGL.HotHardManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize; protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
} }
} }

View File

@ -0,0 +1,163 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HardReportSetDataIn.aspx.cs" Inherits="FineUIPro.Web.HJGL.HotHardManage.HardReportSetDataIn" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>导入硬度值</title>
<style type="text/css">
.f-grid-row.red {
background-color: LightCoral;
}
.Label {
font-size: larger;
font-weight: bold;
}
</style>
<style type="text/css">
/*定义父容器*/
.content {
width: 550px;
height: 30px;
background: #E4F1FB;
margin: 0 auto;
}
/*定义进度条*/
.box {
width: 0px;
height: 30px;
line-height: 30px;
text-align: center;
background: #3BAAE3;
color: #fff;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:HiddenField ID="id" ClientIDMode="Static" runat="server"></f:HiddenField>
<f:Panel ID="Panel1" runat="server" Margin="2px" BodyPadding="2px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:HiddenField ID="hdfileName" runat="server"></f:HiddenField>
<f:FileUpload ID="FileExcel" runat="server" Label="数据文件" EmptyText="请上传EXCEl格式文件" Width="350px" LabelWidth="90px" LabelAlign="Right"></f:FileUpload>
<f:Button ID="imgbtnImport" runat="server" Text="上传" ToolTip="文件上传" OnClick="imgbtnImport_Click"></f:Button>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<%--<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="btnAllDelete" runat="server" Icon="Delete" Text="删除记录" ToolTip="删除当前人所有临时导入记录" ConfirmText="删除当前人所有临时导入记录?"
ConfirmTarget="Top" OnClick="btnAllDelete_Click">
</f:Button>
<f:Button ID="imgbtnUpload" runat="server" Icon="DiskDownload" Text="模板下载" OnClick="imgbtnUpload_Click" EnableAjaxLoading="false"></f:Button>
<%--<f:Button ID="lkAchievements" runat="server" Icon="DiskDownload" Text="导入说明" OnClick="lkAchievements_Click" EnableAjaxLoading="false"></f:Button>--%>
</Items>
<Items>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="数据导入" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="TempId" AllowCellEditing="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
EnableColumnLines="true" ClicksToEdit="2" DataIDField="TempId" AllowSorting="true"
SortField="RowNo" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
<f:RenderField Width="70px" HeaderText="行号" ColumnID="RowNo" DataField="RowNo" SortField="RowNo"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="250px" HeaderText="管线号" ColumnID="Value1" DataField="Value1" SortField="Value1"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:WindowField ColumnID="Value2" HeaderTextAlign="Center" TextAlign="Left" Width="120px" WindowID="Window1" HeaderText="焊口号"
DataTextField="Value2" DataIFrameUrlFields="TempId" DataIFrameUrlFormatString="HardReportSetDataInEdit.aspx?TempId={0}"
Title="数据导入" DataToolTipField="ToopValue" SortField="Value2">
</f:WindowField>
<f:RenderField Width="130px" HeaderText="试验部位" ColumnID="Value3" DataField="Value3" SortField="Value3"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="120px" HeaderText="硬度值1" ColumnID="Value4" DataField="Value4" SortField="Value4"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="120px" HeaderText="硬度值2" ColumnID="Value5" DataField="Value5" SortField="Value5"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="120px" HeaderText="硬度值3" ColumnID="Value6" DataField="Value6" SortField="Value6"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" HeaderText="备注" ColumnID="Value7" DataField="Value7" SortField="Value7"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<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" />
</f:DropDownList>
<f:Label Label="错误记录数" runat="server" ID="lbDataCout" CssClass="Label" LabelAlign="right" LabelWidth="120px"></f:Label>
</PageItems>
</f:Grid>
</Items>
</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">
</f:Window>
<f:Window ID="Window2" Hidden="true" runat="server" MinHeight="30px"
Target="Parent" ShowHeader="false" BodyPadding="0" Margin="0"
IsModal="true" Width="550px" Height="32px">
<Items>
<f:ContentPanel ShowBorder="false" Height="30px" ShowHeader="false" ID="ContentPanel3" runat="server">
<div class="content" id="content">
<div class="box" id="box"></div>
</div>
</f:ContentPanel>
</Items>
</f:Window>
<f:Menu ID="Menu1" ClientIDMode="Static" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Icon="TableEdit">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="Delete">
</f:MenuButton>
</f:Menu>
<asp:ScriptManager ID="ScriptManager2" runat="server" EnablePageMethods="true">
<Scripts>
<asp:ScriptReference Path="../../res/DataInTable.js" />
</Scripts>
</asp:ScriptManager>
</form>
<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
</script>
</body>
</html>

View File

@ -0,0 +1,536 @@
using BLL;
using BLL.Common;
using Microsoft.JScript.Vsa;
using Model;
using Org.BouncyCastle.Ocsp;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Threading;
namespace FineUIPro.Web.HJGL.HotHardManage
{
public partial class HardReportSetDataIn : PageBase
{
#region
/// <summary>
/// 项目id
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 错误集合
/// </summary>
public static string errorInfos = string.Empty;
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (percent == null)
{
percent = new Dictionary<string, int>();
}
this.ProjectId = Request.Params["projectId"];
this.id.Text = this.CurrUser.UserId;
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
this.BindGrid();
}
else if (GetRequestEventArgument() == "reloadGrid")
{
BindGrid();
}
}
#endregion
#region
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
string strSql = @"SELECT TempId,ProjectId,UserId,Time,RowNo,ToopValue,Value1,Value2,Value3,Value4,Value5,Value6,Value7,Value8,Value9,Value10"
+ @" ,Value11,Value12,Value13,Value14,Value15,Value16,Value17,Value18,Value19,Value20"
+ @",ToopValue,Type"
+ @" FROM Sys_DataInTemp "
+ @" WHERE ProjectId=@ProjectId AND UserId=@UserId AND Type=@Type";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
listStr.Add(new SqlParameter("@UserId", this.CurrUser.UserId));
listStr.Add(new SqlParameter("@Type", "HardValue"));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
var dataInTempAll = from x in Funs.DB.Sys_DataInTemp
where x.ProjectId == this.ProjectId && x.UserId == this.CurrUser.UserId && x.Type == "HardValue"
select x;
for (int i = 0; i < Grid1.Rows.Count; i++)
{
var dataInTemp = dataInTempAll.FirstOrDefault(x => x.TempId == Grid1.Rows[i].DataKeys[0].ToString());
if (dataInTemp != null)
{
if (!string.IsNullOrEmpty(dataInTemp.ToopValue))
{
Grid1.Rows[i].RowCssClass = "red";
}
}
}
var errData = from x in dataInTempAll where x.ToopValue != null select x;
this.lbDataCout.Text = errData.Count().ToString();
}
#endregion
#region
/// <summary>
/// Grid行双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HardReportSetDataInEdit.aspx?TempId={0}&&projectId={1}", Grid1.SelectedRowID, this.ProjectId, "维护 - ")));
}
#endregion
#region
/// <summary>
/// 导入信息编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HardReportSetDataInEdit.aspx?TempId={0}&&projectId={1}", Grid1.SelectedRowID, this.ProjectId, "维护 - ")));
}
/// <summary>
/// 删除按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
return;
}
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
BLL.Sys_DataInTempService.DeleteDataInTempByDataInTempID(rowID);
}
ShowNotify("删除成功!", MessageBoxIcon.Success);
this.BindGrid();
}
#endregion
#region
/// <summary>
/// 分页
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
/// <summary>
/// 分页显示条数下拉框
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 文件上传
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void imgbtnImport_Click(object sender, EventArgs e)
{
try
{
if (this.FileExcel.HasFile == false)
{
ShowNotify("请选择Excel文件!", MessageBoxIcon.Warning);
return;
}
string IsXls = Path.GetExtension(this.FileExcel.FileName).ToString().Trim().ToLower();
if (IsXls != ".xls" && IsXls != ".xlsx")
{
ShowNotify("只能选择Excel文件!", MessageBoxIcon.Warning);
return;
}
string rootPath = Server.MapPath("~/");
string initFullPath = rootPath + Const.ExcelUrl;
if (!Directory.Exists(initFullPath))
{
Directory.CreateDirectory(initFullPath);
}
//指定上传文件名称
this.hdfileName.Text = BLL.Funs.GetNewFileName() + IsXls;
//上传文件路径
string filePath = initFullPath + this.hdfileName.Text;
//文件上传服务器
this.FileExcel.PostedFile.SaveAs(filePath);
//文件上传服务器后的名称
string fileName = rootPath + Const.ExcelUrl + this.hdfileName.Text;
//读取Excel
DataSet ds = NPOIHelper.ExcelToDataSet(fileName, out errorInfos, true);
//验证Excel读取是否有误
if (!string.IsNullOrEmpty(errorInfos))
{
ShowNotify(errorInfos, MessageBoxIcon.Warning);
return;
}
if (ds.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
Sys_DataInTemp newDataInTemp = new Sys_DataInTemp();
newDataInTemp.TempId = SQLHelper.GetNewID(typeof(Model.Sys_DataInTemp));
newDataInTemp.ProjectId = ProjectId;
newDataInTemp.UserId = this.CurrUser.UserId;
newDataInTemp.Time = DateTime.Now;
newDataInTemp.Type = "HardValue";
newDataInTemp.RowNo = i + 1;
newDataInTemp.Value1 = ds.Tables[0].Rows[i][0].ToString();
newDataInTemp.Value2 = ds.Tables[0].Rows[i][1].ToString();
newDataInTemp.Value3 = ds.Tables[0].Rows[i][2].ToString();
newDataInTemp.Value4 = ds.Tables[0].Rows[i][3].ToString();
newDataInTemp.Value5 = ds.Tables[0].Rows[i][4].ToString();
newDataInTemp.Value6 = ds.Tables[0].Rows[i][5].ToString();
newDataInTemp.Value7 = ds.Tables[0].Rows[i][6].ToString();
//newDataInTemp.Value8 = ds.Tables[0].Rows[i][7].ToString();
//newDataInTemp.Value9 = ds.Tables[0].Rows[i][8].ToString();
//newDataInTemp.Value10 = ds.Tables[0].Rows[i][9].ToString();
//newDataInTemp.Value11 = ds.Tables[0].Rows[i][10].ToString();
//newDataInTemp.Value12 = ds.Tables[0].Rows[i][11].ToString();
//newDataInTemp.Value13 = ds.Tables[0].Rows[i][12].ToString();
//newDataInTemp.Value14 = ds.Tables[0].Rows[i][13].ToString();
//newDataInTemp.Value15 = ds.Tables[0].Rows[i][14].ToString();
//newDataInTemp.Value16 = ds.Tables[0].Rows[i][15].ToString();
//newDataInTemp.Value17 = ds.Tables[0].Rows[i][16].ToString();
//newDataInTemp.Value18 = ds.Tables[0].Rows[i][17].ToString();
//newDataInTemp.Value19 = ds.Tables[0].Rows[i][18].ToString();
//newDataInTemp.Value20 = ds.Tables[0].Rows[i][19].ToString();
BLL.Sys_DataInTempService.AddDataInTemp(newDataInTemp);
}
this.BindGrid();
ShowNotify("数据已导入临时表!", MessageBoxIcon.Success);
File.Delete(fileName);//删除上传的临时文件
}
else
{
Alert.ShowInTop("导入数据为空!", MessageBoxIcon.Success);
return;
}
}
catch (Exception ex)
{
Alert.ShowInTop("'" + ex.Message + "'", MessageBoxIcon.Warning);
}
}
#endregion
#region
/// <summary>
/// 保存审核事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
Thread t = new Thread(new ThreadStart(() => { btnSaveMethod(ProjectId, this.CurrUser.UserId, "HardValue"); }));
t.Start();
if (percent.ContainsKey(this.CurrUser.UserId))
{
percent[CurrUser.UserId] = 0;
}
else
{
percent.Add(CurrUser.UserId, 0);
}
PageContext.RegisterStartupScript("printX()");
}
protected void btnRefresh_Click(object sender, EventArgs e)
{
this.BindGrid();
}
protected void btnSaveMethod(string LoginProjectId, string UserId, string type)
{
Model.SGGLDB db = Funs.DB;
var isoInfos = from x in db.HJGL_PW_IsoInfo where x.ProjectId == LoginProjectId select x;
var jointInfos = from x in db.HJGL_PW_JointInfo where x.ProjectId == LoginProjectId select x;
var hardTestReportItemSetView = from x in db.HJGL_View_CH_HardTestReportItemSet where x.ProjectId == LoginProjectId && x.HardTestReportId == null select x;
var dataInTemp = from x in Funs.DB.Sys_DataInTemp
where x.ProjectId == ProjectId && x.UserId == UserId && x.Type == type
select x;
int okCount = 0;
int i = 0;
int ir = dataInTemp.Count();
string erreMessage = "";
string isoId = string.Empty;
string jotId = string.Empty;
foreach (var tempData in dataInTemp)
{
if (tempData != null)
{
i++;
percent[UserId] = (int)(100 * i / ir);
string errInfo = string.Empty;
var isExitValue = hardTestReportItemSetView.FirstOrDefault(x => x.ISO_IsoNo == tempData.Value1.Trim() && x.JOT_JointNo == tempData.Value2.Trim() && x.TestPart == tempData.Value3.Trim());
if (isExitValue != null)
{
if (!string.IsNullOrEmpty(tempData.Value1.Trim()))
{
var getIso = isoInfos.FirstOrDefault(x => x.ISO_IsoNo == tempData.Value1.Trim());
if (getIso == null)
{
errInfo += "管线号[" + tempData.Value1.Trim() + "]不存在;";
}
else
{
isoId = getIso.ISO_ID;
}
}
else
{
errInfo += "管线号为必填项;";
}
if (!string.IsNullOrEmpty(tempData.Value2.Trim()))
{
var getJoint = jointInfos.FirstOrDefault(x => x.ISO_ID == isoId && x.JOT_JointNo == tempData.Value2.Trim());
if (getJoint == null)
{
errInfo += "焊口号[" + tempData.Value2.Trim() + "]不存在;";
}
else
{
jotId = getJoint.JOT_ID;
}
}
else
{
errInfo += "焊口号为必填项;";
}
if (!string.IsNullOrEmpty(tempData.Value3.Trim()))
{
if (tempData.Value3.Trim() != "焊缝" && tempData.Value3.Trim() != "热影响区")
{
errInfo += "试验部位[" + tempData.Value3.Trim() + "]错误;";
}
}
else
{
errInfo += "试验部位为必填项;";
}
if (!string.IsNullOrEmpty(tempData.Value4.Trim()))
{
try
{
int hardNessValue1 = Convert.ToInt32(tempData.Value4.Trim());
if (hardNessValue1 > 999)
{
errInfo += "硬度值1[" + tempData.Value4.Trim() + "]不能超过3位数";
}
}
catch (Exception)
{
errInfo += "硬度值1[" + tempData.Value4.Trim() + "]格式错误;";
}
}
else
{
errInfo += "硬度值1为必填项";
}
if (!string.IsNullOrEmpty(tempData.Value5.Trim()))
{
try
{
int hardNessValue2 = Convert.ToInt32(tempData.Value5.Trim());
if (hardNessValue2 > 999)
{
errInfo += "硬度值1[" + tempData.Value5.Trim() + "]不能超过3位数";
}
}
catch (Exception)
{
errInfo += "硬度值2[" + tempData.Value5.Trim() + "]格式错误;";
}
}
else
{
errInfo += "硬度值2为必填项";
}
if (!string.IsNullOrEmpty(tempData.Value6.Trim()))
{
try
{
int hardNessValue3 = Convert.ToInt32(tempData.Value6.Trim());
if (hardNessValue3 > 999)
{
errInfo += "硬度值3[" + tempData.Value6.Trim() + "]不能超过3位数";
}
}
catch (Exception)
{
errInfo += "硬度值3[" + tempData.Value6.Trim() + "]格式错误;";
}
}
else
{
errInfo += "硬度值3为必填项";
}
}
else
{
errInfo += "该记录不存在,请核对;";
}
if (string.IsNullOrEmpty(errInfo)) ////所有信息正确的话 插入数据
{
var item1 = (from x in db.HJGL_CH_HardTestReportItem where x.HardTestReportItemId == isExitValue.HardTestReportItemId select x).FirstOrDefault();
if (item1 != null)
{
item1.HardNessValue = Funs.GetNewInt(tempData.Value4.Trim());
item1.Remark = tempData.Value7.Trim();
}
var item2 = (from x in db.HJGL_CH_HardTestReportItem where x.HardTestReportItemId == isExitValue.HardTestReportItemId2 select x).FirstOrDefault();
if (item2 != null)
{
item2.HardNessValue = Funs.GetNewInt(tempData.Value5.Trim());
item2.Remark = tempData.Value7.Trim();
}
var item3 = (from x in db.HJGL_CH_HardTestReportItem where x.HardTestReportItemId == isExitValue.HardTestReportItemId3 select x).FirstOrDefault();
if (item3 != null)
{
item3.HardNessValue = Funs.GetNewInt(tempData.Value6.Trim());
item3.Remark = tempData.Value7.Trim();
}
db.SubmitChanges();
BLL.Sys_DataInTempService.DeleteDataInTempByDataInTempID(tempData.TempId);
okCount++;
}
if (!string.IsNullOrEmpty(errInfo))
{
tempData.ToopValue = errInfo;
BLL.Sys_DataInTempService.UpdateDataInTemp(tempData);
erreMessage += errInfo + ";";
}
}
}
}
#endregion
#region
/// <summary>
/// 删除所有数据事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAllDelete_Click(object sender, EventArgs e)
{
//先删除临时表中 该人员以前导入的数据
BLL.Sys_DataInTempService.DeleteDataInTempByProjectIdUserId(ProjectId, this.CurrUser.UserId, "HardValue");
this.BindGrid();
ShowNotify("删除成功!", MessageBoxIcon.Success);
this.lbDataCout.Text = string.Empty;
}
#endregion
#region
/// <summary>
/// 下载模版
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void imgbtnUpload_Click(object sender, EventArgs e)
{
string rootPath = Server.MapPath("~/");
string uploadfilepath = rootPath + Const.HardReportSetTemplateUrl;
string filePath = Const.HardReportSetTemplateUrl;
string fileName = Path.GetFileName(filePath);
FileInfo info = new FileInfo(uploadfilepath);
long fileSize = info.Length;
Response.ClearContent();
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
Response.ContentType = "excel/plain";
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
Response.TransmitFile(uploadfilepath, 0, fileSize);
Response.End();
}
#endregion
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)
{
return percent[id];
}
}
}

View File

@ -0,0 +1,242 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.HotHardManage
{
public partial class HardReportSetDataIn
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// id 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField id;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// hdfileName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdfileName;
/// <summary>
/// FileExcel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload FileExcel;
/// <summary>
/// imgbtnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button imgbtnImport;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnRefresh 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnRefresh;
/// <summary>
/// btnAllDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAllDelete;
/// <summary>
/// imgbtnUpload 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button imgbtnUpload;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// lbDataCout 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbDataCout;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// ContentPanel3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel3;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDelete;
/// <summary>
/// ScriptManager2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.ScriptManager ScriptManager2;
}
}

View File

@ -0,0 +1,67 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HardReportSetDataInEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.HotHardManage.HardReportSetDataInEdit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>修改错误信息</title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtValue1" Label="管线号" ShowRedStar="true" Required="true" runat="server" FocusOnPageLoad="true" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtValue2" Label="焊口号" ShowRedStar="true" Required="true" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtValue3" Label="试验部位" runat="server" LabelWidth="120px" Required="true" ShowRedStar="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtValue4" Label="硬度值1" Required="true" ShowRedStar="true" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtValue5" Label="硬度值2" runat="server" LabelWidth="120px" Required="true" ShowRedStar="true">
</f:TextBox>
<f:TextBox ID="txtValue6" Label="硬度值3" runat="server" LabelWidth="120px" Required="true" ShowRedStar="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtValue7" Label="备注" runat="server" LabelWidth="120px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:CheckBox ID="ckAll" runat="server" Checked="true" Text="是否批量修改" ShowEmptyLabel="true" LabelWidth="120px"></f:CheckBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea runat="server" Label="错误信息" ID="lbErrCout" Readonly="true" LabelWidth="120px"></f:TextArea>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</form>
</body>
</html>

View File

@ -0,0 +1,207 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.HJGL.HotHardManage
{
public partial class HardReportSetDataInEdit : PageBase
{
#region
/// <summary>
/// 临时表主键
/// </summary>
public string TempId
{
get
{
return (string)ViewState["TempId"];
}
set
{
ViewState["TempId"] = value;
}
}
/// <summary>
/// 项目id
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.TempId = Request.Params["TempId"];
this.ProjectId = Request.Params["projectId"];
this.txtValue1.Focus();
var dataInTemp = BLL.Sys_DataInTempService.GetDataInTempByTempId(this.TempId);
if (dataInTemp != null)
{
this.txtValue1.Text = dataInTemp.Value1;
this.txtValue2.Text = dataInTemp.Value2;
this.txtValue3.Text = dataInTemp.Value3;
this.txtValue4.Text = dataInTemp.Value4;
this.txtValue5.Text = dataInTemp.Value5;
this.txtValue6.Text = dataInTemp.Value6;
this.txtValue7.Text = dataInTemp.Value7;
this.lbErrCout.Text = dataInTemp.ToopValue;
}
}
}
#endregion
#region
/// <summary>
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
var dataInTemp = BLL.Sys_DataInTempService.GetDataInTempByTempId(this.TempId);
if (this.ckAll.Checked)
{
var allDataInTemp = from x in Funs.DB.Sys_DataInTemp where x.ProjectId == this.ProjectId && x.UserId == this.CurrUser.UserId && x.Type == "HardValue" select x;
if (dataInTemp.Value1 != this.txtValue1.Text.Trim())
{
var tempValue1 = allDataInTemp.Where(x => x.Value1 == dataInTemp.Value1 || (x.Value1 == null && dataInTemp.Value1 == null));
if (tempValue1 != null)
{
foreach (var item in tempValue1)
{
item.Value1 = this.txtValue1.Text.Trim();
Funs.DB.SubmitChanges();
}
}
}
if (dataInTemp.Value2 != this.txtValue2.Text.Trim())
{
var tempValue2 = allDataInTemp.Where(x => x.Value2 == dataInTemp.Value2 || (x.Value2 == null && dataInTemp.Value2 == null));
if (tempValue2 != null)
{
foreach (var item in tempValue2)
{
item.Value2 = this.txtValue2.Text.Trim();
Funs.DB.SubmitChanges();
}
}
}
if (dataInTemp.Value3 != this.txtValue3.Text.Trim())
{
var tempValue3 = allDataInTemp.Where(x => x.Value3 == dataInTemp.Value3 || (x.Value3 == null && dataInTemp.Value3 == null));
if (tempValue3 != null)
{
foreach (var item in tempValue3)
{
item.Value3 = this.txtValue3.Text.Trim();
Funs.DB.SubmitChanges();
}
}
}
if (dataInTemp.Value4 != this.txtValue4.Text.Trim())
{
var tempValue4 = allDataInTemp.Where(x => x.Value4 == dataInTemp.Value4 || (x.Value4 == null && dataInTemp.Value4 == null));
if (tempValue4 != null)
{
foreach (var item in tempValue4)
{
item.Value4 = this.txtValue4.Text.Trim();
Funs.DB.SubmitChanges();
}
}
}
if (dataInTemp.Value5 != this.txtValue5.Text.Trim())
{
var tempValue5 = allDataInTemp.Where(x => x.Value5 == dataInTemp.Value5 || (x.Value5 == null && dataInTemp.Value5 == null));
if (tempValue5 != null)
{
foreach (var item in tempValue5)
{
item.Value5 = this.txtValue5.Text.Trim();
Funs.DB.SubmitChanges();
}
}
}
if (dataInTemp.Value6 != this.txtValue6.Text.Trim())
{
var tempValue6 = allDataInTemp.Where(x => x.Value6 == dataInTemp.Value6 || (x.Value6 == null && dataInTemp.Value6 == null));
if (tempValue6 != null)
{
foreach (var item in tempValue6)
{
item.Value6 = this.txtValue6.Text.Trim();
Funs.DB.SubmitChanges();
}
}
}
if (dataInTemp.Value7 != this.txtValue7.Text.Trim())
{
var tempValue7 = allDataInTemp.Where(x => x.Value7 == dataInTemp.Value7 || (x.Value7 == null && dataInTemp.Value7 == null));
if (tempValue7 != null)
{
foreach (var item in tempValue7)
{
item.Value7 = this.txtValue7.Text.Trim();
Funs.DB.SubmitChanges();
}
}
}
var toopValue = allDataInTemp.Where(x => x.ToopValue == dataInTemp.ToopValue);
if (toopValue != null)
{
foreach (var item in toopValue)
{
item.ToopValue = null;
Funs.DB.SubmitChanges();
}
}
}
else
{
Model.Sys_DataInTemp newDataInTemp = new Model.Sys_DataInTemp();
newDataInTemp.ProjectId = ProjectId;
newDataInTemp.UserId = this.CurrUser.UserId;
newDataInTemp.Time = DateTime.Now;
newDataInTemp.Type = "HardValue";
newDataInTemp.Value1 = this.txtValue1.Text.Trim();
newDataInTemp.Value2 = this.txtValue2.Text.Trim();
newDataInTemp.Value3 = this.txtValue3.Text.Trim();
newDataInTemp.Value4 = this.txtValue4.Text.Trim();
newDataInTemp.Value5 = this.txtValue5.Text.Trim();
newDataInTemp.Value6 = this.txtValue6.Text.Trim();
newDataInTemp.Value7 = this.txtValue7.Text.Trim();
if (!string.IsNullOrEmpty(this.TempId))
{
newDataInTemp.TempId = this.TempId;
newDataInTemp.ToopValue = null;
BLL.Sys_DataInTempService.UpdateDataInTemp(newDataInTemp);
}
}
ShowNotify("信息修改完成!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
#endregion
}
}

View File

@ -0,0 +1,152 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.HotHardManage
{
public partial class HardReportSetDataInEdit
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// txtValue1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue1;
/// <summary>
/// txtValue2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue2;
/// <summary>
/// txtValue3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue3;
/// <summary>
/// txtValue4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue4;
/// <summary>
/// txtValue5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue5;
/// <summary>
/// txtValue6 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue6;
/// <summary>
/// txtValue7 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue7;
/// <summary>
/// ckAll 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckAll;
/// <summary>
/// lbErrCout 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea lbErrCout;
}
}

View File

@ -576,6 +576,11 @@ namespace FineUIPro.Web.HJGL.WeldingReport
{ {
keyValuePairs.Add("NDTType", "PT"); keyValuePairs.Add("NDTType", "PT");
} }
if (this.drpWeldingDate.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpWeldingDate.SelectedValue))
{
string weldingDate = string.Format("{0:yyyy年MM月dd日}", Convert.ToDateTime(this.drpWeldingDate.SelectedValue));
keyValuePairs.Add("WeldingDate", weldingDate);
}
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
initTemplatePath = "File\\Fastreport\\管道焊接接头报检检查记录.frx"; initTemplatePath = "File\\Fastreport\\管道焊接接头报检检查记录.frx";

View File

@ -346,6 +346,11 @@ namespace FineUIPro.Web.JGZL
{ {
keyValuePairs.Add("NDTType", "PT"); keyValuePairs.Add("NDTType", "PT");
} }
if (this.drpWeldingDate.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpWeldingDate.SelectedValue))
{
string weldingDate = string.Format("{0:yyyy年MM月dd日}", Convert.ToDateTime(this.drpWeldingDate.SelectedValue));
keyValuePairs.Add("WeldingDate", weldingDate);
}
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
initTemplatePath = "File\\Fastreport\\JGZL\\管道焊接接头报检检查记录.frx"; initTemplatePath = "File\\Fastreport\\JGZL\\管道焊接接头报检检查记录.frx";

View File

@ -67,7 +67,7 @@
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> <add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
<add path="FastReport.Export.axd" verb="*" type="FastReport.Web.Handlers.WebExport"/> <add path="FastReport.Export.axd" verb="*" type="FastReport.Web.Handlers.WebExport"/>
</httpHandlers> </httpHandlers>
<compilation debug="false" targetFramework="4.6.1"> <compilation debug="true" targetFramework="4.6.1">
<assemblies> <assemblies>
<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies> </assemblies>

View File

@ -0,0 +1,54 @@
var menuID = 'Menu1';
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
function parse(y) {
var box = document.getElementById("box");
//获取进度条div的宽度
var x = box.style.width;
x = parseInt(x) + 1;
y = y + 1;
//将y值加上百分号赋值给box的宽度。这样每次+1就可以实现进度条占父容器的100%;
box.style.width = y + "%";
//将y值加上百分号并赋值给显示下载百分比的div上
document.getElementById("box").innerHTML = y + "%";
//判断当y已经100的时候也就是进度条的宽度和父容器的宽度一致的时候停止。
if (y >= 100) {
document.getElementById("box").innerHTML = "100%";
}
}
function printX() {
var userid = document.getElementById('id-inputEl').value;
F.ui.Window2.show();
parse(0);
var begin = setInterval(function () {
PageMethods.getPercent(userid,function (result) {
console.log(result);
parse(result);
if (result >= 100) {
F.ui.Window2.hide();
document.getElementById('btnRefresh').click();
clearInterval(begin);
}
});
}, 1000);
y = 0;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress /> <Use64BitIISExpress />