Answers for "context method in ax 2012"

0

context method in ax 2012

public void context()
{
int selMenu,id;
DictEnum dEnum= new DictEnum(enumName2Id('TemplateEnum'));
PopupMenu menu;
menu = new PopupMenu(element.hWnd());
 
for(id=0; id<=dEnum.values()-1;id++)
{
 
menu.insertItem(dEnum.value2Name(id));
}
 
selMenu = menu.draw();
 
switch(selMenu)
{
 
case enum2int( TemplateEnum::Doctor) +2:
Template_Text.text(Template_Text.text()+enum2str(TemplateEnum::Doctor));
break;
 
case enum2int( TemplateEnum::Patient) +2:
Template_Text.text(Template_Text.text()+enum2str(TemplateEnum::Patient));
break;
 
case enum2int( TemplateEnum::Visiter) +2:
Template_Text.text(Template_Text.text()+enum2str(TemplateEnum::Visiter));
break;
}
}
Posted by: Guest on February-18-2021

Browse Popular Code Answers by Language