public void Eliminar(Estudiante est) { EstudianteDatos datos = new EstudianteDatos(); if (datos.SeleccionarPorId(est.Identificacion) == null) { throw new ApplicationException("El estudiante buscado no existe"); } datos.Eliminar(est); }
/// <summary> /// Guarda una Estudiante en la bd, valida que el nombre este correcto /// </summary> /// <param name="est">Categoría a guardar</param> public void Guardar(Estudiante est) { if (est.NombreCompleto.Length == 0) { throw new ApplicationException("Debe digitar el nombre"); } EstudianteDatos datos = new EstudianteDatos(); if (datos.SeleccionarPorId((est.Identificacion)) == null) { datos.Insertar(est); } else { datos.Actualizar(est); } }