private void cbBus_SelectedValueChanged(object sender, EventArgs e) { Bus bus = BusDao.findByNumero(cbBus.Text); txtMarqBus.Text = bus.Marque; txtCartBus.Text = bus.CarteGrise; }
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); }
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); }
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(); } } }
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"); } }