예제 #1
0
        public void Guardar(MotivoAtencion motivo)
        {
            //if (String.IsNullOrWhiteSpace(motivo.Descripcion))
            //    throw new ApplicationException("La descripcion del motivo es requerida");


            //if (motivo.NumeroMotivo == 0)
            //    throw new ApplicationException("El codigo del motivo debe ser numerico");

            Datos.MotivoAtencionDatos datos = new Datos.MotivoAtencionDatos();

            if (datos.SeleccionarporId(motivo.IdMotivo) == null)
            {
                datos.Insertar(motivo);
            }
            else
            {
                datos.Actualizar(motivo);
            }
        }
예제 #2
0
 public MotivoAtencion SeleccionarPorId(int numeroMotivo)
 {
     Datos.MotivoAtencionDatos datos = new Datos.MotivoAtencionDatos();
     return(datos.SeleccionarporId(numeroMotivo));
 }
예제 #3
0
 public List <MotivoAtencion> SeleccionarTodas()
 {
     Datos.MotivoAtencionDatos datos = new Datos.MotivoAtencionDatos();
     return(datos.SeleccionarTodos());
 }