修改特种设备菜单,和人员资质互通

This commit is contained in:
2024-07-15 16:49:33 +08:00
parent 0a8a11e445
commit 1a2eca2e8e
9 changed files with 166 additions and 107 deletions
@@ -203,6 +203,8 @@ namespace FineUIPro.Web.HSSE.QualityAudit
BLL.PersonQualityService.AddPersonQuality(personQuality);
BLL.LogService.AddSys_Log(this.CurrUser, personQuality.CertificateNo, personQuality.PersonQualityId, BLL.Const.PersonQualityMenuId, BLL.Const.BtnAdd);
}
if (isClose)
{
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
@@ -33,9 +33,10 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtCertificateName" runat="server" Label="证书名称" LabelAlign="Right"
MaxLength="50" Required="true" ShowRedStar="true" LabelWidth="120px">
</f:TextBox>
<f:DropDownList ID="drpCertificate" runat="server" Label="特岗证书" AutoPostBack="true" OnSelectedIndexChanged="drpCertificate_TextChanged"
LabelAlign="Right" LabelWidth="120px" EnableEdit="true" Required="true" ShowRedStar="true" >
</f:DropDownList>
<f:TextBox ID="txtCertificateNo" runat="server" Label="证书编号" LabelAlign="Right"
MaxLength="50" Required="true" ShowRedStar="true" LabelWidth="120px">
</f:TextBox>
@@ -76,8 +77,10 @@
<f:DatePicker ID="txtLateCheckDate" Label="最近复查日期" runat="server" LabelAlign="Right"
EnableEdit="true" LabelWidth="120px">
</f:DatePicker>
<f:Label ID="Label1" runat="server">
</f:Label>
<f:TextBox ID="txtCertificateName" runat="server" Label="证书名称" LabelAlign="Right"
MaxLength="50" LabelWidth="120px" Readonly="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
@@ -1,5 +1,6 @@
using BLL;
using System;
using System.Linq;
namespace FineUIPro.Web.HSSE.QualityAudit
{
@@ -61,6 +62,8 @@ namespace FineUIPro.Web.HSSE.QualityAudit
{
if (!IsPostBack)
{
CertificateService.InitCertificateDropDownList(this.drpCertificate, true);
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
this.PersonId = Request.Params["PersonId"];
this.ProjectId = this.CurrUser.LoginProjectId;
@@ -102,6 +105,8 @@ namespace FineUIPro.Web.HSSE.QualityAudit
}
this.txtRemark.Text = SafePersonQuality.Remark;
this.txtAuditDate.Text = string.Format("{0:yyyy-MM-dd}", SafePersonQuality.AuditDate);
this.drpCertificate.SelectedValue = SafePersonQuality.CertificateId;
}
}
else
@@ -135,6 +140,12 @@ namespace FineUIPro.Web.HSSE.QualityAudit
{
if (string.IsNullOrEmpty(this.SafePersonQualityId))
{
if (this.drpCertificate.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.drpCertificate.SelectedValue))
{
Alert.ShowInTop("请选择特岗证书!", MessageBoxIcon.Warning);
return;
}
SaveData(false);
}
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/SafePersonQualityAttachUrl&menuId={1}", SafePersonQualityId, BLL.Const.SafePersonQualityMenuId)));
@@ -150,9 +161,22 @@ namespace FineUIPro.Web.HSSE.QualityAudit
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (this.drpCertificate.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.drpCertificate.SelectedValue))
{
Alert.ShowInTop("请选择特岗证书!", MessageBoxIcon.Warning);
return;
}
SaveData(true);
}
protected void drpCertificate_TextChanged(object sender, EventArgs e) {
if (this.drpCertificate.SelectedValue!=Const._Null)
{
this.txtCertificateName.Text = this.drpCertificate.SelectedItem.Text;
}
}
/// <summary>
/// 保存数据
/// </summary>
@@ -165,7 +189,8 @@ namespace FineUIPro.Web.HSSE.QualityAudit
{
PersonId = this.PersonId,
CertificateNo = this.txtCertificateNo.Text.Trim(),
CertificateName = this.txtCertificateName.Text.Trim(),
CertificateId = this.drpCertificate.SelectedValue,
CertificateName = this.drpCertificate.SelectedItem.Text,
Grade = this.txtGrade.Text.Trim(),
SendUnit = this.txtSendUnit.Text.Trim(),
SendDate = Funs.GetNewDateTime(this.txtSendDate.Text.Trim()),
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HSSE.QualityAudit {
public partial class SafePersonQualityEdit {
namespace FineUIPro.Web.HSSE.QualityAudit
{
public partial class SafePersonQualityEdit
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtUnitCode 控件。
/// </summary>
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtUnitCode;
/// <summary>
/// txtUnitName 控件。
/// </summary>
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtUnitName;
/// <summary>
/// txtPersonName 控件。
/// </summary>
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPersonName;
/// <summary>
/// txtWorkPostName 控件。
/// </summary>
@@ -74,16 +76,16 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtWorkPostName;
/// <summary>
/// txtCertificateName 控件。
/// drpCertificate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCertificateName;
protected global::FineUIPro.DropDownList drpCertificate;
/// <summary>
/// txtCertificateNo 控件。
/// </summary>
@@ -92,7 +94,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCertificateNo;
/// <summary>
/// txtGrade 控件。
/// </summary>
@@ -101,7 +103,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtGrade;
/// <summary>
/// txtSendUnit 控件。
/// </summary>
@@ -110,7 +112,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSendUnit;
/// <summary>
/// txtSendDate 控件。
/// </summary>
@@ -119,7 +121,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtSendDate;
/// <summary>
/// txtLimitDate 控件。
/// </summary>
@@ -128,7 +130,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtLimitDate;
/// <summary>
/// drpAuditor 控件。
/// </summary>
@@ -137,7 +139,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpAuditor;
/// <summary>
/// txtAuditDate 控件。
/// </summary>
@@ -146,7 +148,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtAuditDate;
/// <summary>
/// txtLateCheckDate 控件。
/// </summary>
@@ -155,16 +157,16 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtLateCheckDate;
/// <summary>
/// Label1 控件。
/// txtCertificateName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
protected global::FineUIPro.TextBox txtCertificateName;
/// <summary>
/// txtRemark 控件。
/// </summary>
@@ -173,7 +175,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtRemark;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -182,7 +184,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnAttachUrl 控件。
/// </summary>
@@ -191,7 +193,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -200,7 +202,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
@@ -209,7 +211,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>
@@ -218,7 +220,7 @@ namespace FineUIPro.Web.HSSE.QualityAudit {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
/// <summary>
/// WindowAtt 控件。
/// </summary>
@@ -244,6 +244,14 @@ namespace FineUIPro.Web.HSSE.SitePerson
this.txtCertificateCode.Text = personQuality.CertificateNo;
this.txtCertificateLimitTime.Text = string.Format("{0:yyyy-MM-dd}", personQuality.LimitDate);
}
var safePersonQuality = BLL.SafePersonQualityService.GetSafePersonQualityByPersonId(person.PersonId);
if (safePersonQuality!=null)
{
this.drpCertificate.SelectedValue = safePersonQuality.CertificateId;
this.txtCertificateCode.Text = safePersonQuality.CertificateNo;
this.txtCertificateLimitTime.Text = string.Format("{0:yyyy-MM-dd}", safePersonQuality.LimitDate);
}
}
else
{
@@ -625,8 +633,10 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
if (this.drpCertificate.SelectedValue != BLL.Const._Null)
{
safePersonQuality.CertificateId = this.drpCertificate.SelectedValue;
safePersonQuality.CertificateName = this.drpCertificate.SelectedItem.Text;
}
safePersonQuality.CertificateNo = this.txtCertificateCode.Text.Trim();
safePersonQuality.LimitDate = Funs.GetNewDateTime(this.txtCertificateLimitTime.Text);
safePersonQuality.CompileMan = this.CurrUser.UserId;
@@ -644,6 +654,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
};
if (this.drpCertificate.SelectedValue != BLL.Const._Null)
{
newSafePersonQuality.CertificateId = drpCertificate.SelectedValue;
newSafePersonQuality.CertificateName = this.drpCertificate.SelectedItem.Text;
}
newSafePersonQuality.CertificateNo = this.txtCertificateCode.Text.Trim();