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

73 lines
2.6 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 QualityMonthView : PageBase
2025-02-19 15:58:42 +08:00
{
#region
/// <summary>
/// 主键
/// </summary>
2025-05-08 14:26:36 +08:00
public string QualityMonthId
2025-02-19 15:58:42 +08:00
{
get
{
2025-05-08 14:26:36 +08:00
return (string)ViewState["QualityMonthId"];
2025-02-19 15:58:42 +08:00
}
set
{
2025-05-08 14:26:36 +08:00
ViewState["QualityMonthId"] = 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.QualityMonthId = Request.Params["QualityMonthId"];
if (!string.IsNullOrEmpty(this.QualityMonthId))
2025-02-19 15:58:42 +08:00
{
2025-05-08 14:26:36 +08:00
Model.SafetyActivities_QualityMonth QualityMonth = BLL.QualityMonthService.GetQualityMonthById(this.QualityMonthId);
if (QualityMonth != null)
2025-02-19 15:58:42 +08:00
{
2025-05-08 14:26:36 +08:00
this.txtTitle.Text = QualityMonth.Title;
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd HH:mm}", QualityMonth.CompileDate);
this.txtEndTime.Text = string.Format("{0:yyyy-MM-dd HH:mm}", QualityMonth.EndTime);
this.txtRemark.Text = QualityMonth.Remark;
this.txtSeeFile.Text = HttpUtility.HtmlDecode(QualityMonth.SeeFile);
this.txtCompileMan.Text = BLL.UserService.GetUserNameByUserId(QualityMonth.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.QualityMonthId))
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/QualityMonthAttachUrl&menuId={1}&type=-1", QualityMonthId, BLL.Const.ProjectQualityMonthMenuId)));
2025-02-19 15:58:42 +08:00
}
}
#endregion
}
}