| | |
| | | use "xcontrol.vframe.vbusiness.vd" |
| | | use "xbase.vframe.vbusiness.vd" |
| | | #include <wobject/xstring.hpp> |
| | | #include <xcontrol/xtreeview.hpp> |
| | | #include <xcontrol/xdwgrid.hpp> |
| | | #include <wobject/xdouble.hpp> |
| | | #include <xcontrol/xlayersheet.hpp> |
| | | #include <xcontrol/xdatetimepick.hpp> |
| | | |
| | | unit trade |
| | | [ |
| | | class MaintLevelCustomerWin : public xframe |
| | | |
| | | #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" |
| | | #include "viewobject/view.base.hpp" |
| | | |
| | | using xml = KXMLDOMDocument; |
| | | class __declspec(dllexport) MaintLevelCustomerWin : public xframe |
| | | { |
| | | public: |
| | | xdwtable dw_arg; |
| | | xaserverarg arg; |
| | | |
| | | |
| | | //命令发布函数 |
| | | int OnCmdDispatch(string comdid) |
| | | public: |
| | | MaintLevelCustomerWin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {} |
| | | public: |
| | | static MaintLevelCustomerWin* CreateInstance(void* implPtr, void* hWnd) |
| | | { |
| | | if(comdid=="xmOk") |
| | | MaintLevelCustomerWin* pWin = new MaintLevelCustomerWin(implPtr, (HWND)hWnd); |
| | | return pWin; |
| | | } |
| | | //命令发布函数 |
| | | int OnCmdDispatch(xstring comdid) |
| | | { |
| | | if(comdid==L"xmOk") |
| | | { |
| | | xml x = new xml; |
| | | x.setNativePointer(x.CreateInstance()); |
| | | xml x ; |
| | | |
| | | dw_arg.AcceptText(); |
| | | dw_arg.DwUpdateAllTo(x.GetXmlDoc()); |
| | | dw_arg.DwUpdateAllTo(x); |
| | | if(arg) |
| | | { |
| | | arg.AddArg("arg",x.GetXml()); |
| | | arg.AddArg("ok","true"); |
| | | arg.AddArg(L"arg",x.xml()); |
| | | arg.AddArg(L"ok",L"true"); |
| | | } |
| | | CloseWindow(); |
| | | |
| | | return 1; |
| | | } |
| | | else if(comdid=="xmCancel") |
| | | else if(comdid==L"xmCancel") |
| | | { |
| | | if(arg)arg.AddArg("ok","false"); |
| | | if(arg)arg.AddArg(L"ok",L"false"); |
| | | CloseWindow(); |
| | | return 1; |
| | | } |
| | |
| | | } |
| | | |
| | | //命令处理事件 |
| | | int OnXCommand(ref TXCommandEvent evt,int param) |
| | | int OnXCommand(TEvent* evt, LPARAM param) |
| | | { |
| | | return OnCmdDispatch(evt.pStrID); |
| | | return OnCmdDispatch(evt->xcommand.pStrID); |
| | | } |
| | | |
| | | int OnAttachEvent() |
| | | { |
| | | //绑定工具条点击事件 |
| | | AttachEvent("WM_XCOMMAND",OnXCommand); |
| | | AttachEvent(L"WM_XCOMMAND", (FEvent)&MaintLevelCustomerWin::OnXCommand); |
| | | return 1; |
| | | } |
| | | |
| | | int onload() |
| | | { |
| | | dw_arg = GetControl("dw_arg"); |
| | | SetArg(); |
| | | dw_arg = GetControl(L"dw_arg"); |
| | | |
| | | if(GetParam())arg = GetParam(); |
| | | if(GetWinParam())arg = GetArg(); |
| | | |
| | | string dw = "/sale/view/CustomerV3/template/customer/level.maint"; |
| | | xstring dw = L"/sale/view/CustomerV3/template/customer/level.maint"; |
| | | dw_arg.openUrl(dw); |
| | | |
| | | dw_arg.SetColHeaderHeight(0); |
| | |
| | | } |
| | | |
| | | }; |
| | | ] |