Esempio n. 1
0
 private void btnmodcategory_Click(object sender, EventArgs e)
 {
     Forms.Add_edit_category addedit = new Forms.Add_edit_category(this);
     if (selection() == null)
     {
         //affichage de l'informations par client
         for (int i = 0; i < gridcategory.Rows.Count; i++)
         {
             if ((bool)gridcategory.Rows[i].Cells[0].Value == true)
             {
                 addedit.ID_selected  = (int)gridcategory.Rows[i].Cells[1].Value;
                 addedit.txtnomc.Text = gridcategory.Rows[i].Cells[2].Value.ToString();
             }
         }
         addedit.titreacat.Text = "Modifier client";
         addedit.ShowDialog();
     }
     else
     {
         MessageBox.Show(selection(), "modification", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Esempio n. 2
0
 private void btnaddcategory_Click(object sender, EventArgs e)
 {
     Forms.Add_edit_category frmanimal = new Forms.Add_edit_category(this);
     frmanimal.ShowDialog();
 }