Exemple #1
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (DroitDao.findDroit(administrateur.Numero, "Bus", "Ajouter"))
     {
         AddBusForm abf = new AddBusForm();
         abf.ShowDialog();
     }
     else
     {
         MessageBox.Show("Vous n\'avez pas ce droit");
     }
 }
Exemple #2
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();
                }
            }
        }
Exemple #3
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");
            }
        }