Esempio n. 1
0
 private void Button18_Click(object sender, EventArgs e)
 {
     try
     {
         Land landToUpdate =
             SelectObjectForm.selectObject("Ändere Land", Data.Laender) as Land;
         if (landToUpdate == null)
         {
             return;
         }
         LandForm.updateLand(Data, landToUpdate);
         Data.SaveChanges();
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.ToString());
     }
 }
Esempio n. 2
0
 private void Button17_Click(object sender, EventArgs e)
 {
     try
     {
         Land newLand =
             LandForm.createLand(Data, "Neues Land anlegen...");
         if (newLand == null)
         {
             return;
         }
         Data.Laender.Add(newLand);
         Data.SaveChanges();
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.ToString());
     }
 }