void objetoGrid_CellValidating(object sender, DataGridViewCellValidatingEventArgs e) { DataGridView grid = (DataGridView)sender; if (grid.CurrentRow.Cells[e.ColumnIndex].IsInEditMode) { if (grid.CurrentCell.ColumnIndex == 3) { cuentacontable objeto = null; objeto = RegistroPorCodigo(grid.EditingControl.Text); if (objeto == null) { grid.CurrentRow.Cells["colPadre"].Value = null; } else { grid.CurrentRow.Cells["colPadre"].Value = objeto; } if (objeto == null) { General.Mensaje(General.itemNoEncontrado); e.Cancel = true; } } } }
private cuentacontable CargarRelaciones(cuentacontable unObjeto) { int ix; ix = ListaPadres.FindIndex(x => x.id == unObjeto.idpadre); if (ix > -1) { unObjeto.Padre = listaPadres[ix]; unObjeto.codigopadre = ListaPadres[ix].codigo; } return(unObjeto); }
public int Borrar(cuentacontable item) { return(item.BorrarObjetoT()); }
public int Grabar(cuentacontable item) { return(item.GrabarObjetoT(x => x.id)); }