1
This commit is contained in:
parent
0dfec1b78f
commit
de36c0ca2c
@ -12,6 +12,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;
|
||||
@ -29,9 +30,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;
|
||||
|
||||
//单据头
|
||||
@ -75,18 +78,18 @@ namespace Pilot.Report.Exploitation.AccountsReceivable
|
||||
fDate2 = sqlTestList[0]["FDate"].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\对账单模板.xlsx";
|
||||
string filePath = $@"D:\KingdeeModel\对账单模板{IsXN}.xlsx";
|
||||
FileStream file = new FileStream(filePath, FileMode.Open, FileAccess.Read);
|
||||
IWorkbook workbook = new XSSFWorkbook(file);
|
||||
file.Close();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user