protected new void Page_Init(object sender, EventArgs e)
 {
     base.Page_Init(sender, e);
     sessionObject = (SessionObject)Session["SessionObject"];
     ImpPlanType = (ImprovementPlanType)Tile.TileParms.GetParm("improvementPlanType");
     if (Tile.TileParms.Parms.ContainsKey("schoolID"))
     {
         SchoolID = (int)Tile.TileParms.GetParm("schoolID");
     }
 }
 /// <summary>
 /// Set the control based on plan type
 /// </summary>
 private void SetPlanTypeMode(ImprovementPlanType planType)
 {
     switch (planType)
     {
         case ImprovementPlanType.District:
             this.lblSchool.Visible = this.lblSchoolVal.Visible = false;
             break;
     }
     
 }
      private void FilterAndDisplayResult(ImprovementPlanType type, int? school, string year = null)
      {

          var improvementPlanDisplayList =
              _improvementPlanList.Where(
                  x =>
                      (x.PlanType == type) && (school == default(int?) || (x.School != null && x.School.ID == school)) &&
                      (string.IsNullOrEmpty(year) || x.Year == year)).ToList();
          if (improvementPlanDisplayList.Count <= 0)
          {
              pnlNoResults.Visible = true;
              lbxImprovementPlanList.Visible = false;
              if (!string.IsNullOrEmpty(year) &&
                  (ImpPlanType == ImprovementPlanType.District || (school != default(int?))))
              {
                  EnableBtnAdd(year,school);
              }
              else
              {
                  DisableBtnAdd();
              }
          }
          else
          {
              improvementPlanDisplayList = improvementPlanDisplayList.OrderBy(order => order.Year).ToList();

              pnlNoResults.Visible = false;
              lbxImprovementPlanList.Visible = true;
              DisableBtnAdd();

              lbxImprovementPlanList.DataSource = improvementPlanDisplayList;
              lbxImprovementPlanList.DataBind();
          }
      }
        /// <summary>
        /// Get the excel file name based on plantype, schoolname and year
        /// </summary>
        /// <param name="planType"></param>
        /// <param name="schoolName"></param>
        /// <param name="year"></param>
        /// <returns></returns>
        private string GetExcelFileName(ImprovementPlanType planType, string schoolName, string year)
        {
            StringBuilder excelFileName = new StringBuilder();

            //Add year to the file name
            if (!string.IsNullOrEmpty(year))
            {
                excelFileName.Append(year);
                excelFileName.Append("-");
            }

            //Add district or school plan type to file name
            if (planType != ImprovementPlanType.None)
                excelFileName.Append(planType.ToString());

            //Add improvement plan to file name
            excelFileName.Append("ImprovementPlan");

            //Add school name to file name
            if (planType == ImprovementPlanType.School)
                excelFileName.Append(schoolName);

            //Add extension
            excelFileName.Append(".xlsx");

            return excelFileName.ToString();
        }