public ProfileDashBoardViewModel(IProfileDashboard profileDashboard, ISchedulerProvider schedulerProvider)
 {
     _profileDashboard = profileDashboard;
     _schedulerProvider = schedulerProvider;
     _messages = new DashboardCollection<Message>(_profileDashboard.Messages.ObserveOn(_schedulerProvider.Dispatcher));
     _pictureAlbums = new DashboardCollection<Album>(_profileDashboard.PictureAlbums.ObserveOn(_schedulerProvider.Dispatcher));
     _calendarEvents = new DashboardCollection<ICalendarEvent>(_profileDashboard.CalendarEvents.ObserveOn(_schedulerProvider.Dispatcher));
 }
Example #2
0
        public static DashboardCollection GetDashBoardPDs(int userID)
        {
            DashboardCollection childDataCollection = null;

            try
            {
                DataTable dataItems = new DataTable();
                dataItems = ExecuteDataTable("spr_GetUserPositionDescriptionCurrentStatusInfo", userID);

                // fill collection list
                childDataCollection = DashBoard.GetCollection(dataItems);
            }
            catch (Exception ex)
            {
                HandleException(ex);
            }

            return(childDataCollection);
        }
Example #3
0
        private static DashboardCollection GetCollection(DataTable dataItems)
        {
            DashboardCollection listCollection = new DashboardCollection();

            try
            {
                DashBoard current = null;

                if (dataItems != null)
                {
                    for (int i = 0; i < dataItems.Rows.Count; i++)
                    {
                        current = new DashBoard(dataItems.Rows[i]);
                        listCollection.Add(current);
                    }
                }
            }
            catch (Exception ex)
            {
                HandleException(ex);
            }

            return(listCollection);
        }
 public DashboardService(ISectionService sectionService, DashboardCollection dashboardCollection, ILocalizedTextService localizedText)
 {
     _sectionService      = sectionService ?? throw new ArgumentNullException(nameof(sectionService));
     _dashboardCollection = dashboardCollection ?? throw new ArgumentNullException(nameof(dashboardCollection));
     _localizedText       = localizedText ?? throw new ArgumentNullException(nameof(localizedText));
 }