Esempio n. 1
0
 public bool consularSiExiste(Entidades.Medicamento med)
 {
     try
     {
         Datos.MedicamentoDB mdb = new Datos.MedicamentoDB();
         if (mdb.consultarSiExiste(med) == true)
         {
             return(true);
         }
         return(false);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Esempio n. 2
0
 public bool agregarMedicamento(Entidades.Medicamento m)
 {
     try
     {
         Datos.MedicamentoDB mdb = new Datos.MedicamentoDB();
         if (mdb.AgregarMed(m))
         {
             return(true);
         }
         return(false);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Esempio n. 3
0
 public List <Entidades.Medicamento> listarTodos()
 {
     try
     {
         Datos.MedicamentoDB mdb = new Datos.MedicamentoDB();
         if (mdb.obtenerPresTodas() != null)
         {
             return(mdb.obtenerPresTodas());
         }
         else
         {
             return(null);
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 4
0
 public Entidades.Medicamento obtenerMedicamento(decimal idMed)
 {
     try
     {
         Datos.MedicamentoDB   mdb = new Datos.MedicamentoDB();
         Entidades.Medicamento m   = new Entidades.Medicamento();
         m = mdb.obtenerMedicamento(idMed);
         if (m != null)
         {
             return(m);
         }
         else
         {
             return(null);
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }