1
This commit is contained in:
@@ -15,6 +15,7 @@ using NPOI.SS.UserModel;
|
||||
using NPOI.SS.Util;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
@@ -32,9 +33,11 @@ namespace Pilot.Report.Exploitation.AccountsReceivable
|
||||
public override void BarItemClick(BarItemClickEventArgs e)
|
||||
{
|
||||
base.BarItemClick(e);
|
||||
List<string> BarItemKeyList = new List<string> { "Test_Button_3", "Test_Button_1" };
|
||||
// 判断 应收对账单【明细版】按钮
|
||||
if (e.BarItemKey == "Test_Button_1")
|
||||
if (BarItemKeyList.Contains(e.BarItemKey))
|
||||
{
|
||||
string IsXN = e.BarItemKey == "Test_Button_3" ? "XN" : "";
|
||||
var reportModel = this.SysReportModel;
|
||||
|
||||
//单据头
|
||||
@@ -78,18 +81,18 @@ namespace Pilot.Report.Exploitation.AccountsReceivable
|
||||
fDate2 = sqlTestList[0]["Date"].ToString().Split(' ')[0];
|
||||
}
|
||||
|
||||
Main(filePath, fClient, fDate, fProject, list, Num, fAmount, fDate2, F_SFYJKH, Context);
|
||||
Main(filePath, fClient, fDate, fProject, list, Num, fAmount, fDate2, F_SFYJKH, Context, IsXN);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 赋值EXCEL
|
||||
/// </summary>
|
||||
static void Main(string outputFilePath, string fClient, string fDate, string fProject, DataRowCollection list, int Num, decimal fAmount,string fDate2,string F_SFYJKH, Kingdee.BOS.Context Context)
|
||||
static void Main(string outputFilePath, string fClient, string fDate, string fProject, DataRowCollection list, int Num, decimal fAmount,string fDate2,string F_SFYJKH, Kingdee.BOS.Context Context,string IsXN)
|
||||
{
|
||||
#region Excel代码
|
||||
|
||||
string filePath = @"D:\KingdeeModel\对账单模板2.xlsx";
|
||||
string filePath = $@"D:\KingdeeModel\对账单模板{IsXN}2.xlsx";
|
||||
FileStream file = new FileStream(filePath, FileMode.Open, FileAccess.Read);
|
||||
IWorkbook workbook = new XSSFWorkbook(file);
|
||||
file.Close();
|
||||
|
||||
Reference in New Issue
Block a user