/// <summary> /// Deprecated Method for adding a new object to the EventStatuses EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToEventStatuses(EventStatus eventStatus) { base.AddObject("EventStatuses", eventStatus); }
/// <summary> /// Create a new EventStatus object. /// </summary> /// <param name="id">Initial value of the ID property.</param> /// <param name="name">Initial value of the Name property.</param> /// <param name="preferredName">Initial value of the PreferredName property.</param> /// <param name="colour">Initial value of the Colour property.</param> /// <param name="isEnabled">Initial value of the IsEnabled property.</param> public static EventStatus CreateEventStatus(global::System.Guid id, global::System.String name, global::System.String preferredName, global::System.String colour, global::System.Boolean isEnabled) { EventStatus eventStatus = new EventStatus(); eventStatus.ID = id; eventStatus.Name = name; eventStatus.PreferredName = preferredName; eventStatus.Colour = colour; eventStatus.IsEnabled = isEnabled; return eventStatus; }
public EventModel(Event @event, bool isFromReports = false, RoundAgeReportFilter filterValue = RoundAgeReportFilter.None, bool isActualEvent = true) { _event = @event; _eventType = _event.EventType; _eventStatus = _event.EventStatus; EventUpdates = new ObservableCollection<EventUpdate>(); EventItems = new ObservableCollection<EventItemModel>(); EventNotes = new ObservableCollection<EventNoteModel>(); EventCharges = new ObservableCollection<EventChargeModel>(); EventItemsWithNotes = new ObservableCollection<EventItemModel>(); EventContacts = new ObservableCollection<EventContact>(); Correspondences = new ObservableCollection<CorrespondenceModel>(); Reports = new ObservableCollection<ReportModel>(); EventReminders = new ObservableCollection<EventReminderModel>(); if (isFromReports) { EventPayments = new ObservableCollection<EventPaymentModel>(_event.EventPayments.Select(x => new EventPaymentModel(x))); EventCaterings = new List<EventCateringModel>(_event.EventCaterings.Select(x => new EventCateringModel(x))); EventGolfs = new List<EventGolfModel>(_event.EventGolfs.Where(eventGolf => !eventGolf.IsLinked).Select(x => new EventGolfModel(x))); EventRooms = new List<EventRoomModel>(_event.EventRooms.Select(x => new EventRoomModel(x))); EventInvoices = new List<EventInvoiceModel>(_event.EventInvoices.Select(x => new EventInvoiceModel(x))); EventBookedProducts = new List<EventBookedProductModel>(_event.EventBookedProducts.Select(x => new EventBookedProductModel(x))); EventNotes = new ObservableCollection<EventNoteModel>(_event.EventNotes.Select(x => new EventNoteModel(x))); SetEventPriceForReports(filterValue); UpdatePaymentDetails(); Days = DateTime.Now - Event.Date; } else { EventPayments = new ObservableCollection<EventPaymentModel>(); EventCaterings = new List<EventCateringModel>(); EventRooms = new List<EventRoomModel>(); EventGolfs = new List<EventGolfModel>(); EventInvoices = new List<EventInvoiceModel>(); EventBookedProducts = new List<EventBookedProductModel>(); } Documents = new List<Document>(); if (_event.Contact != null) PrimaryContact = new ContactModel(_event.Contact); LoadedTime = DateTime.Now; RefreshChanges(); IsActualEvent = isActualEvent; IsGroupDateVisible = true; }
private async void AddEventStatusCommandExecuted() { var status = new EventStatus { ID = Guid.NewGuid(), Name = "New Event Status", Colour = "#808080", PreferredName = "" }; _adminDataUnit.EventStatusesRepository.Add(status); await _adminDataUnit.SaveChanges(); var statusModel = new EventStatusModel(status); LoadEventStatusOptions(statusModel); EventStatuses.Add(statusModel); SelectedObject = statusModel; }
public EventStatusModel(EventStatus status) { _eventStatus = status; }