This commit is contained in:
2026-06-17 18:37:50 +08:00
parent 2736e8ad89
commit 75d7c48ff2
22 changed files with 286 additions and 10 deletions
@@ -253,8 +253,27 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
this.txtHardnessMethod.Text = trust.HardnessMethod;
this.txtInspectionNum.Text = trust.InspectionNum;
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
/// <summary>
@@ -265,6 +284,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
this.txtHardnessMethod.Text = string.Empty;
this.txtInspectionNum.Text = string.Empty;
this.txtEquipmentModel.Text = string.Empty;
this.txtReportDate.Text = string.Empty;
}
#endregion
@@ -420,4 +440,4 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
BindGrid();
}
}
}
}