private void LoadInstructionalPlan() { if (IsQueryStringMissingParameter(X_ID)) { RedirectToPortalSelectionScreen(); } else { _planId = GetDecryptedEntityId(X_ID); if (RecordExistsInCache(Key)) { _selectedPlan = ((Base.Classes.InstructionalPlan)Base.Classes.Cache.Get(Key)); } } }
private void LoadInstructionalPlan() { if (Request.QueryString["xID"] == null) { SessionObject.RedirectMessage = "No entity ID provided in URL."; Response.Redirect("~/PortalSelection.aspx", true); } else { _planID = DataIntegrity.ConvertToInt(Request.QueryString["xID"]); var key = "InstructionalPlan_" + _planID; if (!RecordExistsInCache(key)) return; _selectedPlan = ((Base.Classes.InstructionalPlan)Base.Classes.Cache.Get(key)); } }
protected void Page_Load(object sender, EventArgs e) { sessionObject = (SessionObject)Session["SessionObject"]; if (Request.QueryString["xID"] == null) { SessionObject.RedirectMessage = "No item type provided in URL."; Response.Redirect("~/PortalSelection.aspx", true); } else { _planID = DataIntegrity.ConvertToInt(Request.QueryString["xID"]); var key = "InstructionalPlan_" + _planID; if (!RecordExistsInCache(key)) return; _selectedPlan = ((Base.Classes.InstructionalPlan)Base.Classes.Cache.Get(key)); if (Request.QueryString["assessmentID"] != null) { _selectedAssessment = Base.Classes.Assessment.GetAssessmentByID(DataIntegrity.ConvertToInt(Request.QueryString["assessmentID"])); } if (Request.QueryString["resourceID"] != null) { _selectedResource = Base.Classes.Resource.GetDummyResourceByID(DataIntegrity.ConvertToInt(Request.QueryString["resourceID"])); } if (Request.QueryString["lessonplanid"] != null) { _selectedLessonPlan = Base.Classes.LessonPlan.GetPlanByID(DataIntegrity.ConvertToInt(Request.QueryString["lessonplanid"])); } if (Request.QueryString["standardid"] != null) { _selectedStandard = Base.Classes.Standards.GetStandardByID(DataIntegrity.ConvertToInt(Request.QueryString["standardid"])); } InstructionalPlanScheduler.DataSource = _selectedPlan.CalendarEvents; InstructionalPlanScheduler.DataBind(); if (Request.QueryString["view"] != null) //If a day is passed in query string, flip to day view and that date { switch (Request.QueryString["view"].ToString()) { case "Day": InstructionalPlanScheduler.SelectedView = SchedulerViewType.DayView; break; case "Week": InstructionalPlanScheduler.SelectedView = SchedulerViewType.WeekView; break; case "Month": default: InstructionalPlanScheduler.SelectedView = SchedulerViewType.MonthView; break; } } if(Request.QueryString["day"] != null) //If a day is passed in query string, flip to day view and that date { InstructionalPlanScheduler.SelectedView = SchedulerViewType.DayView; InstructionalPlanScheduler.SelectedDate = DataIntegrity.ConvertToDate(Request.QueryString["day"]); } } }