xj qian
2024-06-25 58c129e8f21f79396a822eaeadd78edf281b52a0
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
#pragma once
 
#include "kcontrol.hpp"
#include "kdwview.hpp"
namespace Hxsoft{namespace XFrame{
    namespace XOffice {namespace XCell    {
        class IGridReport  : public IDwView
        {
        public:
            int GetRow_() ;//µÃµ½ÐÐ
            int GetColumn_() ;//µÃµ½ÁÐ
            int GetRowCount_() ; //µÃµ½ÐÐÊý
            int GetColumnCount_() ; //µÃµ½ÁÐÊý
        public:
            int SetRow_(int row) ;
        public:
            LPCTSTR GetNote_(int nRow, int nColumn) ;//µÃµ½±¸×¢
            bool SetNote_(int nRow, int nColumn, LPCTSTR pStrNote) ; //ÉèÖñ¸×¢
            bool AddNote_(int nRow, int nColumn, LPCTSTR pStrNote, LPCTSTR pUser = NULL, LPCTSTR pData = NULL) ; //ÉèÖñ¸×¢
 
            LPCTSTR GetNote1_(int nRow, int nColumn) ;//µÃµ½ÐÞ¸Ä
            bool SetNote1_(int nRow, int nColumn, LPCTSTR pStrNote) ; //ÉèÖÃÐÞ¸Ä
            bool AddNote1_(int nRow, int nColumn, LPCTSTR pStrNote, LPCTSTR pUser = NULL, LPCTSTR pData = NULL) ; //ÉèÖÃÐÞ¸Ä
 
            LPCTSTR GetNote2_(int nRow, int nColumn) ;//µÃµ½Åú×¢
            bool SetNote2_(int nRow, int nColumn, LPCTSTR pStrNote) ; //ÉèÖÃÅú×¢
            bool AddNote2_(int nRow, int nColumn, LPCTSTR pStrNote, LPCTSTR pUser = NULL, LPCTSTR pData = NULL) ; //ÉèÖÃÅú×¢
 
        public:
            int InsertRow_(int nRow) ;//²åÈëÐÐ
            int DeleteRow_(int nRow) ;//ɾ³ýÐÐ
            int InsertRows_(int nRow, int nAmt) ;//²åÈë¶àÐÐ
            int DeleteRows_(int nRow, int nAmt) ;//ɾ³ý¶àÐÐ
        public:
            LPCTSTR GetColumnName_(int nColumn) ;//µÃµ½ÁÐÃû
            int GetColumnIndex_(LPCTSTR pColumn) ; //µÃµ½ÁкÅ
        public:
            LPCTSTR GetItemString_(int nRow, int nColumn, DWBuffer dwBuffer = dbuf_normal) ;//µÃµ½Êý¾ÝÖµ
            LPCTSTR GetItemString_(int nRow, LPCTSTR ColumnName, DWBuffer dwBuffer = dbuf_normal) ;//µÃµ½Êý¾ÝÖµ
            bool SetItemString_(int nRow, int nColumn, LPCTSTR lptStr, DWBuffer dwBuffer = dbuf_normal) ;//ÉèÖÃÊý¾ÝÖµ
            bool SetItemString_(int nRow, LPCTSTR ColumnName, LPCTSTR lptStr, DWBuffer dwBuffer = dbuf_normal) ;//ÉèÖÃÊý¾ÝÖµ
        public:
            bool SetItemStatus_(int nRow, int nColumn, RowStatus status, DWBuffer dwBuffer = dbuf_normal) ;//ÉèÖÃÐÐÁÐ״̬
            RowStatus GetItemStatus_(int nRow, int nColumn, DWBuffer dwBuffer = dbuf_normal) ;//µÃµ½ÐÐÁÐ״̬
 
        public:
            int    SetKeyValue_(int nRow, int nKeyValue) ;//ÉèÖÃÕûÊý¹Ø½¡Öµ
            int GetKeyValue_(int nRow) ;//µÃµ½ÕûÊý¹Ø½¡Öµ
            bool GetGuid_(int nRow, TCHAR Guid[], int nMax) ;//ÉèÖÃguid
            bool SetGuid_(int nRow, LPCTSTR pStrGuid) ; //ÉèÖÃguid
 
        public:
            int SetReadOnly_(bool bReadOnly = true) ; //ÉèÖÃÖ»¶Á
        public:
            int SelectRow_(int nRow, bool bSelect = true) ;//Ñ¡Öе¥ÐÐ
            int SelectRow_(int sRow, int eRow, bool bSelect = true) ;//Ñ¡ÖжàÐÐ
            int GetNextSelectRow_(int nStartRow) ; //µÃµ½ÏÂÀ­ÐÞ¸ÄÐÐ
            bool IsRowSelected_(int nRow) ; //ÅжÏÐÐÊÇ·ñ±»Ñ¡ÖÖ
            int SetSelectBkColor_(COLORREF color) ; //ÉèÖÃÑ¡ÔñµÄ±³¾°ÑÕÉ«
            int SetSelectionMode_(int nMode) ; //ÉèÖÃÑ¡ÔñµÄģʽ//0 unselection 1 singleSelection 2 multiselection 3 multiselectionex 
 
        public:
            int    DeletedCount_() ; //µÃµ½É¾³ýÐÐÐÐÊý
            int    ModifiedCount_() ; //µÃµ½ÐÞ¸ÄÐÐÐÐÊý
        public:
            int    Reset_() ; //Çå³ýÊý¾Ý
            int    ResetUpdateStatus_() ;//Çå³ýÐ޸ıê¼Ç
        public:
            int  GetXml_(BSTR& bstr) ;//»ñÈ¡XMLÊý¾Ý
            int  GetXml_(BSTR& bstr, LPCTSTR pGuid) ; //»ñÈ¡XMLÊý¾Ý
            int Load_(KXMLDOMElement  pElement) ;//¶ÁÈ¡Êý¾Ý
            int  LoadXml_(BSTR bstr) ;//¶ÁÈ¡Êý¾Ý
        public:
            int ClearObserver_() ;//Çå³ýʼþÕìÌý¶ÔÏó
        public:
            int DwUpdateTo_(KXMLDOMDocument pXmlDoc) ;//°ÑÊý¾Ý¸üе½XML¶ÔÏóÖÐ
            int DwUpdateAllTo_(KXMLDOMDocument  pXmlDoc) ;//°ÑÊý¾Ý¸üе½XML¶ÔÏóÖÐ
        public:
            int Retrieve_(LPCTSTR pServer, LPCTSTR pDataUrl, LPCTSTR pArgStr) ;//¶ÁÈ¡Êý¾Ý
            int Retrieve_(ITrans* pTrans, LPCTSTR pDataUrl, LPCTSTR pArgStr) ;//¶ÁÈ¡Êý¾Ý
            int Retrieve_(LPCTSTR pDataUrl, LPCTSTR pArgStr) ;//¶ÁÈ¡Êý¾Ý
 
            int Retrieve_(KXMLDOMElement  pElement) ;//¶ÁÈ¡Êý¾Ý
            int Retrieve_(KXMLDOMDocument& xml) ;//¶ÁÈ¡Êý¾Ý
 
            int RetrieveEx_(LPCTSTR pServer, LPCTSTR pEntity, LPCTSTR pEntityKey) ;//¶ÁÈ¡Êý¾Ý
            int RetrieveEx_(ITrans* pTrans, LPCTSTR pEntity, LPCTSTR pEntityKey) ;//¶ÁÈ¡Êý¾Ý
            int RetrieveEx_(LPCTSTR pEntity, LPCTSTR pEntityKey) ;//¶ÁÈ¡Êý¾Ý
        public:
            int SetDataObject_(LPCTSTR pServer, LPCTSTR pUrl) ;//ÉèÖÃÄ£°å¶ÔÏó
            int SetDataObject_(ITrans* pTrans, LPCTSTR pUrl) ;//ÉèÖÃÄ£°å¶ÔÏó
            int SetDataObject_(LPCTSTR pUrl) ;//ÉèÖÃÄ£°å¶ÔÏó
 
            int SetDataObject_(KXMLDOMElement  pElement) ;//ÉèÖÃÄ£°å¶ÔÏó
            int SetDataObject_(KXMLDOMDocument  pDoc) ;
        public:
            int ImportFile_() ; //תÈëÊý¾Ý
            int ImportFile_(LPCTSTR pStrFile, LPCTSTR pType = NULL, bool Header = false) ; //תÈëÊý¾Ý
            int ImportString_(LPCTSTR pStr, LPCTSTR pType = NULL, bool Header = false) ; //תÈëÎı¾Êý¾Ý
        public:
            int SetValues_(LPCTSTR pColName, LPCTSTR pExpr) ; //ÅúÁ¿ÉèÖÃÖµ
            int AddCalcColumn_(LPCTSTR pColName, LPCTSTR pExpr) ;//ÉèÖùØÁª¼ÆËãÁÐ
            int ClearCalcColumn_(LPCTSTR pColName = NULL) ;//Çå³ý¹ØÁª¼ÆËãÁÐ
        public:
            int GetNextModifyRow_(int nStart) ; //µÃµ½ÏÂÒ»ÐÞ¸ÄÐÐ
        public:
            int Modify_(LPCTSTR pStr) ; //Óï·¨ÐÞ¸Ä
            int Evaluate_(int nRow, LPCTSTR pExpr) ; //ÆÀ¹À±í´ïʽ
        public:
            int SetAutoFilter_(bool bAutoFilter) ; //ÉèÖÃ×Ô¶¯¹ýÂË
            int SetFilter_(LPCTSTR pStrFilter) ; //ÉèÖùýÂËÌõ¼þ
            int Filter_() ; //¹ýÂË
            int SetSort_(LPCTSTR pStrSort) ; //ÉèÖÃÅÅÐò²ÎÊý
            int Sort_() ; //ÅÅÐò
            int Find_(LPCTSTR pCondition = NULL) ; //²éÕÒ
            int FindNext_() ; //²éÕÒ
        public:
            int GetFirstVisibleRow_() ; //µÃµ½µ±Ç°ÏÔʾµÄµÚÒ»ÐÐ
            int Expand_(bool bExpand) ;//ÊÕËõ»òÕ¹¿ªÊý¾ÝÊÓͼ
        public:
            int Print_(LPCTSTR pXmlArg = NULL) ; //´òÓ¡
            int PrintPreview_(LPCTSTR pXmlArg = NULL) ; //´òÓ¡Ô¤ÀÀ
        public:
            int SaveAs_(LPCTSTR pXmlArg = NULL) ; //Áí´æÎª
            int SaveAs_(KXMLDOMDocument& xml, LPCTSTR pFileName = NULL); //Áí´æÎª
            int SaveAsEx_() ; //ÕûÌåÁí´æÎª
            int SaveAsEx_(LPCTSTR pStrFile) ; //ÕûÌåÁí´æÎª
        public:
            LPTSTR GetColumnProps_(LPCTSTR pColName) ; //µÃµ½ÁÐÕûÌåXMLÊôÐÔ
            int SetColumnProps_(LPCTSTR pColName, LPCTSTR pXmlProp) ; //ÉèÖÃÁÐÕûÌåXMLÊôÐÔ
            LPTSTR GetColumnProp_(LPCTSTR pColName, LPCTSTR pItem) ; //µÃµ½ÁÐÊôÐÔ
            int SetColumnProp_(LPCTSTR pColName, LPCTSTR pItem, LPCTSTR pProp) ;//ÉèÖÃÁÐÊôÐÔ
 
            LPTSTR GetColumnProps_(int nCol) ; //µÃµ½ÁÐÕûÌåXMLÊôÐÔ
            int SetColumnProps_(int nCol, LPCTSTR pXmlProp) ; //ÉèÖÃÁÐÕûÌåXMLÊôÐÔ
            LPTSTR GetColumnProp_(int nCol, LPCTSTR pItem) ; //µÃµ½ÁÐÊôÐÔ
            int SetColumnProp_(int nCol, LPCTSTR pItem, LPCTSTR pProp) ;//ÉèÖÃÁÐÊôÐÔ
        public:
            int DataBI_(LPCTSTR pSchema = NULL) ;//Êý¾ÝBI·ÖÎö
        public:
            int chart_(LPCTSTR pXmlArg = NULL) ;//ͼÐÎ
 
            //send event message
            int event_ItemFocusChanged_(int nRow, int nCol) ;
            int event_RowFocusChanged_(int nRow, int nOldRow) ;
            int event_GetFocus_() ;
            int event_LoseFocus_() ;
            int event_ItemChanged_(int nRow, int nCol, LPCTSTR pData) ;
            int event_ItemChanging_(int nRow, int nCol, LPCTSTR pData) ;
    public:
        int GetDwType_();
    public:
        int DwUpdateAllToEx(KXMLDOMDocument pXmlDoc);
    public:
        Hxsoft::XFrame::KXMLDOMElement  GetRowElement(int nRow);
    public:
        int InsertCol(int nCol, LPCTSTR pCaption, LPCTSTR pColName, int nWidth, LPCTSTR pColPath = NULL, LPCTSTR pStyleClass = NULL,
            LPCTSTR pEditClass = NULL, LPCTSTR pFormatClass = NULL);
        int RemoveCol(int nCol);
        int RemoveVCol(int nCol);
        int RemoveCol(LPCTSTR pColName);
 
        int AddEditStyle(LPCTSTR pName, LPCTSTR pStr);
        int RemoveEditStyle(LPCTSTR pName, LPCTSTR pStr);
        int SetColEditStyle(LPCTSTR pColName, LPCTSTR pClassName);
        int SetDDLBData(LPCTSTR pColName, LPCTSTR pData);
        LPCTSTR GetDDLBData(LPCTSTR pColName);
 
    public:
        LPTSTR GetColumnProp(int nCol, LPCTSTR pItem);
        LPTSTR GetColumnProp(LPCTSTR pColName, LPCTSTR pItem);
 
    public:
        int CreateTree(LPCTSTR pPath, int nCol, int nImage1, int nImage2);
        int GetContentRow(int nRow);
 
    public:
        int DwShareTo(IGridReport* pPrimaryReport);
    public:
        int SetAskStyle(bool bAskStyle);
        int CreateTreeEx(LPCTSTR pPath, int nCol, int nImage1, int nImage2);
    public:
        LPCTSTR GetItemDisplayString(int nRow, int nColumn, DWBuffer dwBuffer = dbuf_normal);
        LPCTSTR GetItemDisplayString(int nRow, LPCTSTR ColumnName, DWBuffer dwBuffer = dbuf_normal);
        bool SetItemDisplayString(int nRow, int nColumn, LPCTSTR lptStr, DWBuffer dwBuffer = dbuf_normal);
        bool SetItemDisplayString(int nRow, LPCTSTR ColumnName, LPCTSTR lptStr, DWBuffer dwBuffer = dbuf_normal);
 
        LPCTSTR GetItemTipString(int nRow, int nColumn, DWBuffer dwBuffer = dbuf_normal);
        LPCTSTR GetItemTipString(int nRow, LPCTSTR ColumnName, DWBuffer dwBuffer = dbuf_normal);
        bool SetItemTipString(int nRow, int nColumn, LPCTSTR lptStr, DWBuffer dwBuffer = dbuf_normal);
        bool SetItemTipString(int nRow, LPCTSTR ColumnName, LPCTSTR lptStr, DWBuffer dwBuffer = dbuf_normal);
    public:
        bool ItemChangeTo(int nRow, int nColumn, LPCTSTR lptStr, DWBuffer dwBuffer = dbuf_normal);
        bool ItemChangeTo(int nRow, LPCTSTR ColumnName, LPCTSTR lptStr, DWBuffer dwBuffer =dbuf_normal);
 
    public:
        int AllowSort(bool sort);
    public:
        int FindByColumn(int startRow, int columnIndex, LPCTSTR columnValue);
        int FindByColumn(int startRow, LPCTSTR column, LPCTSTR columnValue);
 
        int SetReadOnlyColumn(int columnIndex, bool flag = true);
        int SetReadOnlyColumn(LPCTSTR column, bool flag = true);
 
        int SetColumnWidth(int columnIndex, int width = 1);
        int SetColumnWidth(LPCTSTR column, int width = 1);
        int GetColumnWidth(int columnIndex);
        int GetColumnWidth(LPCTSTR column);
        int SetColumnState(int columnIndex, bool state);
        int SetColumnState(LPCTSTR column, bool state);
 
        void SetDataToClip(LPCTSTR DataStr);
        int AcceptText();
        int ShowRowTo(int row);
        int GetShowRow();
        LPCTSTR GetTitleName(int col);
    public:
        int SetRowSort(LPTSTR colName, bool colOrder = true);
        int SetClickEditFlag(bool f);
        int RedrawEx();
        bool SetRowMove(int row, int movecount);
        int GetTreeRow(int row);
        int GetTreeRowCount();
        int TreeRowExpand(int row, bool exp);
        int RetrieveDiff(KXMLDOMDocument& xml);//¶ÁÈ¡Êý¾Ý
        int Filter(LPTSTR pColumn, LPTSTR pStr);
    public:
        int SetHeaderText(int row, int col, LPTSTR name);
        int MoveColumnTo(int fromcolumn, int tocolumn);
    public:
        void SetEditUpperMode(bool upper);
        bool GetEditUpperMode();
    public:
        void ResetRepeats();
        void AddRepeats(wchar_t* colName);
        };
    }}
}}