1
This commit is contained in:
@@ -31,4 +31,24 @@ INSERT INTO Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
|||||||
VALUES (NEWID(),N'D1B5A8B7-5D2A-4C51-9B7E-6A2F15B7F002',N'修改',3);
|
VALUES (NEWID(),N'D1B5A8B7-5D2A-4C51-9B7E-6A2F15B7F002',N'修改',3);
|
||||||
GO
|
GO
|
||||||
|
|
||||||
GO
|
GO
|
||||||
|
-- 焊工维护:考试时间
|
||||||
|
IF COL_LENGTH('dbo.SitePerson_Person', 'ExamDate') IS NULL
|
||||||
|
BEGIN
|
||||||
|
ALTER TABLE dbo.SitePerson_Person ADD ExamDate DATETIME NULL;
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
-- 热处理报告:报告日期
|
||||||
|
IF COL_LENGTH('dbo.HJGL_HotProess_Trust', 'ReportDate') IS NULL
|
||||||
|
BEGIN
|
||||||
|
ALTER TABLE dbo.HJGL_HotProess_Trust ADD ReportDate DATETIME NULL;
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
-- 硬度检测报告:报告日期
|
||||||
|
IF COL_LENGTH('dbo.HJGL_Hard_Trust', 'ReportDate') IS NULL
|
||||||
|
BEGIN
|
||||||
|
ALTER TABLE dbo.HJGL_Hard_Trust ADD ReportDate DATETIME NULL;
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ namespace BLL
|
|||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
var query = from x in db.HJGL_WeldJoint
|
var query = from x in db.HJGL_WeldJoint
|
||||||
|
join p in db.Base_Project on x.ProjectId equals p.ProjectId into projects
|
||||||
|
from p in projects.DefaultIfEmpty()
|
||||||
join g in db.Base_GrooveType on x.GrooveTypeId equals g.GrooveTypeId into grooveTypes
|
join g in db.Base_GrooveType on x.GrooveTypeId equals g.GrooveTypeId into grooveTypes
|
||||||
from g in grooveTypes.DefaultIfEmpty()
|
from g in grooveTypes.DefaultIfEmpty()
|
||||||
where x.WeldJointId == weldJointId
|
where x.WeldJointId == weldJointId
|
||||||
@@ -29,6 +31,7 @@ namespace BLL
|
|||||||
PipelineId = x.PipelineId,
|
PipelineId = x.PipelineId,
|
||||||
PipelineCode = x.PipelineCode,
|
PipelineCode = x.PipelineCode,
|
||||||
ProjectId = x.ProjectId,
|
ProjectId = x.ProjectId,
|
||||||
|
ProjectName = p == null ? string.Empty : p.ProjectName,
|
||||||
GrooveTypeId = x.GrooveTypeId,
|
GrooveTypeId = x.GrooveTypeId,
|
||||||
GrooveTypeCode = g == null ? string.Empty : g.GrooveTypeCode,
|
GrooveTypeCode = g == null ? string.Empty : g.GrooveTypeCode,
|
||||||
GrooveTypeName = g == null ? string.Empty : g.GrooveTypeName,
|
GrooveTypeName = g == null ? string.Empty : g.GrooveTypeName,
|
||||||
|
|||||||
@@ -112,6 +112,13 @@
|
|||||||
<f:CheckBox ID="cbIsOnDuty" runat="server" Label="是否在岗" Enabled="false"
|
<f:CheckBox ID="cbIsOnDuty" runat="server" Label="是否在岗" Enabled="false"
|
||||||
LabelWidth="120px">
|
LabelWidth="120px">
|
||||||
</f:CheckBox>
|
</f:CheckBox>
|
||||||
|
<f:Label ID="txtExamDate" runat="server" Label="考试时间"
|
||||||
|
LabelWidth="120px">
|
||||||
|
</f:Label>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
<f:Label ID="txtCertificateLimitTime" runat="server" Label="有效期"
|
<f:Label ID="txtCertificateLimitTime" runat="server" Label="有效期"
|
||||||
LabelWidth="120px" Hidden="true">
|
LabelWidth="120px" Hidden="true">
|
||||||
</f:Label>
|
</f:Label>
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
|
|||||||
this.txtCertificateLimitTime.Text = string.Format("{0:yyyy-MM-dd}", welder.CertificateLimitTime);
|
this.txtCertificateLimitTime.Text = string.Format("{0:yyyy-MM-dd}", welder.CertificateLimitTime);
|
||||||
}
|
}
|
||||||
this.txtWelderLevel.Text = welder.WelderLevel;
|
this.txtWelderLevel.Text = welder.WelderLevel;
|
||||||
|
this.txtExamDate.Text = GetWelderExamDate(welder.SitePersonId);
|
||||||
//if (welder.IsUsed == true)
|
//if (welder.IsUsed == true)
|
||||||
//{
|
//{
|
||||||
// cbIsOnDuty.Checked = true;
|
// cbIsOnDuty.Checked = true;
|
||||||
@@ -84,11 +85,30 @@ namespace FineUIPro.Web.CQMS.PersonManage
|
|||||||
this.txtCertificateCode.Text = string.Empty;
|
this.txtCertificateCode.Text = string.Empty;
|
||||||
this.txtCertificateLimitTime.Text = string.Empty;
|
this.txtCertificateLimitTime.Text = string.Empty;
|
||||||
this.txtWelderLevel.Text = string.Empty;
|
this.txtWelderLevel.Text = string.Empty;
|
||||||
|
this.txtExamDate.Text = string.Empty;
|
||||||
cbIsOnDuty.Checked = false;
|
cbIsOnDuty.Checked = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 读取焊工考试时间,新增字段未纳入 DBML 时通过参数化 SQL 获取。
|
||||||
|
/// </summary>
|
||||||
|
private string GetWelderExamDate(string sitePersonId)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(sitePersonId))
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
string strSql = @"SELECT ExamDate FROM SitePerson_Person WHERE SitePersonId=@SitePersonId";
|
||||||
|
DataTable dt = SQLHelper.GetDataTableRunText(strSql, new SqlParameter("@SitePersonId", sitePersonId));
|
||||||
|
if (dt.Rows.Count > 0 && dt.Rows[0]["ExamDate"] != DBNull.Value)
|
||||||
|
{
|
||||||
|
return string.Format("{0:yyyy-MM-dd}", dt.Rows[0]["ExamDate"]);
|
||||||
|
}
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
#region 绑定数据-资质信息
|
#region 绑定数据-资质信息
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -601,4 +621,4 @@ namespace FineUIPro.Web.CQMS.PersonManage
|
|||||||
#endregion
|
#endregion
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -228,6 +228,15 @@ namespace FineUIPro.Web.CQMS.PersonManage {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.CheckBox cbIsOnDuty;
|
protected global::FineUIPro.CheckBox cbIsOnDuty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtExamDate 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Label txtExamDate;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtCertificateLimitTime 控件。
|
/// txtCertificateLimitTime 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -79,6 +79,9 @@
|
|||||||
<f:TextBox ID="txtWelderLevel" runat="server" Label="焊工等级"
|
<f:TextBox ID="txtWelderLevel" runat="server" Label="焊工等级"
|
||||||
MaxLength="50" LabelWidth="120px">
|
MaxLength="50" LabelWidth="120px">
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
|
<f:DatePicker ID="txtExamDate" runat="server" Label="考试时间"
|
||||||
|
LabelWidth="120px" DateFormatString="yyyy-MM-dd">
|
||||||
|
</f:DatePicker>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
<f:Panel ID="Panel5" Title="面板1" BoxFlex="3" runat="server" ShowBorder="false" ShowHeader="false"
|
<f:Panel ID="Panel5" Title="面板1" BoxFlex="3" runat="server" ShowBorder="false" ShowHeader="false"
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
using BLL;
|
using BLL;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace FineUIPro.Web.CQMS.PersonManage
|
namespace FineUIPro.Web.CQMS.PersonManage
|
||||||
@@ -109,6 +111,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
|
|||||||
// this.txtCertificateLimitTime.Text = string.Format("{0:yyyy-MM-dd}", welder.CertificateLimitTime);
|
// this.txtCertificateLimitTime.Text = string.Format("{0:yyyy-MM-dd}", welder.CertificateLimitTime);
|
||||||
//}
|
//}
|
||||||
this.txtWelderLevel.Text = welder.WelderLevel;
|
this.txtWelderLevel.Text = welder.WelderLevel;
|
||||||
|
this.txtExamDate.Text = GetWelderExamDate(welder.SitePersonId);
|
||||||
if (welder.States == Const.ProjectPersonStates_1)
|
if (welder.States == Const.ProjectPersonStates_1)
|
||||||
{
|
{
|
||||||
cbIsUsed.Checked = true;
|
cbIsUsed.Checked = true;
|
||||||
@@ -202,6 +205,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
|
|||||||
{
|
{
|
||||||
newWelder.PersonId = PersonId;
|
newWelder.PersonId = PersonId;
|
||||||
BLL.WelderService.UpdateWelder(newWelder);
|
BLL.WelderService.UpdateWelder(newWelder);
|
||||||
|
SaveWelderExamDate(PersonId);
|
||||||
//BLL.Sys_LogService.AddLog(Const.System_1, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.WelderManageMenuId, Const.BtnModify, PersonId);
|
//BLL.Sys_LogService.AddLog(Const.System_1, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.WelderManageMenuId, Const.BtnModify, PersonId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -225,6 +229,45 @@ namespace FineUIPro.Web.CQMS.PersonManage
|
|||||||
}
|
}
|
||||||
return PersonId;
|
return PersonId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 读取焊工考试时间,兼容新增字段未纳入 DBML 的情况。
|
||||||
|
/// </summary>
|
||||||
|
private string GetWelderExamDate(string sitePersonId)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(sitePersonId))
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
string strSql = @"SELECT ExamDate FROM SitePerson_Person WHERE SitePersonId=@SitePersonId";
|
||||||
|
DataTable dt = SQLHelper.GetDataTableRunText(strSql, new SqlParameter("@SitePersonId", sitePersonId));
|
||||||
|
if (dt.Rows.Count > 0 && dt.Rows[0]["ExamDate"] != DBNull.Value)
|
||||||
|
{
|
||||||
|
return string.Format("{0:yyyy-MM-dd}", dt.Rows[0]["ExamDate"]);
|
||||||
|
}
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 保存焊工考试时间,和焊工基础信息同表存储。
|
||||||
|
/// </summary>
|
||||||
|
private void SaveWelderExamDate(string personId)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(personId))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
string strSql = @"UPDATE SitePerson_Person SET ExamDate=@ExamDate WHERE ProjectId=@ProjectId AND PersonId=@PersonId";
|
||||||
|
SqlParameter examDate = new SqlParameter("@ExamDate", SqlDbType.DateTime);
|
||||||
|
var newExamDate = Funs.GetNewDateTime(this.txtExamDate.Text.Trim());
|
||||||
|
examDate.Value = newExamDate.HasValue ? (object)newExamDate.Value : DBNull.Value;
|
||||||
|
SQLHelper.ExecuteCommand(CommandType.Text, strSql, new SqlParameter[]
|
||||||
|
{
|
||||||
|
examDate,
|
||||||
|
new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId),
|
||||||
|
new SqlParameter("@PersonId", personId)
|
||||||
|
});
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
protected void drpUnitId_SelectedIndexChanged(object sender, EventArgs e)
|
protected void drpUnitId_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
@@ -319,4 +362,4 @@ namespace FineUIPro.Web.CQMS.PersonManage
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,6 +156,15 @@ namespace FineUIPro.Web.CQMS.PersonManage {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtWelderLevel;
|
protected global::FineUIPro.TextBox txtWelderLevel;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtExamDate 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DatePicker txtExamDate;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Panel5 控件。
|
/// Panel5 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="2026-05-18" ReportInfo.Modified="06/17/2026 10:53:39" ReportInfo.CreatorVersion="2017.1.16.0">
|
<Report ScriptLanguage="CSharp" ReportInfo.Created="2026-05-18" ReportInfo.Modified="06/17/2026 17:42:00" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||||
<Dictionary>
|
<Dictionary>
|
||||||
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
|
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
|
||||||
<Column Name="Id" DataType="System.String"/>
|
<Column Name="Id" DataType="System.String"/>
|
||||||
@@ -13,8 +13,8 @@
|
|||||||
</TableDataSource>
|
</TableDataSource>
|
||||||
</Dictionary>
|
</Dictionary>
|
||||||
<ReportPage Name="Page1" PaperWidth="80" PaperHeight="30" LeftMargin="0" TopMargin="0" RightMargin="0" BottomMargin="0">
|
<ReportPage Name="Page1" PaperWidth="80" PaperHeight="30" LeftMargin="0" TopMargin="0" RightMargin="0" BottomMargin="0">
|
||||||
<DataBand Name="Data1" Width="302.4" Height="122.93" DataSource="Table1">
|
<DataBand Name="Data1" Width="302.4" Height="100" DataSource="Table1">
|
||||||
<BarcodeObject Name="Barcode1" Left="9.45" Top="18.9" Width="281.91" Height="85.43" AutoSize="false" Text="[Table1.BarCode]" AllowExpressions="true" Barcode="Code128" Barcode.AutoEncode="true"/>
|
<BarcodeObject Name="Barcode1" Left="11.34" Top="7.56" Width="206" Height="88" AutoSize="false" Text="[Table1.BarCode]" ShowText="false" AllowExpressions="true" Barcode="PDF417" Barcode.AspectRatio="0.5" Barcode.Columns="0" Barcode.Rows="0" Barcode.CodePage="437" Barcode.CompactionMode="Auto" Barcode.ErrorCorrection="Auto" Barcode.PixelSize="2, 8"/>
|
||||||
</DataBand>
|
</DataBand>
|
||||||
</ReportPage>
|
</ReportPage>
|
||||||
</Report>
|
</Report>
|
||||||
|
|||||||
@@ -61,6 +61,9 @@
|
|||||||
<f:Label ID="txtEquipmentModel" Label="设备型号" runat="server"
|
<f:Label ID="txtEquipmentModel" Label="设备型号" runat="server"
|
||||||
LabelWidth="180px" LabelAlign="Right">
|
LabelWidth="180px" LabelAlign="Right">
|
||||||
</f:Label>
|
</f:Label>
|
||||||
|
<f:Label ID="txtReportDate" Label="报告日期" runat="server"
|
||||||
|
LabelWidth="180px" LabelAlign="Right">
|
||||||
|
</f:Label>
|
||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
</Rows>
|
</Rows>
|
||||||
|
|||||||
@@ -253,8 +253,27 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
|||||||
this.txtHardnessMethod.Text = trust.HardnessMethod;
|
this.txtHardnessMethod.Text = trust.HardnessMethod;
|
||||||
this.txtInspectionNum.Text = trust.InspectionNum;
|
this.txtInspectionNum.Text = trust.InspectionNum;
|
||||||
this.txtEquipmentModel.Text = trust.EquipmentModel;
|
this.txtEquipmentModel.Text = trust.EquipmentModel;
|
||||||
|
this.txtReportDate.Text = GetHardReportDate(trust.HardTrustID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 读取硬度检测报告日期,新增字段未纳入 DBML 时通过参数化 SQL 获取。
|
||||||
|
/// </summary>
|
||||||
|
private string GetHardReportDate(string hardTrustID)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(hardTrustID))
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
string strSql = @"SELECT ReportDate FROM HJGL_Hard_Trust WHERE HardTrustID=@HardTrustID";
|
||||||
|
DataTable dt = SQLHelper.GetDataTableRunText(strSql, new SqlParameter("@HardTrustID", hardTrustID));
|
||||||
|
if (dt.Rows.Count > 0 && dt.Rows[0]["ReportDate"] != DBNull.Value)
|
||||||
|
{
|
||||||
|
return string.Format("{0:yyyy-MM-dd}", dt.Rows[0]["ReportDate"]);
|
||||||
|
}
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -265,6 +284,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
|||||||
this.txtHardnessMethod.Text = string.Empty;
|
this.txtHardnessMethod.Text = string.Empty;
|
||||||
this.txtInspectionNum.Text = string.Empty;
|
this.txtInspectionNum.Text = string.Empty;
|
||||||
this.txtEquipmentModel.Text = string.Empty;
|
this.txtEquipmentModel.Text = string.Empty;
|
||||||
|
this.txtReportDate.Text = string.Empty;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -420,4 +440,4 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
|||||||
BindGrid();
|
BindGrid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,6 +129,15 @@ namespace FineUIPro.Web.HJGL.HotProcessHard {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Label txtEquipmentModel;
|
protected global::FineUIPro.Label txtEquipmentModel;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtReportDate 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Label txtReportDate;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Grid1 控件。
|
/// Grid1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -106,6 +106,9 @@
|
|||||||
<f:TextBox ID="txtEquipmentModel" Label="设备型号" runat="server"
|
<f:TextBox ID="txtEquipmentModel" Label="设备型号" runat="server"
|
||||||
LabelWidth="190px">
|
LabelWidth="190px">
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
|
<f:DatePicker ID="txtReportDate" Label="报告日期" runat="server"
|
||||||
|
LabelWidth="190px" DateFormatString="yyyy-MM-dd">
|
||||||
|
</f:DatePicker>
|
||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
</Rows>
|
</Rows>
|
||||||
|
|||||||
@@ -81,11 +81,30 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
|||||||
this.txtCheckName.Text = trust.CheckName;
|
this.txtCheckName.Text = trust.CheckName;
|
||||||
this.txtAcceptStandard.Text = trust.AcceptStandard;
|
this.txtAcceptStandard.Text = trust.AcceptStandard;
|
||||||
this.txtEquipmentModel.Text = trust.EquipmentModel;
|
this.txtEquipmentModel.Text = trust.EquipmentModel;
|
||||||
|
this.txtReportDate.Text = GetHardReportDate(trust.HardTrustID);
|
||||||
BindGrid();
|
BindGrid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 读取硬度检测报告日期,兼容新增字段未纳入 DBML 的情况。
|
||||||
|
/// </summary>
|
||||||
|
private string GetHardReportDate(string hardTrustID)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(hardTrustID))
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
string strSql = @"SELECT ReportDate FROM HJGL_Hard_Trust WHERE HardTrustID=@HardTrustID";
|
||||||
|
DataTable dt = SQLHelper.GetDataTableRunText(strSql, new SqlParameter("@HardTrustID", hardTrustID));
|
||||||
|
if (dt.Rows.Count > 0 && dt.Rows[0]["ReportDate"] != DBNull.Value)
|
||||||
|
{
|
||||||
|
return string.Format("{0:yyyy-MM-dd}", dt.Rows[0]["ReportDate"]);
|
||||||
|
}
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
#region 数据绑定
|
#region 数据绑定
|
||||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -180,10 +199,27 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
|||||||
trust.HardnessMethod = this.txtHardnessMethod.Text;
|
trust.HardnessMethod = this.txtHardnessMethod.Text;
|
||||||
trust.EquipmentModel = this.txtEquipmentModel.Text;
|
trust.EquipmentModel = this.txtEquipmentModel.Text;
|
||||||
BLL.Hard_TrustService.UpdateHardTrust(trust);
|
BLL.Hard_TrustService.UpdateHardTrust(trust);
|
||||||
|
SaveHardReportDate(trust.HardTrustID);
|
||||||
}
|
}
|
||||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 保存硬度检测报告日期,和硬度报告编号同表存储。
|
||||||
|
/// </summary>
|
||||||
|
private void SaveHardReportDate(string hardTrustID)
|
||||||
|
{
|
||||||
|
string strSql = @"UPDATE HJGL_Hard_Trust SET ReportDate=@ReportDate WHERE HardTrustID=@HardTrustID";
|
||||||
|
SqlParameter reportDate = new SqlParameter("@ReportDate", SqlDbType.DateTime);
|
||||||
|
var newReportDate = Funs.GetNewDateTime(this.txtReportDate.Text.Trim());
|
||||||
|
reportDate.Value = newReportDate.HasValue ? (object)newReportDate.Value : DBNull.Value;
|
||||||
|
SQLHelper.ExecuteCommand(CommandType.Text, strSql, new SqlParameter[]
|
||||||
|
{
|
||||||
|
reportDate,
|
||||||
|
new SqlParameter("@HardTrustID", hardTrustID)
|
||||||
|
});
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -246,6 +246,15 @@ namespace FineUIPro.Web.HJGL.HotProcessHard {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtEquipmentModel;
|
protected global::FineUIPro.TextBox txtEquipmentModel;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtReportDate 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DatePicker txtReportDate;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Grid1 控件。
|
/// Grid1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -70,6 +70,9 @@
|
|||||||
<f:Label ID="txtReport" Label="报告编号" runat="server" LabelAlign="Right"
|
<f:Label ID="txtReport" Label="报告编号" runat="server" LabelAlign="Right"
|
||||||
LabelWidth="100px">
|
LabelWidth="100px">
|
||||||
</f:Label>
|
</f:Label>
|
||||||
|
<f:Label ID="txtReportDate" Label="报告日期" runat="server" LabelAlign="Right"
|
||||||
|
LabelWidth="100px">
|
||||||
|
</f:Label>
|
||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
</Rows>
|
</Rows>
|
||||||
|
|||||||
@@ -282,8 +282,27 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
|||||||
this.txtTabler.Text = BLL.Person_PersonsService.GetPersonsNameById(trust.Tabler);
|
this.txtTabler.Text = BLL.Person_PersonsService.GetPersonsNameById(trust.Tabler);
|
||||||
}
|
}
|
||||||
this.txtReport.Text = trust.ReportNo;
|
this.txtReport.Text = trust.ReportNo;
|
||||||
|
this.txtReportDate.Text = GetHotProessReportDate(trust.HotProessTrustId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 读取热处理报告日期,新增字段未纳入 DBML 时通过参数化 SQL 获取。
|
||||||
|
/// </summary>
|
||||||
|
private string GetHotProessReportDate(string hotProessTrustId)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(hotProessTrustId))
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
string strSql = @"SELECT ReportDate FROM HJGL_HotProess_Trust WHERE HotProessTrustId=@HotProessTrustId";
|
||||||
|
DataTable dt = SQLHelper.GetDataTableRunText(strSql, new SqlParameter("@HotProessTrustId", hotProessTrustId));
|
||||||
|
if (dt.Rows.Count > 0 && dt.Rows[0]["ReportDate"] != DBNull.Value)
|
||||||
|
{
|
||||||
|
return string.Format("{0:yyyy-MM-dd}", dt.Rows[0]["ReportDate"]);
|
||||||
|
}
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 清空文本
|
#region 清空文本
|
||||||
@@ -298,6 +317,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
|||||||
this.txtProessEquipment.Text = string.Empty;
|
this.txtProessEquipment.Text = string.Empty;
|
||||||
this.txtTabler.Text = string.Empty;
|
this.txtTabler.Text = string.Empty;
|
||||||
this.txtReport.Text = string.Empty;
|
this.txtReport.Text = string.Empty;
|
||||||
|
this.txtReportDate.Text = string.Empty;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#endregion
|
#endregion
|
||||||
@@ -462,4 +482,4 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,6 +156,15 @@ namespace FineUIPro.Web.HJGL.HotProcessHard {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Label txtReport;
|
protected global::FineUIPro.Label txtReport;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtReportDate 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Label txtReportDate;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Grid1 控件。
|
/// Grid1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -42,6 +42,9 @@
|
|||||||
<f:TextBox ID="txtReportNo" Label="报告编号" runat="server"
|
<f:TextBox ID="txtReportNo" Label="报告编号" runat="server"
|
||||||
LabelAlign="Right" MaxLength="50" LabelWidth="180px">
|
LabelAlign="Right" MaxLength="50" LabelWidth="180px">
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
|
<f:DatePicker ID="txtReportDate" Label="报告日期" runat="server"
|
||||||
|
LabelAlign="Right" LabelWidth="180px" DateFormatString="yyyy-MM-dd">
|
||||||
|
</f:DatePicker>
|
||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
<f:FormRow>
|
<f:FormRow>
|
||||||
|
|||||||
@@ -110,8 +110,27 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
|||||||
}
|
}
|
||||||
this.txtRemark.Text = trust.Remark;
|
this.txtRemark.Text = trust.Remark;
|
||||||
this.txtReportNo.Text = trust.ReportNo;
|
this.txtReportNo.Text = trust.ReportNo;
|
||||||
|
this.txtReportDate.Text = GetHotProessReportDate(trust.HotProessTrustId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 读取热处理报告日期,兼容新增字段未纳入 DBML 的情况。
|
||||||
|
/// </summary>
|
||||||
|
private string GetHotProessReportDate(string hotProessTrustId)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(hotProessTrustId))
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
string strSql = @"SELECT ReportDate FROM HJGL_HotProess_Trust WHERE HotProessTrustId=@HotProessTrustId";
|
||||||
|
DataTable dt = SQLHelper.GetDataTableRunText(strSql, new SqlParameter("@HotProessTrustId", hotProessTrustId));
|
||||||
|
if (dt.Rows.Count > 0 && dt.Rows[0]["ReportDate"] != DBNull.Value)
|
||||||
|
{
|
||||||
|
return string.Format("{0:yyyy-MM-dd}", dt.Rows[0]["ReportDate"]);
|
||||||
|
}
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -164,14 +183,31 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
|
|||||||
trust.ProessEquipment = this.txtProessEquipment.Text.Trim();
|
trust.ProessEquipment = this.txtProessEquipment.Text.Trim();
|
||||||
trust.ReportNo = this.txtReportNo.Text.Trim();
|
trust.ReportNo = this.txtReportNo.Text.Trim();
|
||||||
BLL.HotProess_TrustService.UpdateHotProessTrust(trust);
|
BLL.HotProess_TrustService.UpdateHotProessTrust(trust);
|
||||||
|
SaveHotProessReportDate(trust.HotProessTrustId);
|
||||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 保存热处理报告日期,和热处理报告编号同表存储。
|
||||||
|
/// </summary>
|
||||||
|
private void SaveHotProessReportDate(string hotProessTrustId)
|
||||||
|
{
|
||||||
|
string strSql = @"UPDATE HJGL_HotProess_Trust SET ReportDate=@ReportDate WHERE HotProessTrustId=@HotProessTrustId";
|
||||||
|
SqlParameter reportDate = new SqlParameter("@ReportDate", SqlDbType.DateTime);
|
||||||
|
var newReportDate = Funs.GetNewDateTime(this.txtReportDate.Text.Trim());
|
||||||
|
reportDate.Value = newReportDate.HasValue ? (object)newReportDate.Value : DBNull.Value;
|
||||||
|
SQLHelper.ExecuteCommand(CommandType.Text, strSql, new SqlParameter[]
|
||||||
|
{
|
||||||
|
reportDate,
|
||||||
|
new SqlParameter("@HotProessTrustId", hotProessTrustId)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
protected void txtIsoNo_TextChanged(object sender, EventArgs e)
|
protected void txtIsoNo_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,6 +111,15 @@ namespace FineUIPro.Web.HJGL.HotProcessHard {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtReportNo;
|
protected global::FineUIPro.TextBox txtReportNo;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtReportDate 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DatePicker txtReportDate;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// drpUnitWork 控件。
|
/// drpUnitWork 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ namespace Model
|
|||||||
|
|
||||||
public string ProjectId { get; set; }
|
public string ProjectId { get; set; }
|
||||||
|
|
||||||
|
public string ProjectName { get; set; }
|
||||||
|
|
||||||
public string GrooveTypeId { get; set; }
|
public string GrooveTypeId { get; set; }
|
||||||
|
|
||||||
public string GrooveTypeCode { get; set; }
|
public string GrooveTypeCode { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user