示例#1
0
        public override string GetPageUrl(int pageIndex)
        {
            var query = base.GetPageUrl(pageIndex);

            foreach (var type in Type)
            {
                query += "&type=" + System.Net.WebUtility.UrlEncode(type);
            }
            foreach (var status in Status)
            {
                query += "&status=" + System.Net.WebUtility.UrlEncode(status);
            }
            query += PlanningType.IsSet() ? "&planning=" + System.Net.WebUtility.UrlEncode(PlanningType) : "";
            query += LoadImages ? "&img=true" : "";
            query += Featured ? "&featured=true" : "";
            query += Location.IsSet() ? "&location=" + System.Net.WebUtility.UrlEncode(Location) : "";
            query += Agent.IsSet() ? "&agent=" + System.Net.WebUtility.UrlEncode(Agent) : "";
            query += PlanningType.IsSet() ? "&planning=" + System.Net.WebUtility.UrlEncode(PlanningType) : "";
            query += Bedrooms.HasValue ? "&beds=" + Bedrooms : "";
            query += MinBedrooms.HasValue ? "&beds-min=" + MinBedrooms : "";
            query += MaxBedrooms.HasValue ? "&beds-max=" + MaxBedrooms : "";
            query += MinPremium.HasValue ? "&prem-min=" + MinPremium : "";
            query += MaxPremium.HasValue ? "&prem-max=" + MaxPremium : "";
            query += MinPrice.HasValue ? "&price-min=" + MinPrice : "";
            query += MaxPrice.HasValue ? "&price-max=" + MaxPrice : "";
            query += MinRent.HasValue ? "&rent-min=" + MinRent : "";
            query += MaxRent.HasValue ? "&rent-max=" + MaxRent : "";
            query += PublishStatus.HasValue ? "&publish=" + PublishStatus : "";
            return(query);
        }
示例#2
0
        private Status GetPlanningStatus(PlanningType planningType)
        {
            var summary            = _planningService.GetPlanningSummary((int)planningType, AssistedUser.UserID);
            var enrollmentInterest = EnrollmentStatus.Value.EnrollmentInterests.First(i => i.Name == summary.PlanningName);

            var status = new Status()
            {
                Title    = summary.PlanningName,
                Message  = GetPlanningMessage(summary),
                Unlocked = enrollmentInterest.Interested
            };

            if (status.Unlocked)
            {
                status.PercentComplete = decimal.ToInt32(summary.PercentComplete);
                status.ButtonText      = summary.PercentComplete > 0 ? "Continue Planning" : "Start Planning";
                status.ButtonUrl       = Url.Action("Index", "Planning", new { wizardId = summary.PlanningWizardID, area = "Pentameter" });
            }

            return(status);
        }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PlanningEntry"/> class.
 /// </summary>
 /// <param name="date">The date.</param>
 /// <param name="plantype">The type of the planning.</param>
 public PlanningEntry(DateTime date, PlanningType plantype)
 {
     this.PlanningDate = date;
     this.PlanningType = plantype;
 }