コード例 #1
0
ファイル: CarteForm.cs プロジェクト: phantom1999/busbaf
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (DroitDao.findDroit(administrateur.Numero, "Carte", "Ajouter"))
     {
         AddCarteForm acf = new AddCarteForm();
         acf.ShowDialog();
     }
     else
     {
         MessageBox.Show("Vous n\'avez pas ce droit");
     }
 }
コード例 #2
0
ファイル: CarteForm.cs プロジェクト: phantom1999/busbaf
        private void dgCartes_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            for (int i = 0; i < dgCartes.RowCount; i++)
            {
                if ((bool)dgCartes.Rows[i].Selected)
                {
                    AddCarteForm adf   = new AddCarteForm();
                    Carte        carte = CarteDao.findByNumero(dgCartes.Rows[i].Cells[0].Value.ToString());
                    adf.Model2Form(carte);

                    adf.ShowDialog();
                }
            }
        }
コード例 #3
0
ファイル: CarteForm.cs プロジェクト: phantom1999/busbaf
        private void btnChange_Click(object sender, EventArgs e)
        {
            if (DroitDao.findDroit(administrateur.Numero, "Carte", "Modifier"))
            {
                for (int i = 0; i < dgCartes.RowCount; i++)
                {
                    if ((bool)dgCartes.Rows[i].Selected)
                    {
                        AddCarteForm adf   = new AddCarteForm();
                        Carte        carte = CarteDao.findByNumero(dgCartes.Rows[i].Cells[0].Value.ToString());
                        adf.Model2Form(carte);

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