CNCEC_SUBQHSE_WUHUAN/SGGL/FineUIPro.Web/CQMS/ProcessControl/MeetingView.aspx.cs

113 lines
4.4 KiB
C#

using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.CQMS.ProcessControl
{
public partial class MeetingView : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
public string MeetingId
{
get
{
return (string)ViewState["MeetingId"];
}
set
{
ViewState["MeetingId"] = 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.MeetingId = Request.Params["MeetingId"];
if (!string.IsNullOrEmpty(this.MeetingId))
{
Model.CQMS_Meeting meeting = BLL.MeetingService.GetMeetingById(this.MeetingId);
if (meeting != null)
{
///读取编号
this.txtMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.MeetingId);
this.txtMeetingName.Text = meeting.MeetingName;
if (meeting.MeetingDate != null)
{
this.txtMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", meeting.MeetingDate);
}
var users = BLL.UserService.GetUserByUserId(meeting.CompileMan);
if (users != null)
{
this.drpCompileMan.Text = users.UserName;
}
if (meeting.AttentPersonNum != null)
{
this.txtAttentPersonNum.Text = meeting.AttentPersonNum.ToString();
}
this.txtMeetingContents.Text = HttpUtility.HtmlDecode(meeting.MeetingContents);
this.txtMeetingHours.Text = Convert.ToString(meeting.MeetingHours);
var hostMan = BLL.UserService.GetUserByUserId(meeting.MeetingHostMan);
if (hostMan != null)
{
this.txtMeetingHostMan.Text = hostMan.UserName;
}
else
{
this.txtMeetingHostMan.Text = meeting.MeetingHostMan;
}
this.txtAttentPerson.Text = meeting.AttentPerson;
this.txtUnit.Text = UnitService.GetUnitNameByUnitId(meeting.UnitId);
}
}
}
}
#endregion
#region
/// <summary>
/// 上传附件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.MeetingId))
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/MeetingAttachUrl&menuId={1}&type=-1", MeetingId, BLL.Const.CQMS_MeetingMenuId)));
}
}
#endregion
protected void btnAttachUrl1_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.MeetingId))
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ClassMeetingAttachUrl&menuId={1}&strParam=1&type=-1", this.MeetingId, BLL.Const.CQMS_MeetingMenuId)));
}
}
protected void btnAttachUrl2_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.MeetingId))
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ClassMeetingAttachUrl&menuId={1}&strParam=2&type=-1", this.MeetingId, BLL.Const.CQMS_MeetingMenuId)));
}
}
}
}