public RendicionViajes()
        {
            InitializeComponent();
            lblImporteTotal.Hide();
            lblImporteTotalTexto.Hide();
            lblNumeroRendicion.Hide();
            lblNumeroRendicionTexto.Hide();
            lblPrevisualizarImporte.Hide();
            lblPrevisualizarImporteTexto.Hide();
            lblDetalleRendicion.Hide();
            tablaRendicion.Hide();
            tablaPreviaRendicion.Hide();
            lblPrevisualizar.Hide();
            btnConfirmarRendicion.Hide();

            tablaTurnos = SQLTurno.obtenerTodosLosTurnos();

            foreach (DataRow row in tablaTurnos.Rows)
            {
                cmbTurno.Items.Add(row["descripcion"].ToString());
                cmbTurno.SelectedIndex = 0;
            }

            tablaChoferes = SQLChofer.obtenerTodosLosChoferes();

            foreach (DataRow row in tablaChoferes.Rows)
            {
                cmbChoferes.Items.Add(row["nombre"].ToString() + " " + row["apellido"].ToString());
                cmbChoferes.SelectedIndex = 0;
            }
        }
Beispiel #2
0
        private void ListaChoferes_Load(object sender, EventArgs e)
        {
            //Obtener todos los Choferes cuando se carga el formulario
            DataTable Choferes;

            if (modificacion)
            {
                Choferes = SQLChofer.obtenerTodosLosChoferes();
            }
            else
            {
                Choferes = SQLChofer.obtenerTodosLosChoferesHabilitados();
            }
            tablaChoferes.DataSource = Choferes;
            this.tablaChoferes.Columns[0].Visible = false; //usuarioID
            DataGridViewRow clieRow = tablaChoferes.Rows[0];

            choferSeleccionado = new Chofer(clieRow);
        }
Beispiel #3
0
        private void recargar()
        {
            DataTable Choferes;

            if (modificacion)
            {
                Choferes = SQLChofer.obtenerTodosLosChoferes();
            }
            else
            {
                Choferes = SQLChofer.obtenerTodosLosChoferesHabilitados();
            }
            tablaChoferes.DataSource = Choferes;
            this.tablaChoferes.Columns[0].Visible = false; //usuarioID
            DataGridViewRow clieRow = tablaChoferes.Rows[0];

            choferSeleccionado = new Chofer(clieRow);

            txtDNI.Text      = "";
            txtApellido.Text = "";
            txtNombre.Text   = "";
        }