private Models.Carrera ObtenerCarreraSeleccionada() { try { int rowindex = dgvDatos.CurrentCell.RowIndex; var id = (int)dgvDatos.Rows[rowindex].Cells[0].Value; var m = CarrerasRepository.ObtenerCarreraPorId(id); return(m); } catch (Exception) { return(null); } }