This commit is contained in:
2025-12-23 11:17:49 +08:00
parent 19c093122b
commit eca0fd7d5e
10 changed files with 84 additions and 15 deletions
@@ -1,5 +1,7 @@
using BLL;
using Microsoft.Office.Interop.Word;
using System;
using System.Data.SqlClient;
using System.Web;
namespace FineUIPro.Web.Accident
@@ -36,6 +38,7 @@ namespace FineUIPro.Web.Accident
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
BLL.AccidentWarningService.InitAccidentTypeDropDownList(this.drpType, true);
this.Id = Request.Params["Id"];
if (!string.IsNullOrEmpty(this.Id))
{
@@ -45,7 +48,10 @@ namespace FineUIPro.Web.Accident
this.txtCode.Text = model.Code;
this.txtTitle.Text = model.Title;
this.txtContent.Text = model.Content;
//this.txtType.Text = model.Type;
this.drpType.SelectedValue = model.Type;
this.txtAddress.Text = model.Address;
this.txtSource.Text = model.Source;
this.txtResponsibleUnit.Text = model.ResponsibleUnit;
this.txtRemarks.Text = model.Remarks;
if (model.AccidentDate != null)
@@ -79,6 +85,11 @@ namespace FineUIPro.Web.Accident
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(this.drpType.SelectedValue) || this.drpType.SelectedValue == Const._Null)
{
Alert.ShowInTop("请选择事故类型", MessageBoxIcon.Warning);
return;
}
this.SaveData();
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
@@ -92,7 +103,8 @@ namespace FineUIPro.Web.Accident
model.Code = this.txtCode.Text.Trim();
model.Title = this.txtTitle.Text.Trim();
model.Content = this.txtContent.Text.Trim();
model.Type = this.txtType.Text.Trim();
//model.Type = this.txtType.Text.Trim();
model.Type = this.drpType.SelectedValue;
model.Address = this.txtAddress.Text.Trim();
model.Source = this.txtSource.Text.Trim();
model.ResponsibleUnit = this.txtResponsibleUnit.Text.Trim();