예제 #1
0
 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();
         }
     }
 }
예제 #2
0
 /// <summary>
 /// Edit action
 /// </summary>
 public override void Edit()
 {
     var localEditWindow = new LocalEditWindow(this, SelectedLocal);
     localEditWindow.Show();
 }
예제 #3
0
 /// <summary>
 /// Add action
 /// </summary>
 public override void Add()
 {
     var localEditWindow = new LocalEditWindow(this, null);
     localEditWindow.Show();
 }