xinjiang/SGGL/FineUIPro.Web/HSSE/Check/ContactListView.aspx.cs

70 lines
2.5 KiB
C#

using System;
using System.Web;
namespace FineUIPro.Web.HSSE.Check
{
public partial class ContactListView : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
public string ContactListId
{
get
{
return (string)ViewState["ContactListId"];
}
set
{
ViewState["ContactListId"] = 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.ContactListId = Request.Params["ContactListId"];
if (!string.IsNullOrEmpty(this.ContactListId))
{
Model.Check_ContactList ContactList = BLL.ContactListService.GetContactListById(this.ContactListId);
if (ContactList != null)
{
this.txtCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.ContactListId);
this.drpSponsorUnit.Text = BLL.UnitService.GetUnitNameByUnitId(ContactList.SponsorUnitId);
this.drpReceivingUnits.Text = ContactList.ReceivingUnitNames;
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", ContactList.CompileDate);
this.txtRemark.Text = ContactList.Remark;
this.txtSeeFile.Text = HttpUtility.HtmlDecode(ContactList.SeeFile);
this.txtCompileMan.Text = BLL.UserService.GetUserNameByUserId(ContactList.CompileMan);
}
}
}
}
#endregion
#region
/// <summary>
/// 上传附件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.ContactListId))
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ContactListAttachUrl&menuId={1}&type=-1", ContactListId, BLL.Const.ProjectContactListMenuId)));
}
}
#endregion
}
}