¶Ô±ÈÐÂÎļþ |
| | |
| | | #include <wobject/xstring.hpp> |
| | | #include <xcontrol/xtreeview.hpp> |
| | | #include <xcontrol/xdwgrid.hpp> |
| | | #include <wobject/xdouble.hpp> |
| | | #include <xcontrol/xlayersheet.hpp> |
| | | #include <xcontrol/xdatetimepick.hpp> |
| | | |
| | | |
| | | #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; |
| | | |
| | | public: |
| | | MaintLevelCustomerWin(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {} |
| | | public: |
| | | static MaintLevelCustomerWin* CreateInstance(void* implPtr, void* hWnd) |
| | | { |
| | | MaintLevelCustomerWin* pWin = new MaintLevelCustomerWin(implPtr, (HWND)hWnd); |
| | | return pWin; |
| | | } |
| | | //å½ä»¤åå¸å½æ° |
| | | int OnCmdDispatch(xstring comdid) |
| | | { |
| | | if(comdid==L"xmOk") |
| | | { |
| | | xml x ; |
| | | |
| | | dw_arg.AcceptText(); |
| | | dw_arg.DwUpdateAllTo(x); |
| | | if(arg) |
| | | { |
| | | arg.AddArg(L"arg",x.xml()); |
| | | arg.AddArg(L"ok",L"true"); |
| | | } |
| | | CloseWindow(); |
| | | |
| | | return 1; |
| | | } |
| | | else if(comdid==L"xmCancel") |
| | | { |
| | | if(arg)arg.AddArg(L"ok",L"false"); |
| | | CloseWindow(); |
| | | return 1; |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | //å½ä»¤å¤çäºä»¶ |
| | | int OnXCommand(TEvent* evt, LPARAM param) |
| | | { |
| | | return OnCmdDispatch(evt->xcommand.pStrID); |
| | | } |
| | | |
| | | int OnAttachEvent() |
| | | { |
| | | //ç»å®å·¥å
·æ¡ç¹å»äºä»¶ |
| | | AttachEvent(L"WM_XCOMMAND", (FEvent)&MaintLevelCustomerWin::OnXCommand); |
| | | return 1; |
| | | } |
| | | |
| | | int onload() |
| | | { |
| | | SetArg(); |
| | | dw_arg = GetControl(L"dw_arg"); |
| | | |
| | | if(GetWinParam())arg = GetArg(); |
| | | |
| | | xstring dw = L"/sale/view/CustomerV3/template/customer/level.maint"; |
| | | dw_arg.openUrl(dw); |
| | | |
| | | dw_arg.SetColHeaderHeight(0); |
| | | dw_arg.SetRowSelectorWidth(0); |
| | | dw_arg.SetHScrollState(false); |
| | | dw_arg.SetVScrollState(false); |
| | | |
| | | |
| | | OnAttachEvent(); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | }; |