#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) ; //µÃµ½ÏÂÀÐÞ¸ÄÐÐ 
 | 
            int GetPrevSelectRow(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 DataBI(LPCTSTR pSchema = NULL); //Êý¾ÝBI·ÖÎö 
 | 
        LPTSTR DataAnalysis(LPCTSTR pSchema = NULL); 
 | 
    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 Redraw(); 
 | 
        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); 
 | 
    public: 
 | 
        void ShowEditor(); 
 | 
        }; 
 | 
    }} 
 | 
}} 
 |