Esempio n. 1
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();
                }
            }
        }
Esempio n. 2
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");
            }
        }