Example #1
0
 private void BtnSupCat_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show(alerteSuppressionCategorie, "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         Categorie.Delete(Categorie.Charge(int.Parse(tvCategorie.SelectedNode.Name, System.Globalization.CultureInfo.CurrentCulture)));
         ChargeCombo();
     }
 }
Example #2
0
 public bool DeleteCategorie(Categorie model)
 {
     try
     {
         model.Delete();
         return(true);
     }
     catch (Exception ex)
     {
         string error = "";
         CommonMethods.getError(ex, ref error);
         throw new Exception(CommonMethods.ConcatenateErrorIN_DB(DB_Exception.res_15, error, CommonMethods.GetCurrentMethodName()));
     }
 }