Example #1
0
        public string TodaysEvents()
        {
            var           events  = new ServiceProviders().GetTodaysEvents();
            int           no      = 1;
            StringBuilder builder = new StringBuilder(DateTime.Now.Date.ToShortDateString() + " Events©");

            foreach (var eevent in events)
            {
                builder.Append(no.ToString() + ":" + eevent.Title + " At " + eevent.ServiceProvider.OrganizationName + "©");
                no++;
            }
            return(builder.ToString());
        }
Example #2
0
        public string TodaysEventsAt(int serviceProviderId)
        {
            var events = new ServiceProviders().GetUpcomingEventsAt(serviceProviderId);
            var serviceProviderName =
                context.ServiceProvider.FirstOrDefault(s => s.Id == serviceProviderId).OrganizationName;
            var builder = new StringBuilder("Upcoming events at " + serviceProviderName + "©");
            int no      = 1;

            foreach (var @event in events)
            {
                builder.Append(no.ToString(CultureInfo.InvariantCulture) + ":" + @event.Title + "-" + @event.Details + "©");
                no++;
            }
            return(builder.ToString());
        }