use "win.vl"
|
use "treeview.vm"
|
use "dev:vm[xdwgrid.vm]"
|
use "dev:vm[xdwtable.vm]"
|
use "pref.vl"
|
use "dev:vm[xml.vm]"
|
use "dev:vm[xaserverarg.vm]"
|
use "dev:vm[xaserver.vm]"
|
use "dev:vm[xutil.vm]"
|
use "dev:vm[control.vm]"
|
|
unit vbusiness.xpage
|
[
|
AddUomGroup is extend win__;
|
about AddUomGroup
|
[
|
control:
|
|
method:
|
[
|
|
|
int SetAgent()
|
{
|
return 1;
|
}
|
//½¹µã¼¤»î´¦Àíº¯Êý
|
int OnSetFocus(ref TEvent evt,int p)
|
{
|
int SetAgent();
|
|
//ÖØÖù¤¾ßÌõ
|
return 1;
|
}
|
|
//ÃüÁî·¢²¼º¯Êý
|
int OnCmdDispatch(string comdid)
|
{
|
if (comdid=="cb_cancel")
|
CloseWindow();
|
else if(comdid=="cb_ok")
|
{
|
control__ xc = new control__;
|
xc.setNativePointer(this.GetControl("Txt"));
|
string name = xc.GetText();
|
xaserverarg__ arg=new xaserverarg__;
|
arg.setNativePointer(arg.CreateInstance());
|
arg = GetParam();
|
arg.AddArg("GroupName",name);
|
arg.AddArg("return","ok");
|
CloseWindow();
|
}
|
return 0;
|
}
|
|
//ÃüÁî´¦Àíʼþ
|
int OnXCommand(ref TXCommandEvent evt,int p)
|
{
|
return OnCmdDispatch(evt.pStrID);
|
}
|
|
int OnAttachEvent()
|
{
|
//°ó¶¨¹¤¾ßÌõµã»÷ʼþ
|
AttachEvent("WM_XCOMMAND",OnXCommand);
|
//»ñÈ¡½¹µãʼþ£¬ÓÃÓÚÖØÖù¤¾ßÌõ
|
AttachEvent("WM_SETFOCUS",OnSetFocus);
|
}
|
|
int OnInitial()
|
{
|
SetAgent();
|
|
OnAttachEvent();
|
|
return 1;
|
}
|
|
|
|
int onload()
|
{
|
OnInitial();
|
|
if(this.GetParam())
|
{
|
|
if (GetParam())
|
{
|
xaserverarg__ arg=new xaserverarg__;
|
arg.setNativePointer(arg.CreateInstance());
|
arg = GetParam();
|
string note = arg.GetArgString("note");
|
if(note=="ÐÞ¸Ä")
|
{
|
string name = arg.GetArgString("GroupName");
|
control__ xc = new control__;
|
xc.setNativePointer(GetControl("Txt"));
|
xc.SetText(name);
|
}
|
string id = arg.GetArgString("m_id");
|
if(id =="FND_UOM")
|
{
|
win__::SetWindowText(this.GetHWND(),"¼ÆÁ¿µ¥Î»");
|
}
|
else if(id =="FND_CustomerSource")
|
{
|
win__::SetWindowText(this.GetHWND(),"¿Í»§À´Ô´");
|
}
|
else if(id =="FND_AuxiliaryAttribute")
|
{
|
win__::SetWindowText(this.GetHWND(),"¸¨ÖúÊôÐÔ");
|
}
|
}
|
}
|
|
return 1;
|
}
|
]
|
|
]
|
]
|