using NPOI.HSSF.UserModel;
|
using NPOI.SS.UserModel;
|
using NPOI.XSSF.UserModel;
|
using HotelPms.Share.Util;
|
using System;
|
using System.Collections.Generic;
|
using System.Data;
|
using System.Diagnostics;
|
using System.Drawing;
|
using System.IO;
|
using System.Linq;
|
using System.Text;
|
|
namespace HotelPms.Share.Windows.Report
|
{
|
public class GridXml : ReportBase, IDisposable, IReport
|
{
|
#region ★★★★★ Declartions ★★★★★
|
|
private bool m_Disposed = false;
|
|
#endregion
|
|
#region ★★★★★ Property ★★★★★
|
|
#endregion
|
|
#region ★★★★★ Class Event ★★★★★
|
|
public GridXml(DataTable data, GridStyle style)
|
{
|
m_Data = data;
|
m_Style = style;
|
}
|
|
~GridXml()
|
{
|
Dispose(false);
|
}
|
|
protected virtual void Dispose(bool disposing)
|
{
|
if (!m_Disposed) //一回だけ
|
{
|
if (disposing)
|
{
|
//Managed Resources
|
}
|
|
//Unmanaged resources
|
m_Disposed = true;
|
}
|
}
|
|
public void Dispose()
|
{
|
Dispose(true);
|
GC.SuppressFinalize(this);
|
}
|
|
#endregion
|
|
#region ★★★★★ Control Event ★★★★★
|
#endregion
|
|
#region ★★★★★ Private Function ★★★★★
|
#endregion
|
|
#region ★★★★★ Public Function ★★★★★
|
|
public void Output()
|
{
|
string path = System.IO.Path.GetTempFileName().Replace(".tmp", ".xml");
|
Output(path);
|
Process.Start(path);
|
}
|
|
public void Output(string file)
|
{
|
if (m_Data.TableName.Length == 0) { m_Data.TableName = "Data"; }
|
m_Data.WriteXml(file);
|
}
|
|
|
#endregion
|
|
}
|
}
|