private void SubmitNewEvent() { NewEventSubmitButton.Focus(); if (model.EditingEvent != null) { model.EditingEvent.Name = model.EditingEventName; model.EditingEvent.StartYear = model.EditingEventStartYear; model.EditingEvent.StartMonth = model.EditingEventStartMonth; model.EditingEvent.StartDay = model.EditingEventStartDay; model.EditingEvent.EndYear = model.EditingEventEndYear; model.EditingEvent.EndMonth = model.EditingEventEndMonth; model.EditingEvent.EndDay = model.EditingEventEndDay; model.EditingEvent.Note = model.EditingEventNote; } else { model.AddEvent(new EventViewModel().SetViewModel(new EventModel() { Name = model.EditingEventName, StartYear = model.EditingEventStartYear, StartMonth = model.EditingEventStartMonth, StartDay = model.EditingEventStartDay, EndYear = model.EditingEventEndYear, EndMonth = model.EditingEventEndMonth, EndDay = model.EditingEventEndDay, Note = model.EditingEventNote })); } CloseSideColumn(); }
private void btnSubmitNewEvent_Click(object sender, RoutedEventArgs e) { NewEventSubmitButton.Focus(); if (model.EditingEventName != "") { SubmitNewEvent(); } }