public ActionResult Notes(int id) { string rate1 = string.Empty; string rate2 = string.Empty; string rate3 = string.Empty; CSP _item = CSP.GetById(id); CSP.AdjustOrder(id); List <string> dateinitVal = new List <string>(); int year = int.Parse(DateTime.Now.Year.ToString().Replace("20", "")); int orgYear = year; int month = 7; for (int i = 0; i < 12; i++) { dateinitVal.Add(month + "/" + year); if (month == 11 && year == orgYear) { rate1 = month + "/" + year; } if (month == 2) { rate2 = month + "/" + year; } if (month == 6) { rate3 = month + "/" + year; } month++; if (month > 12) { month = 1; year++; } } ViewBag.rate1 = rate1; ViewBag.rate2 = rate2; ViewBag.rate3 = rate3; ViewBag.AllDateInitiated = new SelectList(dateinitVal); List <Rating> allrates = Rating.GetAll(_item.Student.SchoolId); allrates.Insert(0, new Rating() { Description = "" }); ViewBag.AllRates = new SelectList(allrates, "RateValue", "Description"); List <CSPGoalCatalog> allGoals = CSPGoalCatalog.GetAll(id).Where(a => a.ParentCSPGoalCatalogId == null).ToList(); allGoals.Insert(0, new CSPGoalCatalog() { Id = -1, TextGoal = "NONE" }); ViewBag.allGoals = new SelectList(allGoals, "Id", "TextGoal"); return(View(_item)); }