Ejemplo n.º 1
0
        public static BaseApplicationViewData Create(Application application, ApplicationBanInfo appBan)
        {
            var model = new BaseApplicationViewData(application)
            {
                IsBannedForCurrentSchool = appBan?.BannedForCurrentSchool,
                IsBannedForDistrict      = appBan?.UnBannedSchoolCount == 0,
                IsPartiallyBanned        = appBan?.BannedSchoolCount != 0
            };

            return(model);
        }
Ejemplo n.º 2
0
        public static MiniQuizAppInfoViewData Create(Application miniQuizApp, IList <BaseApplicationViewData> suggestedApps, IList <BaseApplicationViewData> application, IDictionary <Guid, bool> hasMyAppsDic, int?personId, string token)
        {
            var res = new MiniQuizAppInfoViewData
            {
                ApplicationInfo         = BaseApplicationViewData.Create(miniQuizApp),
                Token                   = token,
                Applications            = application.Where(a => hasMyAppsDic.ContainsKey(a.Id)).ToList(),
                RecommendedApplications = suggestedApps.Where(a => hasMyAppsDic.ContainsKey(a.Id)).ToList()
            };

            return(res);
        }