public static EventParticipant AddEventParticipant(Event evt, Participant participant) { var eventParticipant = EventParticipant.NewEventParticipant(); eventParticipant.Event = evt; eventParticipant.Participant = participant; return eventParticipant; }
/// <summary> /// Takes event and participant objects and creates a new EventParticipantType and returns it. /// </summary> /// <param name="evt"></param> /// <param name="participant"></param> /// <returns></returns> public static EventParticipantType AddParticipantType(Event evt, Participant participant) { var eventParticipantType = EventParticipantType.NewEventParticipantType(); eventParticipantType.Event = evt; eventParticipantType.ParticipantID = participant.ParticipantID; eventParticipantType.EventParticipantTypeName = participant.ParticipantGroup; return eventParticipantType; }
/// <summary> /// Create a new Participant object. /// </summary> /// <param name="participantID">Initial value of the ParticipantID property.</param> /// <param name="participantLastName">Initial value of the ParticipantLastName property.</param> /// <param name="participantFirstName">Initial value of the ParticipantFirstName property.</param> /// <param name="participantGroup">Initial value of the ParticipantGroup property.</param> /// <param name="participantStatus">Initial value of the ParticipantStatus property.</param> /// <param name="participantStatusID">Initial value of the ParticipantStatusID property.</param> /// <param name="createdOn">Initial value of the CreatedOn property.</param> /// <param name="modifiedOn">Initial value of the ModifiedOn property.</param> /// <param name="stamp">Initial value of the Stamp property.</param> /// <param name="active">Initial value of the Active property.</param> /// <param name="createdBy">Initial value of the CreatedBy property.</param> /// <param name="modifiedBy">Initial value of the ModifiedBy property.</param> public static Participant CreateParticipant(global::System.Int32 participantID, global::System.String participantLastName, global::System.String participantFirstName, global::System.String participantGroup, global::System.Int32 participantStatus, global::System.Int32 participantStatusID, global::System.DateTime createdOn, global::System.DateTime modifiedOn, global::System.Byte[] stamp, global::System.Boolean active, global::System.Int32 createdBy, global::System.Int32 modifiedBy) { Participant participant = new Participant(); participant.ParticipantID = participantID; participant.ParticipantLastName = participantLastName; participant.ParticipantFirstName = participantFirstName; participant.ParticipantGroup = participantGroup; participant.ParticipantStatus = participantStatus; participant.ParticipantStatusID = participantStatusID; participant.CreatedOn = createdOn; participant.ModifiedOn = modifiedOn; participant.Stamp = stamp; participant.Active = active; participant.CreatedBy = createdBy; participant.ModifiedBy = modifiedBy; return participant; }
/// <summary> /// Deprecated Method for adding a new object to the Participants EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToParticipants(Participant participant) { base.AddObject("Participants", participant); }
public static Participant NewParticipant() { Participant newObject = new Participant(); BsoArchiveEntities.Current.AddToParticipants(newObject); BsoArchiveEntities.SetDefaultValue(newObject); return newObject; }
/// <summary> /// Add an EventParticipantType /// </summary> /// <param name="participant"></param> /// <remarks>Check if an event participant type exists. If yes return it, otherwise create a /// new event participant type object and return it.</remarks> /// <returns></returns> public EventParticipantType AddEventParticipantType(Participant participant) { var eventParticipantType = this.EventParticipantTypes.FirstOrDefault(ept => ept.ParticipantID == participant.ParticipantID); if (eventParticipantType != null) return eventParticipantType; eventParticipantType = EventParticipantType.AddParticipantType(this, participant); return eventParticipantType; }
/// <summary> /// Add and event Participant /// </summary> /// <param name="participant"></param> /// <remarks> /// Check if the event participant exists. If it does then return the event participant object, otherwise /// create a new event participant object and return it. /// </remarks> /// <returns></returns> public EventParticipant AddEventParticipant(Participant participant) { var eventParticipant = this.EventParticipants.FirstOrDefault(ep => ep.ParticipantID == participant.ParticipantID); if (eventParticipant != null) return eventParticipant; eventParticipant = EventParticipant.AddEventParticipant(this, participant); return eventParticipant; }
private static void SetParticipantData(int participantID, Participant participant, string participantFirstName, string participantLastName, string participantGroup, int participantStatus, int participantStatusID) { participant.ParticipantID = participantID; participant.ParticipantFirstName = participantFirstName; participant.ParticipantLastName = participantLastName; participant.ParticipantGroup = participantGroup; participant.ParticipantStatus = participantStatus; participant.ParticipantStatusID = participantStatusID; }