| | |
| | | use "xcontrol.vframe.vbusiness.vd" |
| | | use "xbase.vframe.vbusiness.vd" |
| | | use "base.view.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 vbusiness |
| | | [ |
| | | class SysLoginRecord : public frame |
| | | |
| | | #include "vbusiness/vframe/listwin.vframe.vbusiness.hpp" |
| | | #include "viewobject/view.base.hpp" |
| | | |
| | | using xml = KXMLDOMDocument; |
| | | class __declspec(dllexport) SysLoginRecord : public xframe |
| | | { |
| | | public: |
| | | xdwgrid dw_logrecord; |
| | | xdwtable dw_arg; |
| | | public: |
| | | SysLoginRecord(void* implPtr, HWND hWnd) :xframe(implPtr, hWnd) {} |
| | | public: |
| | | static SysLoginRecord* CreateInstance(void* implPtr, void* hWnd) |
| | | { |
| | | SysLoginRecord* pWin = new SysLoginRecord(implPtr, (HWND)hWnd); |
| | | return pWin; |
| | | } |
| | | int OnRetrieve() |
| | | { |
| | | xcontrol xc_text =GetControl("QueryTxt"); |
| | | xcontrol xc_cbx = GetControl("cbx_type"); |
| | | string ls_querytxt; |
| | | string ls_querytype; |
| | | xcontrol xc_text =GetControl(L"QueryTxt"); |
| | | xcontrol xc_cbx = GetControl(L"cbx_type"); |
| | | xstring ls_querytxt; |
| | | xstring ls_querytype; |
| | | ls_querytxt = xc_text.GetText(); |
| | | ls_querytype = xc_cbx.GetText(); |
| | | xml x = new xml; |
| | | x.setNativePointer(x.CreateInstance()); |
| | | xaserverarg arg = new xaserverarg; |
| | | arg.setNativePointer(arg.CreateInstance()); |
| | | arg.AddArg("sType",ls_querytype); |
| | | arg.AddArg("QueryText",ls_querytxt); |
| | | arg.AddArg("QueryArg",GetQueryArg()); |
| | | xml x ; |
| | | xaserverarg arg ; |
| | | arg.AddArg(L"sType",ls_querytype); |
| | | arg.AddArg(L"QueryText",ls_querytxt); |
| | | arg.AddArg(L"QueryArg",GetQueryArg()); |
| | | //alert(ls_querytxt); |
| | | if (url::get("/sale/data/Total3/total/GDNTotal/Item/GetSysLoginLog",arg.GetString(),x) == 1) |
| | | if (xurl::get(L"/sale/data/Total3/total/GDNTotal/Item/GetSysLoginLog",arg.GetString(),x) == 1) |
| | | { |
| | | //trace(x.GetXml()); |
| | | //trace(x.xml()); |
| | | dw_logrecord.Retrieve(x); |
| | | dw_logrecord.Redraw(); |
| | | dw_logrecord.SetSelectionMode(1); |
| | | } |
| | | else |
| | | alert("查不到"); |
| | | alert(L"查不到"); |
| | | return 1; |
| | | } |
| | | //命令发布函数 |
| | | int OnCmdDispatch(string comdid) |
| | | int OnCmdDispatch(xstring comdid) |
| | | { |
| | | int hCursor = xutil::SetCursorWait(); |
| | | if(comdid=="ContSearch") |
| | | HCURSOR hCursor = xutil::SetCursorWait(); |
| | | if(comdid==L"ContSearch") |
| | | OnRetrieve(); |
| | | return 0; |
| | | } |
| | | |
| | | //命令处理事件 |
| | | int OnXCommand(ref TXCommandEvent evt,int p) |
| | | int OnXCommand(TEvent* evt, LPARAM param) |
| | | { |
| | | return OnCmdDispatch(evt.pStrID); |
| | | return OnCmdDispatch(evt->xcommand.pStrID); |
| | | } |
| | | |
| | | string GetQueryArg() |
| | | xstring GetQueryArg() |
| | | { |
| | | dw_arg.AcceptText(); |
| | | xml x = new xml; |
| | | x.setNativePointer(xml::CreateInstance()); |
| | | dw_arg.DwUpdateAllTo(x.GetXmlDoc()); |
| | | return x.GetXml(); |
| | | xml x ; |
| | | |
| | | dw_arg.DwUpdateAllTo(x); |
| | | return x.xml(); |
| | | } |
| | | |
| | | |
| | | int OnAttachEvent() |
| | | { |
| | | AttachEvent("WM_XCOMMAND",OnXCommand); |
| | | AttachEvent(L"WM_XCOMMAND", (FEvent)&SysLoginRecord::OnXCommand); |
| | | return 1; |
| | | } |
| | | |
| | | int onload() |
| | | { |
| | | dw_logrecord = GetControl("dw_logrecord"); |
| | | dw_logrecord.openUrl("/sale/view/SysUser/template/SysLoginRecord"); |
| | | dw_arg = GetControl("dw_arg"); |
| | | dw_arg.openUrl("/sale/view/AR/template/queryarg"); |
| | | dw_logrecord = GetControl(L"dw_logrecord"); |
| | | dw_logrecord.openUrl(L"/sale/view/SysUser/template/SysLoginRecord"); |
| | | dw_arg = GetControl(L"dw_arg"); |
| | | dw_arg.openUrl(L"/sale/view/AR/template/queryarg"); |
| | | dw_arg.SetColHeaderHeight(0); |
| | | dw_arg.SetRowSelectorWidth(0); |
| | | dw_arg.SetHScrollState(false); |
| | |
| | | } |
| | | int onloaded() |
| | | { |
| | | //alert("xxx"); |
| | | //alert(L"xxx"); |
| | | OnAttachEvent(); |
| | | //OnRetrieve(); |
| | | return 1; |
| | | } |
| | | }; |
| | | ] |
| | | }; |