예제 #1
0
        /// <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);
            }
        }