private void DeleteRow(int row, string ItemUID) { try { if (ItemUID.Equals(MATRIZ_PRINCIPAL)) { oMatrix.FlushToDataSource(); if (dsTipoUsuario.GetValue("Code", row - 1) != null && !string.IsNullOrEmpty(dsTipoUsuario.GetValue("Code", row - 1).Trim())) { deletedEntries.Add(dsTipoUsuario.GetValue("Code", row - 1).ToString().Trim()); dsTipoUsuario.RemoveRecord(row - 1); if (mForm.Mode == SAPbouiCOM.BoFormMode.fm_OK_MODE) { mForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE; } oMatrix.LoadFromDataSource(); oMatrix.CommonSetting.SetCellEditable(dsTipoUsuario.Size, 1, true); } } } catch (Exception ex) { StatusMessageError("DeleteRow() > " + ex.Message); } }
private void Form_DataUpdateBefore(ref SAPbouiCOM.BusinessObjectInfo pVal, out bool BubbleEvent) { BubbleEvent = true; SAPbouiCOM.DBDataSource oDBDataSource = oForm.DataSources.DBDataSources.Item("@Z_COMI_COMGRP"); var ValidaNuevoReg = oDBDataSource.GetValue("U_Codigo", oDBDataSource.Size - 1); if (ValidaNuevoReg.Trim().Length == 0) { oDBDataSource.RemoveRecord(oDBDataSource.Size - 1); } }