use "xcontrol.vframe.vbusiness.vd"
|
use "xbase.vframe.vbusiness.vd"
|
use "base.view.vd"
|
|
unit vbusiness
|
[
|
class SysLoginRecord : public frame
|
{
|
xdwgrid dw_logrecord;
|
xdwtable dw_arg;
|
int OnRetrieve()
|
{
|
xcontrol xc_text =GetControl("QueryTxt");
|
xcontrol xc_cbx = GetControl("cbx_type");
|
string ls_querytxt;
|
string 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());
|
//alert(ls_querytxt);
|
if (url::get("/sale/data/Total3/total/GDNTotal/Item/GetSysLoginLog",arg.GetString(),x) == 1)
|
{
|
//trace(x.GetXml());
|
dw_logrecord.Retrieve(x);
|
dw_logrecord.Redraw();
|
dw_logrecord.SetSelectionMode(1);
|
}
|
else
|
alert("²é²»µ½");
|
return 1;
|
}
|
//ÃüÁî·¢²¼º¯Êý
|
int OnCmdDispatch(string comdid)
|
{
|
int hCursor = xutil::SetCursorWait();
|
if(comdid=="ContSearch")
|
OnRetrieve();
|
return 0;
|
}
|
|
//ÃüÁî´¦Àíʼþ
|
int OnXCommand(ref TXCommandEvent evt,int p)
|
{
|
return OnCmdDispatch(evt.pStrID);
|
}
|
|
string GetQueryArg()
|
{
|
dw_arg.AcceptText();
|
xml x = new xml;
|
x.setNativePointer(xml::CreateInstance());
|
dw_arg.DwUpdateAllTo(x.GetXmlDoc());
|
return x.GetXml();
|
}
|
|
|
int OnAttachEvent()
|
{
|
AttachEvent("WM_XCOMMAND",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_arg.SetColHeaderHeight(0);
|
dw_arg.SetRowSelectorWidth(0);
|
dw_arg.SetHScrollState(false);
|
dw_arg.SetVScrollState(false);
|
return 0;
|
}
|
int onloaded()
|
{
|
//alert("xxx");
|
OnAttachEvent();
|
//OnRetrieve();
|
return 1;
|
}
|
};
|
]
|