public override void MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
 {
     BubbleEvent = true;
     this.UIAPIRawForm.Freeze(true);
     try
     {
         if (pVal.MenuUID == "AddLine")
         {
             if (this.UIAPIRawForm.Mode == SAPbouiCOM.BoFormMode.fm_ADD_MODE || this.UIAPIRawForm.Mode == SAPbouiCOM.BoFormMode.fm_OK_MODE)
             {
                 if (fldrItems.Selected == true)
                 {
                     mtxItems.AddLine();
                 }
                 else
                 {
                     mtxCost.AddLine();
                 }
             }
         }
         if (pVal.MenuUID == "DeleteLine")
         {
             if (RowToDeleteIndex > 0)
             {
                 mtxItems.DeleteRow(RowToDeleteIndex);
                 mtxItems.FlushToDataSource();
             }
         }
     }
     catch (Exception ex)
     {
         Application.SBO_Application.SetStatusBarMessage(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Long, true);
     }
     this.UIAPIRawForm.Freeze(false);
 }
Exemple #2
0
 void btnAddRow_ClickAfter(object sboObject, SAPbouiCOM.SBOItemEventArg pVal)
 {
     mtxCost.AddLine();
     //mtxCost.AddRowIndex();
     mtxCost.AddRowIndex();
     mtxCost.FlushToDataSource();
     this.UIAPIRawForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE;
 }