Example #1
0
        private void PopulaTipos(int ntipo, C_tipoequip TipoEq)
        {
            cmbTipo.Items.Clear();
            int ind1 = 0;

            for (ind1 = 1; ind1 <= ntipo; ind1++)
            {
                cmbTipo.Items.Add(TipoEq.tipo[ind1]);
            }
        }
Example #2
0
        // ****************************************************************
        public void GetTiposEqp(ref int ntipo, C_tipoequip objTipoEqp)
        {
            ntipo = 0;
            ConectaBanco();
            com1 = mysqlCon1.CreateCommand();

            com1.CommandText = "select Tipo from tipoequip";
            reader1          = com1.ExecuteReader();

            while (reader1.Read())
            {
                ntipo++;
                objTipoEqp.tipo[ntipo] = reader1["Tipo"].ToString();
            }
            reader1.Close();
            DesconectaBanco();
        }