Esempio n. 1
0
        private void btndelete_Click(object sender, EventArgs e)
        {
            I = int.Parse(dgvSuppliers.SelectedRows[0].Cells[0].Value.ToString());
            DialogResult ds = MessageBox.Show("Voules vous vraiment supprimer cette Fournisseur?", "Notification", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (ds == DialogResult.Yes)
            {
                CLASS_SUPPLIERS.SP_SUPPLIERDELETE(I);
                MessageBox.Show("Le fournisseur a été supprimé avec succès.", "Notification", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
        }
Esempio n. 2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            if (txtName.Text == string.Empty)
            {
                MessageBox.Show("Entrez le nom de fournisseur SVP!");
                return;
            }

            CLASS_SUPPLIERS.SP_ADDNEWSUPPLIER(txtName.Text, txtPhone.Text, txtfax.Text, txtemail.Text, txtAdress.Text, txtCounty.Text);
            MessageBox.Show("Fournisseurs a été ajouté avec succès");
            btnNew_Click(null, null);
        }
Esempio n. 3
0
 public Form_GridProductsSuppliers(string check)
 {
     InitializeComponent();
     _check = check;
     if (_check == "Products")
     {
         DataTable dt = CLASS_PRODUCTS.SP_DISPLAYALLPRODUCTS();
         dataGridView1.DataSource = dt;
     }
     else if (_check == "Suppliers")
     {
         DataTable dt = CLASS_SUPPLIERS.SP_SUPPLIERSELECTALL();
         dataGridView1.DataSource = dt;
     }
 }
Esempio n. 4
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     I = int.Parse(dgvSuppliers.SelectedRows[0].Cells[0].Value.ToString());
     CLASS_SUPPLIERS.SP_SUPPLIERUPDATE(I, txtName.Text, txtPhone.Text, txtfax.Text, txtemail.Text, txtAdress.Text, txtCounty.Text);
     MessageBox.Show("Le fournisseur a été mis à jour avec succès.", "Notification", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
 }
Esempio n. 5
0
        private void btnDisplayall_Click(object sender, EventArgs e)
        {
            DataTable dt = CLASS_SUPPLIERS.SP_SUPPLIERSELECTALL();

            dgvSuppliers.DataSource = dt;
        }
Esempio n. 6
0
        private void txtSearch_TextChanged(object sender, EventArgs e)
        {
            DataTable dt = CLASS_SUPPLIERS.SP_SUPPLIERSEARCH(txtSearch.Text);

            dgvSuppliers.DataSource = dt;
        }