public LocalEditWindowViewModel(LocalsTabViewModel localTabViewModel, LocalEditWindow localEditWindow,
     Local local)
     : base(localTabViewModel, localEditWindow, local)
 {
     using (var con = new BaudiDbContext())
     {
         BuildingsList = con.Buildings.ToList();
         if (Update)
         {
             Local = con.Locals.Find(local.NotificationTargetID);
             SelectedBuilding = Local.Building;
         }
         else
         {
             Local = new Local();
         }
     }
 }
Exemple #2
0
 /// <summary>
 /// Edit action
 /// </summary>
 public override void Edit()
 {
     var localEditWindow = new LocalEditWindow(this, SelectedLocal);
     localEditWindow.Show();
 }
Exemple #3
0
 /// <summary>
 /// Add action
 /// </summary>
 public override void Add()
 {
     var localEditWindow = new LocalEditWindow(this, null);
     localEditWindow.Show();
 }