PageRenderTime 46ms CodeModel.GetById 7ms RepoModel.GetById 1ms app.codeStats 0ms

/src/EntityConnector/MainWindow.xaml.cs

https://bitbucket.org/mbrenn/entityconnector
C# | 47 lines | 39 code | 5 blank | 3 comment | 0 complexity | f89eb226f8ba7a1f425e2f4d8aeb0be6 MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Data;
  8. using System.Windows.Documents;
  9. using System.Windows.Input;
  10. using System.Windows.Media;
  11. using System.Windows.Media.Imaging;
  12. using System.Windows.Navigation;
  13. using System.Windows.Shapes;
  14. using BurnSystems.EntityConnector;
  15. namespace EntityConnector
  16. {
  17. /// <summary>
  18. /// Interaktionslogik für MainWindow.xaml
  19. /// </summary>
  20. public partial class MainWindow : Window
  21. {
  22. public MainWindow()
  23. {
  24. InitializeComponent();
  25. }
  26. private void Button_Click(object sender, RoutedEventArgs e)
  27. {
  28. var pool = new EntityPool("TestPool", "Server=.\\SQLEXPRESS;Database=mb_entity;Trusted_Connection=True;");
  29. var entity = new Entity();
  30. entity["Vorname"] = "Martin";
  31. entity["Nachname"] = "Brenn";
  32. entity["Alter"] = 30.ToString();
  33. pool.Add(entity);
  34. }
  35. private void OpenPool_Click(object sender, RoutedEventArgs e)
  36. {
  37. var dlg = new ShowPool();
  38. dlg.Owner = this;
  39. dlg.Show();
  40. }
  41. }
  42. }