/// <summary> /// Call this constructor when you want to create a new Appointment /// </summary> public AppointmentEdit() { InitializeComponent(); _viewModel = new ViewModelAppointmentEdit(); addToolbarItems(); bindData(); DeleteLayout.IsVisible = false; }
/// <summary> /// Call this constructor when you want to edit an existing Appointment /// </summary> /// <param name="Appointment">The appointment to edit</param> public AppointmentEdit(Appointment Appointment) { InitializeComponent(); _viewModel = new ViewModelAppointmentEdit(Appointment); addToolbarItems(); bindData(); }
/// <summary> /// Call this constructor when you come from a pushed message /// </summary> /// <param name="anAppointmentID"></param> public AppointmentEdit(Guid anAppointmentID) { InitializeComponent(); if (ViewModelOverview.Appointments == null) { new ViewModelOverview(); } Appointment appointment = ViewModelOverview.GetAppointment(anAppointmentID); _viewModel = new ViewModelAppointmentEdit(appointment); addToolbarItems(); bindData(); }