Beispiel #1
0
 public void AddInterest(string interest)
 {
     if (!Interests.Contains(interest))
     {
         Interests.Add(interest);
     }
 }
    public Interests Duplicate()
    {
        var duplicate = new Interests();

        foreach (var kvp in this)
        {
            duplicate.Add(kvp.Key, kvp.Value);
        }
        return(duplicate);
    }
Beispiel #3
0
 public void AddInterested(Event @event)
 {
     if (Interests.Any(ui => ui.EventId == @event.EventId))
     {
         throw new Exception("Event already in 'Interested'");
     }
     else if (Goings.Any(ug => ug.EventId == @event.EventId))
     {
         UserGoing userGoing = Goings.SingleOrDefault(ug => ug.EventId == @event.EventId);
         Goings.Remove(userGoing);
         UserInterested userInterested = new UserInterested(this, @event);
         Interests.Add(userInterested);
     }
     else
     {
         UserInterested userInterested = new UserInterested(this, @event);
         Interests.Add(userInterested);
     }
 }
Beispiel #4
0
 public virtual void AddInterest(Interest interest)
 {
     interest.Users.Add(this);
     Interests.Add(interest);
 }
Beispiel #5
0
        private void checkIntrest()
        {
            if (Appliances)
            {
                Interests.Add("Appliances");
            }

            if (Art)
            {
                Interests.Add("Art");
            }

            if (Books)
            {
                Interests.Add("Books");
            }

            if (Baby)
            {
                Interests.Add("Baby");
            }

            if (Cars)
            {
                Interests.Add("Cars");
            }

            if (Clothing)
            {
                Interests.Add("Clothing");
            }

            if (Electronics)
            {
                Interests.Add("Electronics");
            }

            if (Furniture)
            {
                Interests.Add("Furniture");
            }

            if (Home_Supplies)
            {
                Interests.Add("Home_Supplies");
            }

            if (Health_Beauty)
            {
                Interests.Add("Health_Beauty");
            }

            if (Personal_Care)
            {
                Interests.Add("Personal_Care");
            }

            if (Makeup_Beauty)
            {
                Interests.Add("Makeup_Beauty");
            }

            if (Jewelry)
            {
                Interests.Add("Jewelry");
            }

            if (Toys_Games)
            {
                Interests.Add("Toys_Games");
            }
        }
Beispiel #6
0
 public void AddInterests(string newInterest) => Interests.Add(newInterest);