Exemple #1
0
        private void cmdInsert_Click(object sender, EventArgs e)
        {
            fTopic form = new fTopic(Teacher);

            form.ShowDialog();
            if (form.ValidatedData)
            {
                form.Topic.SaveAsync();
                PopulateTopics();
            }
        }
Exemple #2
0
 private void cmdModify_Click(object sender, EventArgs e)
 {
     if (dblwTopics.SelectedItems.Count > 0)
     {
         Topic  topic = (Topic)dblwTopics.SelectedItems[0].Tag;
         fTopic form  = new fTopic(Teacher, topic);
         form.ShowDialog();
         if (form.ValidatedData)
         {
             form.Topic.SaveAsync();
             PopulateTopics();
         }
     }
     else
     {
         MessageBox.Show("Nessun argomento selezionato", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }