|  |  | 
 |  |  | #include <xcontrol/xcombobox.hpp> | 
 |  |  |  | 
 |  |  | #include <vbusiness/vutil/publiccode.vutil.vbusiness.hpp> | 
 |  |  | #include "viewobject/view.base.hpp"" | 
 |  |  | #include "viewobject/view.base.hpp" | 
 |  |  |  | 
 |  |  |  | 
 |  |  | using xml = KXMLDOMDocument; | 
 |  |  | 
 |  |  | { | 
 |  |  | public: | 
 |  |  |    ViewTotalWin(void* implPtr, HWND hWnd) :xwin(implPtr, hWnd) {} | 
 |  |  | public: | 
 |  |  |    static ViewTotalWin* CreateInstance(void* implPtr, void* hWnd) | 
 |  |  |    { | 
 |  |  |       return new ViewTotalWin(implPtr, (HWND)hWnd); | 
 |  |  |    } | 
 |  |  |  | 
 |  |  | public: | 
 |  |  |    xdwgrid   dw_list; | 
 |  |  |    xoffice    dw_office; | 
 |  |  |    xcell      dw_cell; | 
 |  |  | 
 |  |  |  | 
 |  |  |       int hCursor = 0; | 
 |  |  |       if (comdid == L"xmSearch") return OnSearch(); | 
 |  |  |  | 
 |  |  |       if (comdid == L"xmOwner") return OnOwnerData(); | 
 |  |  |       //if(UserNo !=L"00603") | 
 |  |  |       //{ | 
 |  |  |       if (comdid == L"xmAnalysis") | 
 |  |  | 
 |  |  |             Content = t.selectSingleNode(L"Content").text(); | 
 |  |  |          } | 
 |  |  |  | 
 |  |  |          xaserverarg arg1 ; | 
 |  |  |          xaserverarg arg1 =GetArg(); | 
 |  |  |          arg1.AddArg(L"value", Content); | 
 |  |  |          OpenWindow(L"dev:xpage[memo.edit.new.vx]", arg1); | 
 |  |  |          return 1; | 
 |  |  | 
 |  |  |             if (argUrl != L"") | 
 |  |  |             { | 
 |  |  |                xaserverarg ar ; | 
 |  |  |                ar.setNativePointer(ar.CreateInstance()); | 
 |  |  |                //ar.setNativePointer(ar.CreateInstance()); | 
 |  |  |                ar.AddArg(L"argurl", argUrl); | 
 |  |  |                if (argStr != L"") | 
 |  |  |                   ar.AddArg(L"arg", argStr); | 
 |  |  | 
 |  |  |       for (int i = 1; i < dw.GetColumnCount(); i++) | 
 |  |  |       { | 
 |  |  |          xstring colname = dw.GetColumnName(i); | 
 |  |  |          if (str.find(L"!" + colname + L",L") >= 0) | 
 |  |  |          if (str.find(L"!" + colname + L",") >= 0) | 
 |  |  |          { | 
 |  |  |             dw.SetColumnState(colname, false); | 
 |  |  |             dw.SetColumnState((LPCTSTR)colname.c_str(), false); | 
 |  |  |          } | 
 |  |  |       } | 
 |  |  |       return 1; | 
 |  |  | 
 |  |  |       return 1; | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |    int OnOwnerData() | 
 |  |  |    { | 
 |  |  |       int ret = MessageBox(GetHWND(), L"是否更新归属数据?\n更新过程预计需要些时间,如果中间弹出等待时间过长的提示,请点击中间重试按钮,或等待到一定时间再点击", L"提示", 0x4 /*yesno*/); | 
 |  |  |       if (ret != 6 /*IDYES */) return 1; | 
 |  |  |  | 
 |  |  |       xml x; | 
 |  |  |       HCURSOR hCursor = xutil::SetCursorWait(); | 
 |  |  |       if (xurl::get(L"/sale/data/CustomerV3/owner/reload", L"", x) != 1) | 
 |  |  |       { | 
 |  |  |          xutil::RestoreCursor(hCursor); | 
 |  |  |          return 1; | 
 |  |  |       } | 
 |  |  |       else | 
 |  |  |       { | 
 |  |  |          xutil::RestoreCursor(hCursor); | 
 |  |  |          alert(x.text()); | 
 |  |  |          return 1; | 
 |  |  |       } | 
 |  |  |  | 
 |  |  |       return 1; | 
 |  |  |    } | 
 |  |  |    //命令处理事件 | 
 |  |  |    int OnXCommand(TEvent* evt, int param) | 
 |  |  |    { | 
 |  |  | 
 |  |  |       AttachEvent(L"dw_report", L"DWV_CLICKED", (FEvent)&ViewTotalWin::OnDWClick); | 
 |  |  |       AttachEvent(L"dw_report", L"DWV_ROWFOCUSCHANGED", (FEvent)&ViewTotalWin::OnRowChanged);//绑定行更改触发事件OnRowChanged | 
 |  |  |       AttachEvent(L"dw_report", xstring(0x400 + 81), (FEvent)&ViewTotalWin::OnRetrieveFinished); | 
 |  |  |  | 
 |  |  |       return 1; | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |    int  OnRetrieve(xstring dataurl, xstring argstr) | 
 |  |  | 
 |  |  |          { | 
 |  |  |             KXMLDOMElement rpt = nlist.item(i); | 
 |  |  |             xstring name = rpt.getAttribute(L"name"); | 
 |  |  |             xc.AddItem( name, rpt); | 
 |  |  |             xc.AddItem( name, rpt.ptr()); | 
 |  |  |             if (i == 0) xc.SetText(name); | 
 |  |  |             if (i == 0) rptEle = rpt; | 
 |  |  |          } |