xj qian
2024-06-26 ebc4b46218d7b9f090d1084a741a1622971d19a5
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
#pragma once
#include "kcontrol.hpp"
 
namespace Hxsoft{ namespace XFrame{ namespace XOffice {namespace XReport
{
    class IXReport : public IXFControl
    {
    public:
        enum RowStatus{rs_new=0,rs_newmodified,rs_datamodified,rs_datanotmodified};
        enum DWBuffer{dbuf_normal=0,dbuf_filter,dbuf_delete};
 
    public:
        int GetRow_();
        int GetColumn_();
 
        int GetRowCount_();
        int SetRow_(int row);
    public:
        int GetColumnCount_();
        LPCTSTR GetColumnName_(int col);
        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:
        int InsertRow_(int nRow);
        int DeleteRow_(int nRow);
    public:
        int  GetXml_(BSTR &bstr);
        int  GetXml_(BSTR &bstr,LPCTSTR pGuid);
        int  LoadXml_(BSTR bstr);
        int Load_(KXMLDOMElement  pElement);
    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 DwUpdateTo_(KXMLDOMDocument pXmlDoc);
        int DwUpdateAllTo_(KXMLDOMDocument pXmlDoc);
    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);//读取数据
 
    public:
        virtual int SetDataObject_(LPCTSTR pServer,LPCTSTR pUrl) ;//设置模板对象
        virtual int SetDataObject_(ITrans *pTrans,LPCTSTR pUrl) ;//设置模板对象
        virtual int SetDataObject_(LPCTSTR pUrl) ;//设置模板对象
 
        virtual int SetDataObject_(KXMLDOMElement  pElement) ;//设置模板对象
        virtual 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    Reset_();
        int    ResetUpdateStatus_();
 
    public:
        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:
        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:
        int CreateTree(LPCTSTR pPath,int nCol, int nImage1,int nImage2);
        int GetContentRow(int nRow);
    };
}}}}