82 lines
2.3 KiB
C#
82 lines
2.3 KiB
C#
using BLL;
|
|
using System;
|
|
using System.Web;
|
|
|
|
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
|
|
}
|
|
} |