SGGL_SHJ/SGGL/FineUIPro.Web/SysManage/DocView.aspx.cs

81 lines
2.2 KiB
C#

using BLL;
using System;
namespace FineUIPro.Web.SysManage
{
public partial class DocView : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
public string DocId
{
get
{
return (string)ViewState["DocId"];
}
set
{
ViewState["DocId"] = value;
}
}
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
this.DocId = Request.Params["DocId"];
if (!string.IsNullOrEmpty(this.DocId))
{
Model.Doc_Doc Doc = BLL.DocService.GetDocById(this.DocId);
if (Doc != null)
{
hdId.Text = this.DocId;
this.txtDocName.Text = Doc.DocName;
this.txtRemark.Text = Doc.Remark;
}
}
}
}
#endregion
#region
/// <summary>
/// 上传附件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(hdId.Text.Trim()))
{
hdId.Text = SQLHelper.GetNewID(typeof(Model.Doc_Doc));
}
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/DocAttachUrl&menuId={1}&type=-1", hdId.Text, BLL.Const.HelpMenuId)));
}
#endregion
}
}