Example #1
0
        public Choices gramaticadocente(string select)
        {
            conexion_base based         = new conexion_base();
            Choices       lista_docente = new Choices();

            try
            {
                based.query.CommandText = select;
                based.conexiondb();
                based.conexion.Open();

                based.query.Connection = based.conexion;
                based.consultar        = based.query.ExecuteReader();
                while (based.consultar.Read())
                {
                    lista_docente.Add(based.consultar.GetString(0));
                }
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.Message);
                //throw;
            }
            finally
            {
                based.conexion.Close();
            }


            return(lista_docente);
        }