/// <summary> /// Handle menu event /// </summary> public void HandleMenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent) { BubbleEvent = true; AlternativeItem altItem = new AlternativeItem(oSBOApplication, oSBOCompany); ChangeCompItem chgCompItem = new ChangeCompItem(oSBOApplication, oSBOCompany); UpdateBomVer updtBomVer = new UpdateBomVer(oSBOApplication, oSBOCompany); try { switch (pVal.MenuUID) { case "89111": altItem.MenuEvent_AltItem(ref pVal, out BubbleEvent); break; case "89222": chgCompItem.MenuEvent_ChangeCompItm(ref pVal, out BubbleEvent); break; case "89333": updtBomVer.MenuEvent_UpdateBomVer(ref pVal, out BubbleEvent); break; case "AltItemAdd": altItem.MenuEvent_AltItemAdd(ref pVal, ref BubbleEvent); break; case "AltItemDel": altItem.MenuEvent_AltItemDel(ref pVal, ref BubbleEvent); break; } } catch (Exception ex) { BubbleEvent = false; oSBOApplication.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error); } }