ホテル管理システム
ogi
yesterday 1a1c8e71fcd14858f595029f089b2d4a00202b32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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
 
    }
}