Esempio n. 1
0
 /// <summary>
 /// Default Constructor.
 /// Initializes Event Types and Privacy Types
 /// </summary>
 public CreateEventViewModel()
 {
     this.Request      = new CalendarEvent(Identity.Current.CustomerID);
     this.EventTypes   = ExigoDAL.GetCalendarEventTypes();
     this.PrivacyTypes = ExigoDAL.GetCalendarEventPrivacyTypes();
     GetCalendarID();
 }
        /// <summary>
        /// Constructs the View Model.
        /// Initializes Calendars to Exigo.GetCalendars() using the provided CustomerID and includes calendar subscriptions.
        /// Initializes Event Types to Exigo.GetCalendarEventTypes().
        /// Intializes Time Zones to the result of Exigo.GetTimeZones().
        /// Initializes Privacy Types to Exigo.GetCalendarPrivacyTypes();
        /// </summary>
        /// <param name="customerID">The CustomerID to pull Calendars for.</param>
        public CalendarViewModel(int customerID)
        {
            this.Calendars = ExigoDAL.GetCalendars(new GetCalendarsRequest
            {
                CustomerID = customerID,
                IncludeCalendarSubscriptions = true
            });

            this.EventTypes   = ExigoDAL.GetCalendarEventTypes();
            this.PrivacyTypes = ExigoDAL.GetCalendarEventPrivacyTypes();
        }
 /// <summary>
 /// Default Constructor.
 /// Constructs any properties that are objects to avoid Null Reference Exception.
 /// Intializes Time Zones to the result of Exigo.GetTimeZones().
 /// Initializes Privacy Types to Exigo.GetCalendarPrivacyTypes();
 /// </summary>
 public CalendarViewModel()
 {
     this.Calendars    = new List <Calendar>();
     this.EventTypes   = new List <CalendarEventType>();
     this.PrivacyTypes = ExigoDAL.GetCalendarEventPrivacyTypes();
 }