private void AddEventComponentsToTodayPanel()
        {
            List <Event> events = Event.Enumerate();

            if (events.Count == 0)
            {
                NoEventsAvailable eventComponent = new NoEventsAvailable();
                flowLayoutPanelToday.Controls.Add(eventComponent);
            }
            else
            {
                foreach (Event ev in events)
                {
                    DateTime       startDate      = Convert.ToDateTime(ev.StartsAt);
                    var            date           = startDate.Date;
                    var            dateNow        = DateTime.Now.Date;
                    EventComponent eventComponent = new EventComponent();
                    eventComponent.SetAllNeededProperties(ev.Id, ev.Creator, Server.CurrentSession, ev.Title, ev.Description, ev.Kind, ev.StartsAt, ev.FinishesAt);
                    eventComponent.SetEvent(ev);
                    if (date == dateNow)
                    {
                        flowLayoutPanelToday.Controls.Add(eventComponent);
                    }
                    else
                    {
                        flowLayoutPanelUpcoming.Controls.Add(eventComponent);
                    }
                }
            }
        }
        private void AddEventComponentAddParticipantToCreatedEvents()
        {
            List <Event> events = Event.Enumerate();

            if (events.Count == 0)
            {
                NoEventsAvailable eventComponent = new NoEventsAvailable();
                CreatedEventsFllpnl.Controls.Add(eventComponent);
            }
            else
            {
                foreach (Event ev in events)
                {
                    EventComponentAddParticipant eventComponent = new EventComponentAddParticipant();
                    eventComponent.SetAllNeededProperties(ev.Id, ev.Creator, Server.CurrentSession, ev.Title, ev.Description, ev.Type, ev.StartsAt, ev.FinishesAt);
                    eventComponent.SetEvent(ev);
                    if (eventComponent.Creator.Id == eventComponent.Session.Info.Id)
                    {
                        CreatedEventsFllpnl.Controls.Add(eventComponent);
                    }
                }
            }
        }