private void AddAttach(long DocID) { UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow(); DataTable dt = new DataTable(); df.GetDocumentAttach(DocID, out dt); for (int i = 0; i < dt.Rows.Count; i++) { TableRow tr = new TableRow(); TableCell td = new TableCell(); TableCell tc = new TableCell(); td.Text = "附件:"; td.HorizontalAlign = HorizontalAlign.Right; string FilePath = dt.Rows[i]["FileVisualPath"].ToString() + dt.Rows[i]["FileName"].ToString(); tc.Text = "<a href='" + "." + FilePath.Replace("\\", "/") + "' target='_blank'>" + dt.Rows[i]["FileName"].ToString() + "</a>"; tc.HorizontalAlign = HorizontalAlign.Left; tr.Cells.Add(td); tr.Cells.Add(tc); tr.Height = 22; tr.HorizontalAlign = HorizontalAlign.Center; ht.Rows.Add(tr); } dt = null; df = null; }
private void AddAttach(long DocID) { UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow(); DataTable dt = new DataTable(); df.GetDocumentAttach(DocID,out dt); for(int i=0;i<dt.Rows.Count;i++) { TableRow tr = new TableRow(); TableCell td = new TableCell(); TableCell tc = new TableCell(); td.Text ="����:"; td.HorizontalAlign = HorizontalAlign.Right; string FilePath = dt.Rows[i]["FileVisualPath"].ToString() + dt.Rows[i]["FileName"].ToString(); tc.Text = "<a href='" +"." + FilePath.Replace("\\","/") +"' target='_blank'>" + dt.Rows[i]["FileName"].ToString() + "</a>"; tc.HorizontalAlign = HorizontalAlign.Left; tr.Cells.Add(td); tr.Cells.Add(tc); tr.Height = 22; tr.HorizontalAlign = HorizontalAlign.Center; ht.Rows.Add(tr); } dt = null; df = null; }