SGGL_SGY/SUBQHSE/FineUIPro.Web/Customization/ZJ/HSSE/HiddenInspection/UnitHiddenRectificationView...

105 lines
4.1 KiB
C#
Raw Normal View History

2025-02-19 15:58:42 +08:00
using BLL;
using System;
2025-05-08 14:26:36 +08:00
using System.Collections.Generic;
2025-02-19 15:58:42 +08:00
using System.Linq;
2025-05-08 14:26:36 +08:00
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
2025-02-19 15:58:42 +08:00
2025-05-08 14:26:36 +08:00
namespace FineUIPro.Web.Customization.ZJ.HSSE.HiddenInspection
2025-02-19 15:58:42 +08:00
{
2025-05-08 14:26:36 +08:00
public partial class UnitHiddenRectificationView : PageBase
2025-02-19 15:58:42 +08:00
{
#region
/// <summary>
/// 主键
/// </summary>
private string HazardRegisterId
{
get
{
return (string)ViewState["HazardRegisterId"];
}
set
{
ViewState["HazardRegisterId"] = value;
}
}
/// <summary>
/// 图片路径
/// </summary>
public string ImageUrl
{
get
{
return (string)ViewState["ImageUrl"];
}
set
{
ViewState["ImageUrl"] = value;
}
}
/// <summary>
/// 整改后附件路径
/// </summary>
public string RectificationImageUrl
{
get
{
return (string)ViewState["RectificationImageUrl"];
}
set
{
ViewState["RectificationImageUrl"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
this.HazardRegisterId = Request.Params["HazardRegisterId"];
if (!string.IsNullOrEmpty(this.HazardRegisterId))
{
2025-05-08 14:26:36 +08:00
Model.View_Hazard_HazardRegister_Unit registration = (from x in Funs.DB.View_Hazard_HazardRegister_Unit where x.HazardRegisterId == HazardRegisterId select x).FirstOrDefault();
2025-02-19 15:58:42 +08:00
if (registration != null)
{
this.txtWorkAreaName.Text = registration.WorkAreaName;
2025-05-08 14:26:36 +08:00
this.txtProjectName.Text = ProjectService.getUnitNameByProjectId(registration.ProjectId);
2025-02-19 15:58:42 +08:00
this.txtRegisterTypesName.Text = registration.RegisterTypesName;
this.txtProblemDescription.Text = registration.RegisterDef;
this.txtTakeSteps.Text = registration.Rectification;
this.txtResponsibilityManName.Text = registration.ResponsibilityManName;
this.txtRectificationPeriod.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", registration.RectificationPeriod);
this.txtCheckManName.Text = registration.CheckManName;
this.txtCheckTime.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", registration.CheckTime);
this.txtRectificationTime.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", registration.RectificationTime);
this.txtStates.Text = registration.StatesStr;
this.ImageUrl = registration.ImageUrl;
this.txtRiskLevel.Text = registration.Risk_Level;
this.RectificationImageUrl = registration.RectificationImageUrl;
2025-05-08 14:26:36 +08:00
this.divImageUrl.InnerHtml = BLL.UploadAttachmentService.ShowAttachment("../../../../", this.ImageUrl);
this.divRectificationImageUrl.InnerHtml = BLL.UploadAttachmentService.ShowAttachment("../../../../", this.RectificationImageUrl);
2025-02-19 15:58:42 +08:00
//var punishRecords = (from x in Funs.DB.View_Common_PunishRecord
// where x.HazardRegisterId == this.HazardRegisterId
// orderby x.PunishDate descending
// select x).ToList();
//Grid1.DataSource = punishRecords;
//Grid1.DataBind();
}
}
}
}
#endregion
}
}