示例#1
0
        private void frmAltaCrucero_Load(object sender, EventArgs e)
        {
            debugger = new AbmRecorrido.Debugger();
            //debugger.Show();
            abm = new Crucero();
            DataTable dtMarcas = abm.mostrarMarcas();

            llenarCB(cBoxMarca, dtMarcas, "Marca");

            DataTable dtModelos = abm.mostrarModelos();

            llenarCB(cBoxModelo, dtModelos, "Modelo");
            cBoxMarca.Enabled  = false;
            cBoxModelo.Enabled = false;

            dateTimePicker1.Format       = DateTimePickerFormat.Custom;
            dateTimePicker1.CustomFormat = "dd-MM-yyyy hh:mm:ss";

            dtCabinas = abm.mostrarTipoCabina();

            foreach (DataRow row in dtCabinas.Rows)
            {
                AddItem(row["Cabina"].ToString());
            }
            superTabla.Enabled = false;
            llblAnterior.Hide();
            lblCodigoAlerta.Hide();

            cBoxMarca.DropDownStyle  = ComboBoxStyle.DropDownList;
            cBoxModelo.DropDownStyle = ComboBoxStyle.DropDownList;
        }
        private void frmModificarCruceroSeleccionado_Load(object sender, EventArgs e)
        {
            this.CenterToScreen();
            DataTable dtMarcas = abm.mostrarMarcas();

            llenarCB(cBoxMarca, dtMarcas, "Marca");
            cBoxMarca.DropDownStyle = ComboBoxStyle.DropDownList;
            cBoxMarca.SelectedItem  = marca;

            DataTable dtModelos = abm.mostrarModelos();

            llenarCB(cBoxModelo, dtModelos, "Modelo");
            cBoxModelo.DropDownStyle = ComboBoxStyle.DropDownList;
            cBoxModelo.SelectedItem  = modelo;
        }