Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            DBFournisseur conect = new DBFournisseur();
            String        nom    = textBox2.Text;
            String        ville  = textBox3.Text;
            int           tarif  = Int32.Parse(textBox4.Text);

            conect.Add(nom, ville, tarif);
        }
Esempio n. 2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            DBFournisseur conect = new DBFournisseur();
            Fournisseur   f      = conect.Read(1);

            label1.Text = f.getNom() + " " + f.getVille() + " " + f.getTarif();
            // LOAD -> afficher la table Fournisseur
            //listbox1

            DBFournisseur      abc = new DBFournisseur();
            List <Fournisseur> et  = abc.ReadAll();

            foreach (var item in et)
            {
                listBox1.Items.Add(item.getId() + " " + item.getNom() + " " + item.getVille() + " " + item.getTarif());
            }
        }