public ActionResult GetSectionStatus(string itemNumber, string yrq)
        {
            ScheduleManager manager = new ScheduleManager();

            var model = new ClassStatusModel();

            var sectMod = manager.GetSectionInformation(itemNumber, yrq);

            //start

            string ayr = manager.GetAcademicYear(yrq);
            string sess = manager.GetQuarterSession(yrq);

            WTSClass post = new WTSClass();
            post.Url = "https://transact.edcc.edu/cgi-bin/rq230.exe";
            post.PostItems.Add("item", itemNumber);
            post.PostItems.Add("returnurl", "");
            post.PostItems.Add("request", "classchd");
            post.PostItems.Add("ayr", ayr);
            post.PostItems.Add("sess", sess);
            post.Type = WTSClass.PostTypeEnum.Post;
            string result = post.Post();
            DateTime processTime = DateTime.Now;
            HttpStatusCode statusCode = post.StatusCode;

            string classStatus = "";
            if (statusCode == HttpStatusCode.OK && result.IndexOf("EDMONDS COMMUNITY COLLEGE") != -1)
            {
                string courseId;
                string sectionNumber;

                int courseIdHeaderIndex = result.IndexOf("Course Id");
                int couseIdTextIndex = result.IndexOf(": ", courseIdHeaderIndex) + 2;

                StringBuilder builder = new StringBuilder();

                for (int i = couseIdTextIndex; result[i] != ' '; i++)
                {
                    builder.Append(result[i]);
                }
                courseId = builder.ToString();
                builder.Length = 0;

                int sectionNumberHeaderIndex = result.IndexOf("Sect", couseIdTextIndex);
                int sectionNumberTextIndex = result.IndexOf(": ", sectionNumberHeaderIndex) + 2;

                for (int i = sectionNumberTextIndex; result[i] != '<'; i++)
                {
                    builder.Append(result[i]);
                }
                sectionNumber = builder.ToString();
                builder.Length = 0;

                int statusHeaderIndex = result.IndexOf("Class Status", sectionNumberTextIndex);
                int statusTextIndex = result.IndexOf(": ", statusHeaderIndex) + 2;

                for (int i = statusTextIndex; result[i] != ' '; i++)
                {
                    builder.Append(result[i]);
                }
                classStatus = builder.ToString();

                if (classStatus == "OPEN")
                {
                    string openSeats;

                    int openSeatsHeaderIndex = result.IndexOf("Seats Available", statusTextIndex);
                    int openSeatsTextIndex = result.IndexOf(": ", openSeatsHeaderIndex) + 2;

                    builder.Length = 0;
                    for (int i = openSeatsTextIndex; result[i] != '<'; i++)
                    {
                        builder.Append(result[i]);
                    }
                    openSeats = builder.ToString();
                    model.CurrentStatus = "Open";
                    //lblStatus.CssClass = "ClassStatusOpen";
                    model.ClassOpen = true;
                    model.OpenSeats = (int.Parse(openSeats)).ToString();

                    model.ServerDown = false;
                }
                else
                {

                    model.CurrentStatus = "Closed";
                    model.ClassOpen = false;
                    model.ServerDown = false;
                }

                model.CourseID = courseId;
                model.Section = sectionNumber;
                model.StatusDateTime = processTime.ToString("G");
                model.ServerDown = false;
            }
            else
            {
                //
                //the server is down oh no!
                model.ServerDown = true;
            }
            //end

            model.CourseID = sectMod.CourseID;
            model.CourseTitle = sectMod.CourseTitle;
            model.AllowOnlineReg = sectMod.OnlineRegistration;
            model.ItemNumber = sectMod.ItemNumber;

            //Added waitlist info to status popup.  5/15/13  Robert.Pan
            //NOTE: This code gets built into ClassSchedule.dll
            string szWaitListCount = "0", szWaitListCapacity = "0";

            //Remove conditional as of 6/5/13 as requested.  Robert.Pan
            //if ((classStatus.ToUpper() != "OPEN") && (classStatus != ""))
            //{
                string dbConnectionString = "Server=odie; Database=Student; Trusted_Connection=True;";
                string szClassID = itemNumber + yrq;

                SqlConnection myConnection = new SqlConnection(dbConnectionString);
                myConnection.Open();
                SqlCommand cmd = new SqlCommand("StudentWaitlistCount_sp", myConnection);
                cmd.CommandType = CommandType.StoredProcedure;
                SqlParameter ClassID = cmd.Parameters.Add("@ClassID", SqlDbType.NVarChar);
                ClassID.Direction = ParameterDirection.Input;
                ClassID.Value = szClassID;
                SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
                if (dr.Read())
                {
                    szWaitListCount = dr["WaitListCount"].ToString();
                    szWaitListCapacity = dr["WaitListCapacity"].ToString();
                }
                myConnection.Close();   //Not needed because of CommandBehavior.CloseConnection - just being paranoid.

                model.debug = szClassID;
            //}
            model.WaitListCount = szWaitListCount;
            model.WaitListCapacity = szWaitListCapacity;
            //End added waitlist info.

            return PartialView("_SectionStatusView", model);
        }