private void busquedaDeValores()
        {
            Dictionary <String, String> parametrosDeBusqueda = new Dictionary <string, string>();

            if (TXTnombre.Text != "")
            {
                parametrosDeBusqueda.Add("chofer_nombre", TXTnombre.Text);
            }
            if (TXTapellido.Text != "")
            {
                parametrosDeBusqueda.Add("chofer_apellido", TXTapellido.Text);
            }
            if (TXTdni.Text != "")
            {
                parametrosDeBusqueda.Add("chofer_dni", TXTdni.Text);
            }
            if (CHKsoloActivos.Checked)
            {
                parametrosDeBusqueda.Add("chofer_estado", "Activo");
            }

            List <Chofer> choferes = Chofer.buscar(parametrosDeBusqueda);

            construccionDeGridView(choferes);
        }
Esempio n. 2
0
        private void FRMAutomovil_Load(object sender, EventArgs e)
        {
            this.CMBestado.Items.Add("Activo");
            this.CMBestado.Items.Add("Inactivo");
            if (!formularioPrecargado)
            {
                this.CMBestado.Text = "Activo"; BTNeliminar.Visible = false;
            }
            ;

            Dictionary <String, String> searchAll = new Dictionary <string, string>();

            marcas   = Marca.buscar(searchAll);
            turnos   = Turno.buscar(searchAll);
            choferes = Chofer.buscar(searchAll);

            //---Atributos que mostramos en los combos---
            marcas.ForEach(marca => CMBmarca.Items.Add(marca.Nombre));

            turnos.ForEach(turno => CMBturno.Items.Add(turno.Descripcion));

            choferes.ForEach(chofer => CMBChofer.Items.Add(chofer.Nombre));

            if (formularioPrecargado)
            {
                this.TXTpatente.Text = patente;
                this.CMBmarca.Text   = marcas.Find(marca => marca.IdMarca == idmarca).Nombre;
                this.TXTmodelo.Text  = idmodelo.ToString();
                this.CMBturno.Text   = turnos.Find(turno => turno.IdTurno == idturno).Descripcion;
                this.CMBestado.Text  = estado;
                this.CMBChofer.Text  = choferes.Find(chofer => chofer.Dni == idChofer).Nombre;
            }
        }
Esempio n. 3
0
        private void FRMrendicion_Load(object sender, EventArgs e)
        {
            DTEfecha.Value = Utils.appDate;

            Dictionary <String, String> searchAllChoferes = new Dictionary <string, string>();
            Dictionary <String, String> searchAllTurnos   = new Dictionary <string, string>();

            searchAllChoferes.Add("chofer_estado", "Activo");
            searchAllTurnos.Add("turno_estado", "Activo");

            choferes = Chofer.buscar(searchAllChoferes);
            turnos   = Turno.buscar(searchAllTurnos);

            //---Atributos que mostramos en los combos---
            choferes.ForEach(chofer => CMBchofer.Items.Add(chofer.Nombre + ", " + chofer.Apellido));
            turnos.ForEach(turno => CMBturno.Items.Add(turno.Descripcion));
        }
        private void FRMbuscarVehiculo_Load(object sender, EventArgs e)
        {
            Dictionary <String, String> searchAllMarcas = new Dictionary <string, string>();

            marcas = Marca.buscar(searchAllMarcas);
            // turnos = Turno.buscar(searchAll);

            Dictionary <String, String> searchAllChoferes = new Dictionary <string, string>();

            searchAllChoferes.Add("chofer_estado", "Activo");
            choferes = Chofer.buscar(searchAllChoferes);

            //---Atributos que mostramos en los combos---
            marcas.ForEach(marca => CMBmarca.Items.Add(marca.Nombre));

            // turnos.ForEach(turno => CMBturno.Items.Add(turno.Descripcion));

            choferes.ForEach(chofer => CMBChofer.Items.Add(chofer.Nombre));


            //asociacion de datagrid con el evento de clic en boton
            dataGridView1.CellClick += dataGridView1_CellClick;
        }
Esempio n. 5
0
        private void FRMregistroViaje_Load(object sender, EventArgs e)
        {
            dteFechaInicio.CustomFormat = "dd/MM/yyyy HH:mm:ss";
            dtpFechaFin.CustomFormat    = "dd/MM/yyyy HH:mm:ss";

            dteFechaInicio.Value = Utils.appDate;
            dtpFechaFin.Value    = Utils.appDate;

            Dictionary <String, String> searchAllClientes = new Dictionary <string, string>();
            Dictionary <String, String> searchAllChoferes = new Dictionary <string, string>();
            Dictionary <String, String> searchAllTurnos   = new Dictionary <string, string>();

            searchAllClientes.Add("cliente_estado", "Activo");
            searchAllChoferes.Add("chofer_estado", "Activo");
            searchAllTurnos.Add("turno_estado", "Activo");
            clientes = Cliente.buscar(searchAllClientes);
            choferes = Chofer.buscar(searchAllChoferes);
            turnos   = Turno.buscar(searchAllTurnos);

            //---Atributos que mostramos en los combos---
            clientes.ForEach(cliente => cmbCliente.Items.Add(cliente.Nombre + ", " + cliente.Apellido));
            choferes.ForEach(chofer => cmbChofer.Items.Add(chofer.Nombre + ", " + chofer.Apellido));
            turnos.ForEach(turno => cmbTurno.Items.Add(turno.Descripcion));
        }