コード例 #1
0
 public void Form2Model()
 {
     versement.Numero      = txtNumero.Text;
     versement.Montant     = double.Parse(txtMontant.Text);
     versement.Description = txtDescrip.Text;
     versement.Date        = cbDate.Value;
     versement.carte       = CarteDao.findByNumero(cbNumeroCarte.Text);
     versement.admin       = administrateur;
 }
コード例 #2
0
        private void txtNumero_TextChanged(object sender, EventArgs e)
        {
            Carte cart = CarteDao.findByNumero(txtNumero.Text);

            if (cart != null)
            {
                txtPorteur.Text = cart.Porteur;
                txtSolde.Text   = cart.Solde.ToString();
            }
        }
コード例 #3
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();
                }
            }
        }
コード例 #4
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");
            }
        }