Esempio n. 1
0
        public static GridSettings GridSettingsFromReviewCriteria(ReviewListCriteriaViewModel criteria)
        {
            var gs = new GridSettings
            {
                IsSearch   = true,
                PageIndex  = 1,
                PageSize   = 999999999,
                SortColumn = "ReviewId",
                SortOrder  = "asc",
                Where      = new Filter()
            };
            var ruleList = new List <Rule>();

            AddRuleFor(criteria.ReviewId, "ReviewId", ruleList);
            AddRuleFor(criteria.UploadId, "UploadId", ruleList);
            AddRuleFor(criteria.ClaimId, "ClaimId", ruleList);
            AddRuleFor(criteria.JobseekerId, "JobseekerId", ruleList);
            AddRuleFor(criteria.ActivityId, "ActivityId", ruleList);
            AddRuleFor(criteria.AssessmentCode, "AssessmentCode", ruleList);
            AddRuleFor(criteria.OutcomeCode, "OutcomeCode", ruleList);
            AddRuleFor(criteria.AssessmentAction, "AssessmentAction", ruleList);
            AddRuleFor(criteria.RecoveryReason, "RecoveryReason", ruleList);
            AddRuleFor(criteria.SiteCode, "SiteCode", ruleList);
            AddRuleFor(criteria.EsaCode, "EsaCode", ruleList);
            AddRuleFor(criteria.StateCode, "StateCode", ruleList);
            AddRuleFor(criteria.OrgCode, "OrgCode", ruleList);
            gs.Where.groupOp = "AND";
            gs.Where.rules   = ruleList.ToArray();
            return(gs);
        }
Esempio n. 2
0
 public static void SetSessionReviewListCriteria(HttpSessionStateBase session, ReviewListCriteriaViewModel criteria)
 {
     session[CommonConstants.SessionSiteCodeCriteria] = criteria;
 }