private void Add(EventModel model) { var window = new AddEditEventView { ViewModel = this }; window.Render(model); window.ShowDialog(); }
public void Edit(int id) { var model = EventService.Edit(id); var window = new AddEditEventView { ViewModel = this }; window.Render(model); window.ShowDialog(); }
public static void Show(Event update) { var vm = new AddEditEventViewModel(update); var v = new AddEditEventView(); vm.CloseWindow = v.Close; v.DataContext = vm; v.ShowDialog(); }