protected void Page_Load(object sender, EventArgs e)
        {
            String cmd = Request["cmd"];
            int showid = Convert.ToInt32(Request["showid"]);
            int showDetailsID = -1;
            if (!String.IsNullOrEmpty(Request["ShowDetailsID"])) showDetailsID = Convert.ToInt32(Request["ShowDetailsID"]);
            ShowDetails showDetails = new ShowDetails();
            showDetails.ShowID = showid;

            DataTable showDays = showDetails.GetDays();
            foreach (DataRow showDayRow in showDays.Rows)
            {
                showDetailsID = Convert.ToInt32(showDayRow["ShowDetailID"]);
                DateTime showDate = Convert.ToDateTime(showDayRow["ShowDate"]);
                Response.Write( showDate.ToString("<h2>ddd, dd MMM yyyy</h2>"));
                ShowDetails currentShowDate = new ShowDetails(showDetailsID);
                Rings rings = new Rings();
                DataSet ringsTable = rings.GetRingsForShowDay(showDetailsID);

                int lastRingNo = 0;
                foreach (DataRow row in ringsTable.Tables[0].Rows)
                {
                    int ringID = Convert.ToInt32(row["RingID"]);
                    if (ringID > -1 && lastRingNo != Convert.ToInt32(row["RingNo"]))
                    {
                        lastRingNo = Convert.ToInt32(row["RingNo"]);

                        Response.Write(String.Format("<p>Ring: {0}</p>", lastRingNo));
                        DataSet judgesDS = rings.GetJudgesForRing(ringID);
                        if (judgesDS.Tables.Count > 0)
                        {
                            foreach (DataRow judgeRow in judgesDS.Tables[0].Rows)
                            {
                                Response.Write(String.Format("<p>Judge: {0}</p>", judgeRow["Name"]));
                                Judge judge = new Judge(judgeRow);
                                DataSet classesDS = judge.getClassesForJudge();
                                if (classesDS.Tables.Count > 0)
                                {
                                    foreach (DataRow classRow in classesDS.Tables[0].Rows)
                                    {
                                        Response.Write(String.Format(" {2,-5} {3} {4} {7} {5} {6}  ({1})<br>",
                                                        classRow["ClassID"], CalcDogsInCalc(classRow), classRow["ClsNo"], ShowClasses.expandHeight(classRow), ShowClasses.expandCatagory(classRow), classRow["LongName"], classRow["Name"], ShowClasses.shortenGrades(classRow)
                                                    ));
                                    }
                                }
                            }

                        }

                        //ringContainer.InnerHtml += String.Format(ringTemplate, lastRingNo, 1, judges, classes, ringID, helperList);
                        Response.Write("<br><br>");
                    }

                }

                Response.Write("<br><hr><br>");
            }
        }
        private String CreateRing(ShowDetails currentShowDate, Rings ring, Judge judge, String ringTemplate, int lastRingNo)
        {
            DataSet helperDS;
            String judges;
            String classes = "";
            String helperList = "";

            judges = String.Format("<p judgeid='{0}'>{1}</p>", judge.ID.ToString(), judge.Name);
            //helperDS = rings.GetHelpersForJudge(currentShowDate, Convert.ToInt32(judgeRow["JudgeID"]));
            //if (helperDS.Tables.Count > 0)
            //{
            //    foreach (DataRow helperRow in helperDS.Tables[0].Rows)
            //    {
            //        Helpers h = new Helpers(helperRow);
            //        helperList += String.Format("<li class='ui-draggable' ><div helperid='{0}' class='helperDetails'>{1} ({2})</div></li>", h.ID, h.Name, h.JobName);
            //    }
            //}

            helperDS = Helpers.GetHelpersForRing(currentShowDate, ring.ID);
            if (helperDS.Tables.Count > 0)
            {
                foreach (DataRow helperRow in helperDS.Tables[0].Rows)
                {
                    Helpers h = new Helpers(helperRow);
                    String job = expandJob(h.Job, h.JobDetails);
                    helperList += String.Format("<li class='ui-draggable' ><div helperid='{0}' class='helperDetails'>{1} ({2})</div></li>", h.ID, h.Name, job);
                }
            }

            DataSet classesDS = Rings.GetClassesForRing(ring.ID);
            classesDS = judge.getClassesForJudge();
            if (classesDS.Tables.Count > 0)
            {
                foreach (DataRow classRow in classesDS.Tables[0].Rows)
                {
                    classes += String.Format("<li><div clsid='{0}' dogsinclass='{1}' class='clsDetails'><div class='clstotal'>({1})</div><div class='clsNo'>{2}</div><div class='clsName'>{3} {4} {7} {5} {6}</div></div></li>",
                                    classRow["ClassID"], CalcDogsInCalc(classRow), classRow["ClsNo"], ShowClasses.expandHeightShort(classRow), ShowClasses.expandCatagoryShort(classRow), classRow["ShortName"], classRow["Name"], ShowClasses.shortenGrades(classRow)
                                );
                }
                if (classes.Length == 0)
                {
                    classes = "<li class='blank'></li>";
                }
            }

            return String.Format(ringTemplate, judges, classes, helperList);
        }