SGGL_SGY/SUBQHSE/FineUIPro.Web/HSSE/SafetyActivities/SafetyMonthView.aspx.cs

73 lines
2.5 KiB
C#
Raw Normal View History

2025-02-19 15:58:42 +08:00
using System;
2025-05-08 14:26:36 +08:00
using System.Collections.Generic;
using System.Linq;
2025-02-19 15:58:42 +08:00
using System.Web;
2025-05-08 14:26:36 +08:00
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.HSSE.SafetyActivities
2025-02-19 15:58:42 +08:00
{
2025-05-08 14:26:36 +08:00
public partial class SafetyMonthView : PageBase
2025-02-19 15:58:42 +08:00
{
#region
/// <summary>
/// 主键
/// </summary>
2025-05-08 14:26:36 +08:00
public string SafetyMonthId
2025-02-19 15:58:42 +08:00
{
get
{
2025-05-08 14:26:36 +08:00
return (string)ViewState["SafetyMonthId"];
2025-02-19 15:58:42 +08:00
}
set
{
2025-05-08 14:26:36 +08:00
ViewState["SafetyMonthId"] = value;
2025-02-19 15:58:42 +08:00
}
}
#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();
2025-05-08 14:26:36 +08:00
this.SafetyMonthId = Request.Params["SafetyMonthId"];
if (!string.IsNullOrEmpty(this.SafetyMonthId))
2025-02-19 15:58:42 +08:00
{
2025-05-08 14:26:36 +08:00
Model.SafetyActivities_SafetyMonth SafetyMonth = BLL.SafetyMonthService.GetSafetyMonthById(this.SafetyMonthId);
if (SafetyMonth != null)
2025-02-19 15:58:42 +08:00
{
2025-05-08 14:26:36 +08:00
this.txtTitle.Text = SafetyMonth.Title;
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd HH:mm}", SafetyMonth.CompileDate);
this.txtEndTime.Text = string.Format("{0:yyyy-MM-dd HH:mm}", SafetyMonth.EndTime);
this.txtRemark.Text = SafetyMonth.Remark;
this.txtSeeFile.Text = HttpUtility.HtmlDecode(SafetyMonth.SeeFile);
this.txtCompileMan.Text = BLL.UserService.GetUserNameByUserId(SafetyMonth.CompileMan);
2025-02-19 15:58:42 +08:00
}
}
}
}
#endregion
#region
/// <summary>
/// 上传附件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
2025-05-08 14:26:36 +08:00
if (!string.IsNullOrEmpty(this.SafetyMonthId))
2025-02-19 15:58:42 +08:00
{
2025-05-08 14:26:36 +08:00
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/SafetyMonthAttachUrl&menuId={1}&type=-1", SafetyMonthId, BLL.Const.ProjectSafetyMonthMenuId)));
2025-02-19 15:58:42 +08:00
}
}
#endregion
}
}