/// <summary>預設查詢物件</summary> public CustomerReportQuery DefaultQuery() { DateTime _currentDate; CustomerReportQuery _query; _currentDate = DateTime.Now; _query = new CustomerReportQuery(); _query.DateStart = _currentDate.AddMonths(-3).Date; _query.DateEnd = _currentDate.AddMonths(-2).Date; return(_query); }
/// <summary>取得 PDF 格式的報表</summary> public FileContent GetPdf(CustomerReportQuery query) { FileContent _content = new FileContent(); var _buffer = this._storage.GetDocument(); _content.content = _buffer; _content.filename = string.Format("{0:yyyyMMdd}-{1:yyyyMMdd}.pdf" , query.DateStart , query.DateEnd); //刻意模擬資料處理的等候時間 this.Process(); return(_content); }