|  |  | 
 |  |  |  | 
 |  |  | #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" | 
 |  |  | #include "viewobject/view.base.hpp" | 
 |  |  | #include "adt/xarray.hpp" | 
 |  |  |  | 
 |  |  | using xml = KXMLDOMDocument; | 
 |  |  | class __declspec(dllexport) CartermList : public xwin | 
 |  |  | class __declspec(dllexport) CartermList : public listwin | 
 |  |  | { | 
 |  |  | public: | 
 |  |  |    xdwgrid   dw_list; | 
 |  |  |    xdwpages dw_pages; | 
 |  |  |    xstring m_QueryTxt; | 
 |  |  |    KXMLDOMDocument m_configDoc; | 
 |  |  |    static int dw_hWnd; | 
 |  |  |    //xdwgrid   dw_list; | 
 |  |  |    //xdwpages dw_pages; | 
 |  |  |    //xstring m_QueryTxt; | 
 |  |  |    //KXMLDOMDocument m_configDoc; | 
 |  |  |    //static int dw_hWnd; | 
 |  |  |  | 
 |  |  | public: | 
 |  |  |    CartermList(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {} | 
 |  |  |    CartermList(void* implPtr, HWND hWnd) :listwin(implPtr, hWnd) {} | 
 |  |  | public: | 
 |  |  |    static CartermList* CreateInstance(void* implPtr, void* hWnd) | 
 |  |  |    { | 
 |  |  |       CartermList* pWin = new CartermList(implPtr, (HWND)hWnd); | 
 |  |  |       return pWin; | 
 |  |  |    } | 
 |  |  |    int alert(xstring str) | 
 |  |  |    { | 
 |  |  |       //win::MessageBox(GetHWND(),str,L"提示22:",0); | 
 |  |  |       TApp::alert(this, str); | 
 |  |  |       return 0; | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |    xstring GetGuid() { | 
 |  |  |       return TApp::GetGuid(); | 
 |  |  |       return publiccode::GetGuid(); | 
 |  |  |    } | 
 |  |  |    int OnAddrow() | 
 |  |  |    { | 
 |  |  | 
 |  |  |       dw_list.SetItemString(rows, L"PStatus", L"1"); | 
 |  |  |       dw_list.SetItemString(rows, L"PCStatus", L"1"); | 
 |  |  |       dw_list.SetItemString(rows, L"Type", L"7"); | 
 |  |  |       return 1; | 
 |  |  |    } | 
 |  |  |    int OnInsertRow() | 
 |  |  |    { | 
 |  |  | 
 |  |  |       dw_list.SetItemString(row, L"PStatus", L"1"); | 
 |  |  |       dw_list.SetItemString(row, L"PCStatus", L"1"); | 
 |  |  |       dw_list.SetItemString(row, L"Type", L"7"); | 
 |  |  |       return 1; | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |    int ViewUpdate(param pr, xstring updateItem, xaserverarg   arg) | 
 |  |  |    int ViewUpdate(LPARAM pr, xstring updateItem, xaserverarg   arg) | 
 |  |  |    { | 
 |  |  |       if (updateItem == L"del") | 
 |  |  |       { | 
 |  |  | 
 |  |  |    int OnDeleteRow() | 
 |  |  |    { | 
 |  |  |       int rows = dw_list.GetRowCount(); | 
 |  |  | 		 | 
 |  |  |       int row2 = dw_list.GetPrevSelectRow(rows); | 
 |  |  |       while (row2 > 0) { | 
 |  |  |          dw_list.DeleteRow(row2); | 
 |  |  |          row2 = dw_list.GetPrevSelectRow(row2 - 1); | 
 |  |  |       } | 
 |  |  | 		 | 
 |  |  |       dw_list.SelectRow(0, false); | 
 |  |  |       return 1; | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |    int OnSave() | 
 |  |  | 
 |  |  |  | 
 |  |  |    int onload() | 
 |  |  |    { | 
 |  |  |       SetAgent(); | 
 |  |  |       OnAttachEvent(); | 
 |  |  |       list::onload(); | 
 |  |  |       listwin::onload(); | 
 |  |  |       dw_list.SetReadOnly(false); | 
 |  |  |       return -1; | 
 |  |  |    } |