Context menu

This method adds an item “View Details” in the context menu. On clicking on view details, it opens the purchase requisition form corresponding to the purchase order.

public int showContextMenu(int _menuHandle)
{
int ret;
int myItemIdx;
PopupMenu popupMenu = PopupMenu::create(_menuHandle, this.hWnd());

Args args = new Args();

;
myItemIdx = popupMenu.insertItem(“View details”);
ret = popupMenu.draw();
if (ret == myItemIdx)
{
args.record(PurchReqTable::findPurchReqId(PurchReq_PurchReqId.text()));
new MenuFunction(MenuItemDisplayStr(PurchReqTable),MenuItemType::Display).run(args);

}
return ret;
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s