Beispiel #1
0
        public JsonResult ExportExcel(MonthPayOffExportFilter filter)
        {
            string excelPath = this.Server.MapPath(string.Format("/Excel/月结表_{0}.xls", DateTime.Now.ToString("yyyyMMddHHmmss")));

            Core.Receivable.MonthPayOff.ExportExcel(excelPath, filter);

            var result = new { IsSuccess = true, Message = "成功" };

            return(Json(result));
        }
Beispiel #2
0
        public static void ExportExcel(string excelPath, MonthPayOffExportFilter filter)
        {
            var dataSource = Core.Receivable.MonthPayOff.GetById(filter);
            List <MonthPayOff> queryData = dataSource.ToList();

            var loadBillData = LoadBillReconciliation.GetByMonthPayOffExportFilter(new LBRForMonthPayOffExportFilter()
            {
                MonthPayOffIDList = filter.ListID
            });
            List <LoadBillReconciliation> loadBillList = loadBillData.ToList();

            GenerateExcel genExcel = new GenerateExcel();

            genExcel.SheetList.Add(new MonthPayOffSheet(queryData, "总表"));
            genExcel.SheetList.Add(new LoadBillSheet(loadBillList, "提单汇总"));
            genExcel.SheetList.Add(new WayBillSummarySheet(new List <WayBillReconciliation>(), "运单汇总"));
            genExcel.ExportExcel(excelPath);
        }
Beispiel #3
0
 public static IPageOfList <MonthPayOff> GetById(MonthPayOffExportFilter filter)
 {
     return(Dao.GetByFilter(filter));
 }