using System; using System.Web; namespace FineUIPro.Web.ZHGL.Meeting { public partial class CompanySafetyMeetingView : PageBase { #region 定义项 /// /// 主键 /// public string CompanySafetyMeetingId { get { return (string)ViewState["CompanySafetyMeetingId"]; } set { ViewState["CompanySafetyMeetingId"] = value; } } #endregion #region 加载 /// /// 加载页面 /// /// /// protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { btnClose.OnClientClick = ActiveWindow.GetHideReference(); this.CompanySafetyMeetingId = Request.Params["CompanySafetyMeetingId"]; if (!string.IsNullOrEmpty(this.CompanySafetyMeetingId)) { Model.Meeting_CompanySafetyMeeting CompanySafetyMeeting = BLL.CompanySafetyMeetingService.GetCompanySafetyMeetingById(this.CompanySafetyMeetingId); if (CompanySafetyMeeting != null) { this.txtCompanySafetyMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.CompanySafetyMeetingId); this.txtCompanySafetyMeetingName.Text = CompanySafetyMeeting.CompanySafetyMeetingName; if (CompanySafetyMeeting.CompanySafetyMeetingDate != null) { this.txtCompanySafetyMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", CompanySafetyMeeting.CompanySafetyMeetingDate); } if (!string.IsNullOrEmpty(CompanySafetyMeeting.CompileMan)) { var user = BLL.UserService.GetUserByUserId(CompanySafetyMeeting.CompileMan); if (user != null) { this.txtCompileMan.Text = user.UserName; } } if (CompanySafetyMeeting.AttentPersonNum != null) { this.txtAttentPersonNum.Text = CompanySafetyMeeting.AttentPersonNum.ToString(); } this.txtCompanySafetyMeetingContents.Text = HttpUtility.HtmlDecode(CompanySafetyMeeting.CompanySafetyMeetingContents); this.txtMeetingHours.Text = Convert.ToString(CompanySafetyMeeting.MeetingHours); this.txtMeetingHostMan.Text = CompanySafetyMeeting.MeetingHostMan; this.txtAttentPerson.Text = CompanySafetyMeeting.AttentPerson; } } } } #endregion #region 附件上传 /// /// 上传附件 /// /// /// protected void btnAttachUrl_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(this.CompanySafetyMeetingId)) { PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySafetyMeetingAttachUrl&menuId={1}&type=-1", this.CompanySafetyMeetingId, BLL.Const.CompanySafetyMeetingMenuId))); } } #endregion protected void btnAttachUrl1_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(this.CompanySafetyMeetingId)) { PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySafetyMeetingAttachUrl&menuId={1}&strParam=1&type=-1", this.CompanySafetyMeetingId, BLL.Const.CompanySafetyMeetingMenuId))); } } protected void btnAttachUrl2_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(this.CompanySafetyMeetingId)) { PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySafetyMeetingAttachUrl&menuId={1}&strParam=2&type=-1", this.CompanySafetyMeetingId, BLL.Const.CompanySafetyMeetingMenuId))); } } } }