SHARE
TWEET

Event

a guest Nov 22nd, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace FirstTry
  8. {
  9.     class Event
  10.     {
  11.         //event data
  12.         private int Id;
  13.         private String Name;
  14.         private User Creator;
  15.         private String Description;
  16.         private String LocationAddress;
  17.  
  18.         //dates
  19.         private DateTime StartingDate;
  20.         private DateTime EndingDate;
  21.         private DateTime StartingHour;
  22.         private DateTime EndingHour;
  23.  
  24.         //participants
  25.         private int MinParticipants;
  26.         private int MaxParticipants;
  27.         private List<User> ParticipantsList;
  28.  
  29.         public Event(int Id, String Name, DateTime StartingDate, DateTime EndingDate, DateTime StartingHour,
  30.             DateTime EndingHour, String Description, int MinParticipants,
  31.             int MaxParticipants, String LocationAddress, User Creator)
  32.         {
  33.             this.Id = Id;
  34.             this.Name = Name;
  35.             this.StartingDate = StartingDate;
  36.             this.EndingDate = EndingDate;
  37.             this.StartingHour = StartingHour;
  38.             this.EndingHour = EndingHour;
  39.             this.Description = Description;
  40.             this.MinParticipants = MinParticipants;
  41.             this.MaxParticipants = MaxParticipants;
  42.             this.LocationAddress = LocationAddress;
  43.             this.Creator = Creator;
  44.             ParticipantsList = new List<User>();
  45.         }
  46.  
  47.         public void RetrieveAllEvents()
  48.         {
  49.             //TODO add
  50.         }
  51.  
  52.         public void RetrieveCreatedEvents()
  53.         {
  54.             //TODO add
  55.         }
  56.  
  57.         public void RetrieveParticipationEvents()
  58.         {
  59.             //TODO add
  60.         }
  61.  
  62.         public void AddParticipant(User participant)
  63.         {
  64.             ParticipantsList.Add(participant);
  65.             participant.GetParticipationEventList().Add(this);
  66.         }
  67.  
  68.         public String GetName()
  69.         {
  70.             return Name;
  71.         }
  72.  
  73.         public User GetCreator()
  74.         {
  75.             return Creator;
  76.         }
  77.  
  78.         public String GetDescription()
  79.         {
  80.         return Description;
  81.         }
  82.  
  83.         public String GetLocationAddress()
  84.         {
  85.             return LocationAddress;
  86.         }
  87.  
  88.         public DateTime GetStartingDate()
  89.         {
  90.             return StartingDate;
  91.         }
  92.  
  93.         public DateTime GetEndingDate()
  94.         {
  95.             return EndingDate;
  96.         }
  97.  
  98.         public DateTime GetStartingHour()
  99.         {
  100.             return StartingHour;
  101.         }
  102.  
  103.         public DateTime GetEndingHour()
  104.         {
  105.             return EndingHour;
  106.         }
  107.  
  108.         public int GetMinParticipants()
  109.         {
  110.             return MinParticipants;
  111.         }
  112.  
  113.         public int GetMaxParticipants()
  114.         {
  115.             return MaxParticipants;
  116.         }
  117.  
  118.         public List<User> GetParticipantsList()
  119.         {
  120.             return ParticipantsList;
  121.         }
  122.  
  123.     }
  124. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top