1
yhj
2024-07-24 5e5d945e91568b973faa27d8ab0bcef99fc4a6c5
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
89
#region
 
using System;
using System.Data;
using CSFrameworkV5.Common;
using DevExpress.XtraBars;
 
#endregion
 
namespace CSFrameworkV5.Library
{
    public partial class frmBasePrint : frmBase
    {
        public frmBasePrint()
        {
            InitializeComponent();
        }
 
        protected void AssertNull(object o, string throwMsg)
        {
            if (o == null) throw new Exception(throwMsg);
        }
 
        protected void AssertNullDataSet(DataSet ds, string throwMsg)
        {
            if (ds == null || ds.Tables.Count == 0 ||
                ds.Tables[0].Rows.Count == 0) throw new Exception(throwMsg);
        }
 
        private void btnClose_ItemClick(object sender, ItemClickEventArgs e)
        {
            DoClose();
        }
 
        private void btnDesign_ItemClick(object sender, ItemClickEventArgs e)
        {
            DoDesignReport();
        }
 
        private void btnHelp_ItemClick(object sender, ItemClickEventArgs e)
        {
            DoHelp();
        }
 
        private void btnPreview_ItemClick(object sender, ItemClickEventArgs e)
        {
            DoPreview();
        }
 
        private void btnPrint_ItemClick(object sender, ItemClickEventArgs e)
        {
            DoPrint();
        }
 
        protected virtual void DoClose()
        {
            Close();
        }
 
        protected virtual void DoDesignReport()
        {
            //
        }
 
        protected virtual void DoHelp()
        {
            //
        }
 
        protected virtual void DoPreview()
        {
            //
        }
 
        protected virtual void DoPrint()
        {
            //
        }
 
        private void frmPrintBase_Load(object sender, EventArgs e)
        {
            btnClose.Glyph = Globals.LoadImage("24_Exit.ico");
            btnPrint.Glyph = Globals.LoadImage("24_Print.ico");
            btnPreview.Glyph = Globals.LoadImage("24_PrintPreview.ico");
            btnHelp.Glyph = Globals.LoadImage("24_Help.ico");
            btnDesign.Glyph = Globals.LoadImage("24_DesignReport.ico");
        }
    }
}