using BLL; using System; namespace FineUIPro.Web.SysManage { public partial class DocView : PageBase { #region 定义项 /// /// 主键 /// public string DocId { get { return (string)ViewState["DocId"]; } set { ViewState["DocId"] = value; } } /// /// 项目主键 /// public string ProjectId { get { return (string)ViewState["ProjectId"]; } set { ViewState["ProjectId"] = value; } } #endregion #region 加载 /// /// 加载页面 /// /// /// 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 附件上传 /// /// 上传附件 /// /// /// 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 } }