我正在尝试将两个值写入 PDF。我可以将第一行写入 Copay Paid1 和总支付 1,但我不能将第二行写入 Copay Paid2 和总支付 2。我怎样才能将第二行写入 Copay Paid2 和 totalpaid2。
示例 SQL 数据
代码示例
void miCopayReceipt_Click(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
DataRow dr;
try
{
DataSet ds = Application.WebService.ExecuteQuery("pat_reprintCoPayReceipt",
new SPParam[] {
new SPParam("@ApptId",currentAppt.ApptId)
});
dr = ds.Tables[0].Rows[0];
cb.BeginText();
string s = "";
s = "Total Paid1:";
cb.ShowTextAligned(PdfContentByte.ALIGN_LEFT, s, 75, 595, 0);
cb.EndText();
cb.BeginText();
string textLine = Convert.ToDouble(dr["PaymentAmount"]).ToString("C");
textLine += " Copay Paid1: " + Convert.ToDecimal(dr["CopayAmount"]).ToString("C");
cb.BeginText();
string s = "";
s = "Total Paid 2:";
cb.ShowTextAligned(PdfContentByte.ALIGN_LEFT, s, 75, 595, 0);
cb.EndText();
cb.BeginText();
string textLine = Convert.ToDouble(dr["PaymentAmount"]).ToString("C");
textLine += " Copay Paid2: " + Convert.ToDecimal(dr["CopayAmount"]).ToString("C");