Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace FirstTry
- {
- class Event
- {
- //event data
- private int Id;
- private String Name;
- private User Creator;
- private String Description;
- private String LocationAddress;
- //dates
- private DateTime StartingDate;
- private DateTime EndingDate;
- private DateTime StartingHour;
- private DateTime EndingHour;
- //participants
- private int MinParticipants;
- private int MaxParticipants;
- private List<User> ParticipantsList;
- public Event(int Id, String Name, DateTime StartingDate, DateTime EndingDate, DateTime StartingHour,
- DateTime EndingHour, String Description, int MinParticipants,
- int MaxParticipants, String LocationAddress, User Creator)
- {
- this.Id = Id;
- this.Name = Name;
- this.StartingDate = StartingDate;
- this.EndingDate = EndingDate;
- this.StartingHour = StartingHour;
- this.EndingHour = EndingHour;
- this.Description = Description;
- this.MinParticipants = MinParticipants;
- this.MaxParticipants = MaxParticipants;
- this.LocationAddress = LocationAddress;
- this.Creator = Creator;
- ParticipantsList = new List<User>();
- }
- public void RetrieveAllEvents()
- {
- //TODO add
- }
- public void RetrieveCreatedEvents()
- {
- //TODO add
- }
- public void RetrieveParticipationEvents()
- {
- //TODO add
- }
- public void AddParticipant(User participant)
- {
- ParticipantsList.Add(participant);
- participant.GetParticipationEventList().Add(this);
- }
- public String GetName()
- {
- return Name;
- }
- public User GetCreator()
- {
- return Creator;
- }
- public String GetDescription()
- {
- return Description;
- }
- public String GetLocationAddress()
- {
- return LocationAddress;
- }
- public DateTime GetStartingDate()
- {
- return StartingDate;
- }
- public DateTime GetEndingDate()
- {
- return EndingDate;
- }
- public DateTime GetStartingHour()
- {
- return StartingHour;
- }
- public DateTime GetEndingHour()
- {
- return EndingHour;
- }
- public int GetMinParticipants()
- {
- return MinParticipants;
- }
- public int GetMaxParticipants()
- {
- return MaxParticipants;
- }
- public List<User> GetParticipantsList()
- {
- return ParticipantsList;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement