Exemplo n.º 1
0
 public PlantelesES BuscarPlanteles(string plantel)
 {
     escuelaESController = new ControladorEscuelasES();
     planteles           = new PlantelesES();
     planteles           = escuelaESController.BuscarPlantel(plantel);
     return(planteles);
 }
Exemplo n.º 2
0
 public PlantelesES BuscarPlantelesId(string carrera)
 {
     escuelaESController = new ControladorEscuelasES();
     planteles           = new PlantelesES();
     planteles           = escuelaESController.BuscarPlantelCarrera(carrera);
     return(planteles);
 }
Exemplo n.º 3
0
 public PlantelesES BuscarPlantelesMunicipio(string municipio)
 {
     escuelaESController = new ControladorEscuelasES();
     planteles           = new PlantelesES();
     planteles           = escuelaESController.BuscarPlantelMunicipio(municipio);
     return(planteles);
 }
 public PlantelesES BuscarPlantel(string plantel)
 {
     try
     {
         var conn = conexion.Builder;
         con = new MySqlConnection(conn.ToString());
         MySqlCommand cmd = con.CreateCommand();
         //Queda pendiente la consulta en vista
         cmd.CommandText = "select * from planteleses where NombrePlantelES = @plantel";
         cmd.Parameters.AddWithValue("@plantel", plantel);
         con.Open();
         MySqlDataReader reader = cmd.ExecuteReader();
         while (reader.Read())
         {
             planteles = new PlantelesES()
             {
                 idPlantelES         = Convert.ToInt16(reader["idPlantelEs"].ToString()),
                 ClavePlantel        = reader["ClavePlantel"].ToString(),
                 NombrePlantelES     = reader["NombrePlantelES"].ToString(),
                 Subsistema          = reader["Subsistema"].ToString(),
                 Sostenimiento       = reader["Sostenimiento"].ToString(),
                 Municipio           = Convert.ToInt32(reader["idMunicipio"].ToString()),
                 Activo              = reader["Activo"].ToString(),
                 ClaveInstitucion    = reader["ClaveInstitucion"].ToString(),
                 NombreInstitucionES = reader["NombreInstitucionEs"].ToString(),
                 OPD           = reader["OPD"].ToString(),
                 NivelAgrupado = reader["NivelAgrupado"].ToString()
             };
         }
         return(planteles);
     }
     catch (MySqlException ex)
     {
         Console.WriteLine("Error en la consulta escuela: " + ex.Message);
         return(null);
     }
     finally
     {
         con.Close();
     }
 }
 public PlantelesES BuscarPlantel(string plantel)
 {
     plantelES = new PlantelesES();
     plantelES = escuelaESDAO.BuscarPlantel(plantel);
     return(plantelES);
 }
 public PlantelesES BuscarPlantelCarrera(string carrera)
 {
     plantelES = new PlantelesES();
     plantelES = escuelaESDAO.BuscarPlantelId(carrerasDAO.BuscarPlantelesId(carrera));
     return(plantelES);
 }
 public PlantelesES BuscarPlantelMunicipio(string municipio)
 {
     plantelES = new PlantelesES();
     plantelES = escuelaESDAO.BuscarPlantelMunicipio(municipiosDAO.BuscarMunicipio(municipio));
     return(plantelES);
 }