Beispiel #1
0
        public List <EColegios> ListaColegios()
        {
            DColegios        c     = new DColegios();
            List <EColegios> lista = c.ListaColegios();

            return(lista);
        }
Beispiel #2
0
 public void EliminarColegio(EColegios c)
 {
     try
     {
         if (c.ColegioId == 0)
         {
             throw new ArgumentException("Colegio no existe");
         }
         DColegios d = new DColegios();
         d.EliminarColegio(c);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #3
0
 public void ModificarColegio(EColegios c)
 {
     try
     {
         if (c.Colegio == "")
         {
             throw new ArgumentException("Ingrese Nombre del Colegio");
         }
         DColegios d = new DColegios();
         d.ModificarColegio(c);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #4
0
 public void IngresarColegio(EColegios c)
 {
     try
     {
         if (c.Colegio == "")
         {
             throw new ArgumentException("Ingrese Nombre del Colegio");
         }
         List <EColegios> l = ListaColegios().Where(x => x.Colegio == c.Colegio && x.DepartamentoID == c.DepartamentoID).ToList();
         if (l.Count > 0)
         {
             throw new ArgumentException("El Colegio : " + c.Colegio + " ya existe");
         }
         DColegios d = new DColegios();
         d.IngresarColegio(c);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }