protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException { if (sender.equals(form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing())) { setHospitalSpecialtyProcedure(); switch (menuItemID) { case GenForm.ContextMenus.LocationServiceActivityGrid.NEW_PRICE : menuActivityNewPriceClick(); break; case GenForm.ContextMenus.LocationServiceActivityGrid.UPDATE_PRICING : menuActivityUpdatePriceClick(); break; case GenForm.ContextMenus.LocationServiceActivityGrid.VIEW_PRICING : menuActivityViewPriceClick(); break; } } switch (menuItemID) { case GenForm.ContextMenus.GenericGrid.Add : newInstance(); break; case GenForm.ContextMenus.GenericGrid.Update : updateInstance(); break; case GenForm.ContextMenus.GenericGrid.Remove : { if (form.treHeader().getSelectedNode().getValue() instanceof LocationServiceVo) { removeService(); } else if (form.treHeader().getSelectedNode().getValue() instanceof LocationServiceFunctionsVo) removeFunction(); else if (form.treHeader().getSelectedNode().getValue() instanceof LocationServiceActivityVo) removeActivity(); break; } case GenForm.ContextMenus.GenericGrid.Confirm : activatePrices(); break; case GenForm.ContextMenus.GenericGrid.Replace : priceIncrease(); break; default : break; } }