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); } }
public MotivoAtencion SeleccionarPorId(int numeroMotivo) { Datos.MotivoAtencionDatos datos = new Datos.MotivoAtencionDatos(); return(datos.SeleccionarporId(numeroMotivo)); }
public List <MotivoAtencion> SeleccionarTodas() { Datos.MotivoAtencionDatos datos = new Datos.MotivoAtencionDatos(); return(datos.SeleccionarTodos()); }