Ejemplo n.º 1
0
 /// <summary>
 /// The Güncelle
 /// </summary>
 /// <param name="form">The <see cref="MainWindow"/></param>
 public void Güncelle(MainWindow form)
 {
     if (Geçerli(form))
     {
         try
         {
             var cs = Maas.GetChangeSet().Updates.OfType <AYARLAR>();
             if (!cs.Any())
             {
                 return;
             }
             Maas.SubmitChanges();
             MessageBox.Show("Ayarlar Değişti. Güncelleme Başarılı.", "Ayarlar", MessageBoxButton.OK,
                             MessageBoxImage.Information);
             //Application.Restart();
             //System.Windows.Application.Current.Shutdown();
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
     else
     {
         MessageBox.Show("Kırmızı Alanları Düzelt.", "Ayarlar", MessageBoxButton.OK,
                         MessageBoxImage.Exclamation);
     }
 }