예제 #1
0
        public static void CargarCombo(ComboBox comboBox, string clase)
        {
            DataTable dt = new DataTable();

            Type t = clase.GetType();

            if (clase == "Pelicula")
            {
                CargarComboPelicula(comboBox);
            }
            else if (clase == "Descuento")
            {
                dt = Descuento.Consultar();
            }
            else if (clase == "Idioma")
            {
                dt = Idioma.Consultar();
            }
            else if (clase == "Sala")
            {
                dt = Sala.Consultar();
            }
            else if (clase == "TipoSala")
            {
                CargarComboTipoSala(comboBox);
            }
            else
            {
                dt = null;
            }
        }
예제 #2
0
        private void CargarComboTipoDescuento()
        {
            DataTable dt = new DataTable();

            dt = Descuento.Consultar();

            cboTipoDescuento.DisplayMember = "detalle";
            cboTipoDescuento.ValueMember   = "idDescuentos";
            cboTipoDescuento.DataSource    = dt;
        }