Beispiel #1
0
        private void cbBus_SelectedValueChanged(object sender, EventArgs e)
        {
            Bus bus = BusDao.findByNumero(cbBus.Text);

            txtMarqBus.Text = bus.Marque;
            txtCartBus.Text = bus.CarteGrise;
        }
Beispiel #2
0
 public void Form2Model()
 {
     affecter.Numero    = txtNumero.Text;
     affecter.DateDebut = cbDateD.Value;
     affecter.DateFin   = cbDateF.Value;
     affecter.bus       = BusDao.findByNumero(cbBus.Text);
     affecter.ligne     = LigneDao.findByNumero(cbLigne.Text);
 }
Beispiel #3
0
 public void Form2Model()
 {
     attribuer.Numero    = txtNumero.Text;
     attribuer.DateDebut = cbdateD.Value;
     attribuer.DateFin   = cbdateF.Value;
     attribuer.bus       = BusDao.findByNumero(cbBus.Text);
     attribuer.chauffeur = ChauffeurDao.findByNumero(cbChauffeur.Text);
 }
Beispiel #4
0
        private void dgBus_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            for (int i = 0; i < dgBus.RowCount; i++)
            {
                if ((bool)dgBus.Rows[i].Selected)
                {
                    AddBusForm adf = new AddBusForm();
                    Bus        bus = BusDao.findByNumero(dgBus.Rows[i].Cells[0].Value.ToString());
                    adf.LabelTitle.Text = "MODIFICATION BUS";
                    adf.Model2Form(bus);

                    adf.ShowDialog();
                }
            }
        }
Beispiel #5
0
        private void btnChange_Click(object sender, EventArgs e)
        {
            if (DroitDao.findDroit(administrateur.Numero, "Bus", "Modifier"))
            {
                for (int i = 0; i < dgBus.RowCount; i++)
                {
                    if ((bool)dgBus.Rows[i].Selected)
                    {
                        AddBusForm adf = new AddBusForm();
                        Bus        bus = BusDao.findByNumero(dgBus.Rows[i].Cells[0].Value.ToString());
                        adf.LabelTitle.Text = "MODIFICATION BUS";
                        adf.Model2Form(bus);

                        adf.ShowDialog();
                    }
                }
            }
            else
            {
                MessageBox.Show("Vous n\'avez pas ce droit");
            }
        }