Example #1
0
 private void tbCod_method_Validating(object sender, CancelEventArgs e)
 {
     try
     {
         List<CTemplate_method> lstTemplateMethod = new Methods().GetAllLastVersionMethods();
         if (lstTemplateMethod.Exists(c => c.Cod_template_method == tbCod_method.Text.Trim()))
             e.Cancel = true;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }