49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
|
|
using Kingdee.BOS;
|
|||
|
|
using Kingdee.BOS.App;
|
|||
|
|
using Kingdee.BOS.Contracts;
|
|||
|
|
using Kingdee.BOS.Util;
|
|||
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
|
|||
|
|
namespace GZ_LTHReportForms.Services
|
|||
|
|
{
|
|||
|
|
internal class TempTableService
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
private Context ctx;
|
|||
|
|
|
|||
|
|
|
|||
|
|
public TempTableService(Context ctx)
|
|||
|
|
{
|
|||
|
|
this.ctx = ctx;
|
|||
|
|
}
|
|||
|
|
/// <summary>
|
|||
|
|
/// 删除临时表
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="ctx"></param>
|
|||
|
|
/// <param name="tempTable"></param>
|
|||
|
|
public void DropTempTable(string tableName)
|
|||
|
|
{
|
|||
|
|
if (!tableName.IsNullOrEmptyOrWhiteSpace())
|
|||
|
|
{
|
|||
|
|
IDBService dbservice = ServiceHelper.GetService<IDBService>();
|
|||
|
|
dbservice.DeleteTemporaryTableName(ctx, new string[] { tableName });
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
/// <summary>
|
|||
|
|
/// 创建临时表
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="ctx"></param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public string CreateTempTable()
|
|||
|
|
{
|
|||
|
|
IDBService dbservice = ServiceHelper.GetService<IDBService>();
|
|||
|
|
string[] temptables = dbservice.CreateTemporaryTableName(ctx, 1);
|
|||
|
|
return temptables[0];
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|