/// <summary> /// 加载原有附件的列表 /// </summary> private void LoadFile() { string strfile = " policyID=" + Request.QueryString["id"].ToString(); EtNet_BLL.To_PolicyFileManager file = new To_PolicyFileManager(); DataTable tblfile = file.GetList(strfile); HtmlTableRow row = null; HtmlTableCell cell = null; string str = ""; if (tblfile.Rows.Count >= 1) { for (int i = 0; i < tblfile.Rows.Count; i++) { row = new HtmlTableRow(); cell = new HtmlTableCell(); cell.InnerHtml = FileIcon(tblfile.Rows[i]["filepath"].ToString()); row.Controls.Add(cell); cell = new HtmlTableCell(); cell.InnerHtml = tblfile.Rows[i]["filename"].ToString(); row.Controls.Add(cell); cell = new HtmlTableCell(); str = "<a target='_blank' href='PolicyFiles.aspx?id=" + tblfile.Rows[i]["id"].ToString() + "'>"; str += "<img src='../../Images/Public/download.png' /></a>"; cell.InnerHtml = str; row.Controls.Add(cell); this.originalfile.Controls.Add(row); } } }
/// <summary> /// 绑定附件列表 /// </summary> private void LoadFileList(int policyID) { To_PolicyFileManager policyFileBLL = new To_PolicyFileManager(); RpFileList.DataSource = policyFileBLL.GetList(string.Format(" policyID={0}", policyID)); RpFileList.DataBind(); }