調整
This commit is contained in:
@@ -1396,8 +1396,13 @@ string sortBy = "", bool sortDesc = false)
|
||||
{
|
||||
int i = 1;
|
||||
var qry2 = _db.activity_kind_detail.Where(o => o.activity_kind_num == kind);
|
||||
qry2 = qry2.OrderBy(o => o.num);
|
||||
var count2 = qry2.Count(); //pageSize = count2;//一次取回??
|
||||
var qry2List = (pageSize > 0) ? qry2.ToPagedList(page, pageSize).ToList() : qry2.ToList();
|
||||
IEnumerable<Model.activity_kind_detail> qry2List = null;
|
||||
if (pageSize > 0)
|
||||
qry2List = qry2.ToPagedList(page, pageSize);
|
||||
else
|
||||
qry2List=qry2.ToList();
|
||||
var ret = new
|
||||
{
|
||||
list = qry2List.Select(x => new
|
||||
|
||||
@@ -311,7 +311,8 @@ public class receiptController: ApiController
|
||||
|
||||
try
|
||||
{
|
||||
string templatePath = HttpContext.Current.Server.MapPath("~/rpt/sample/receipt_sample01.docx");
|
||||
string sample = $"~/rpt/sample/receipt_sample{string.Format("{0:D2}",data.style_num)}.docx";
|
||||
string templatePath = HttpContext.Current.Server.MapPath(sample);
|
||||
|
||||
if (!File.Exists(templatePath))
|
||||
{
|
||||
@@ -411,7 +412,7 @@ public class receiptController: ApiController
|
||||
}
|
||||
if (textNode.Text.Contains("$ReceiptDate"))
|
||||
{
|
||||
textNode.Text = textNode.Text.Replace("$ReceiptDate", data.receipt_date ?? "");
|
||||
textNode.Text = textNode.Text.Replace("$ReceiptDate", data.details[i].receipt_date ?? "");
|
||||
}
|
||||
if (textNode.Text.Contains("$ReceiptTitle"))
|
||||
{
|
||||
@@ -429,7 +430,10 @@ public class receiptController: ApiController
|
||||
{
|
||||
textNode.Text = textNode.Text.Replace("$Caseofficer", data.details[i].caseofficer ?? "");
|
||||
}
|
||||
|
||||
if (textNode.Text.Contains("$ReceiptItem"))
|
||||
{
|
||||
textNode.Text = textNode.Text.Replace("$ReceiptItem", data.details[i].receipt_item ?? "");
|
||||
}
|
||||
}
|
||||
|
||||
currentAnchor= body.InsertAfter(newTable, currentAnchor);
|
||||
|
||||
Reference in New Issue
Block a user