我在下面有这个代码请帮我在每个页面重复表格标题.我试过在网上提供的选项很少,但它们没有用.我是第一次使用ItextSharp.谢谢
int columns = gv.Columns.Count;
int rows = gv.Rows.Count;
int tableRows = rows + 3;
string flName = "";
if (gv.ID == "gvShares")
{
flName = "Share_Statement.pdf";
}
if (gv.ID == "gvSavingAccStmt")
{
flName = "Main_Saving_Account_Statement.pdf";
}
Document Doc = new Document();
PdfWriter.GetInstance(Doc, Response.OutputStream);
Doc.Open();
BaseFont bfTimes = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.CP1252, false);
Font times = new Font(bfTimes, 9, Font.NORMAL, Color.BLACK);
//string imageFilePath = HttpContext.Current.Server.MapPath("/Image/Sacco_Logo.jpg");
string test = System.Web.HttpContext.Current.Server.MapPath(".");
string substr = test.Remove(test.Length - 6);
//string imageFilePath = "\\app\\Image\\Sacco_Logo.jpg";//"\\app\\Image\\Sacco_Logo.jpg";
iTextSharp.text.Image jpg = …Run Code Online (Sandbox Code Playgroud) 我正在使用以下代码
IEnumerable<DataRow> query = from c in at.appointmentcalendars.AsEnumerable()
select c;
DataTable dt = query.CopyToDataTable();
Run Code Online (Sandbox Code Playgroud)
但我得到以下错误
无法隐式转换
'System.Collections.Generic.IEnumerable<appointmentcalendar>'为'System.Collections.Generic.IEnumerable<System.Data.DataRow>'.存在显式转换(您是否错过了演员?)