Exemple #1
0
        private void frmSeleccionVehiculo_Load(object sender, EventArgs e)
        {
            cbFiltroV.SelectedIndex = 0;
            this.FormBorderStyle    = FormBorderStyle.FixedSingle;
            this.MaximizeBox        = false;
            dgvVehiculo.ReadOnly    = true;
            dgvVehiculo.DataSource  = misVehiculos.listarAlta();
            dgvVehiculo.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;

            if (dgvVehiculo.Rows.Count > 0)
            {
                dgvVehiculo.Columns[0].Visible  = false; //ID
                dgvVehiculo.Columns[1].Visible  = false; //ID dueño
                dgvVehiculo.Columns[7].Visible  = false;
                dgvVehiculo.Columns[8].Visible  = false;
                dgvVehiculo.Columns[9].Visible  = false;
                dgvVehiculo.Columns[10].Visible = false;
                dgvVehiculo.Columns[11].Visible = false;

                dgvVehiculo.Columns["Patente"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;

                dgvVehiculo.SelectionMode = DataGridViewSelectionMode.FullRowSelect;

                btnOk.Enabled = filtrado();
            }
            else
            {
                MessageBox.Show("No hay Vehiculos Libres Disponibles");
                this.Close();
            }
        }
Exemple #2
0
        public void actDatos()
        {
            lblAlqActivos.Text = "Alquileres Activos : " + misAlquileres.listarAlta().Count;
            lblAlqTotal.Text   = "Alquileres totales : " + misAlquileres.listar().Count;

            lblVehiculos.Text = "Vehiculos totales : " + misVehiculos.listar().Count;
            lblVehAct.Text    = "Vehiculos activos : " + misVehiculos.listarAlta().Count;

            lblDueños.Text        = "Dueños totales: " + misDueños.listar().Count;
            lblDueñosActivos.Text = "Dueños Activos : " + misDueños.listarAlta().Count;
            //carga fecha
            lblDiaDeHoy.Text     = "Salidas para el dia de Hoy : " + DateTime.Today.ToShortDateString();
            lblDiaDeHoy.Location = new Point(175, 170);
        }