xinjiang/SGGL/FineUIPro.Web/ZHGL/Meeting/CompanySpecialMeetingView.a...

101 lines
4.5 KiB
C#

using System;
using System.Web;
namespace FineUIPro.Web.ZHGL.Meeting
{
public partial class CompanySpecialMeetingView : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
public string CompanySpecialMeetingId
{
get
{
return (string)ViewState["CompanySpecialMeetingId"];
}
set
{
ViewState["CompanySpecialMeetingId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
btnClose.OnClientClick = ActiveWindow.GetHideReference();
this.CompanySpecialMeetingId = Request.Params["CompanySpecialMeetingId"];
if (!string.IsNullOrEmpty(this.CompanySpecialMeetingId))
{
Model.Meeting_CompanySpecialMeeting CompanySpecialMeeting = BLL.CompanySpecialMeetingService.GetCompanySpecialMeetingById(this.CompanySpecialMeetingId);
if (CompanySpecialMeeting != null)
{
this.txtCompanySpecialMeetingCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.CompanySpecialMeetingId);
this.txtCompanySpecialMeetingName.Text = CompanySpecialMeeting.CompanySpecialMeetingName;
if (CompanySpecialMeeting.CompanySpecialMeetingDate != null)
{
this.txtCompanySpecialMeetingDate.Text = string.Format("{0:yyyy-MM-dd}", CompanySpecialMeeting.CompanySpecialMeetingDate);
}
if (!string.IsNullOrEmpty(CompanySpecialMeeting.CompileMan))
{
var user = BLL.UserService.GetUserByUserId(CompanySpecialMeeting.CompileMan);
if (user != null)
{
this.txtCompileMan.Text = user.UserName;
}
}
if (CompanySpecialMeeting.AttentPersonNum != null)
{
this.txtAttentPersonNum.Text = CompanySpecialMeeting.AttentPersonNum.ToString();
}
this.txtCompanySpecialMeetingContents.Text = HttpUtility.HtmlDecode(CompanySpecialMeeting.CompanySpecialMeetingContents);
this.txtMeetingHours.Text = Convert.ToString(CompanySpecialMeeting.MeetingHours);
this.txtMeetingHostMan.Text = CompanySpecialMeeting.MeetingHostMan;
this.txtAttentPerson.Text = CompanySpecialMeeting.AttentPerson;
}
}
}
}
#endregion
#region
/// <summary>
/// 上传附件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.CompanySpecialMeetingId))
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySpecialMeetingAttachUrl&menuId={1}&type=-1", this.CompanySpecialMeetingId, BLL.Const.CompanySpecialMeetingMenuId)));
}
}
#endregion
protected void btnAttachUrl1_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.CompanySpecialMeetingId))
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySpecialMeetingAttachUrl&menuId={1}&strParam=1&type=-1", this.CompanySpecialMeetingId, BLL.Const.CompanySpecialMeetingMenuId)));
}
}
protected void btnAttachUrl2_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.CompanySpecialMeetingId))
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanySpecialMeetingAttachUrl&menuId={1}&strParam=2&type=-1", this.CompanySpecialMeetingId, BLL.Const.CompanySpecialMeetingMenuId)));
}
}
}
}