private System.Web.UI.WebControls.Table Create_Rec_Table(MirrorCLS myMirror)
        {
            System.Web.UI.WebControls.Table MyTable = new System.Web.UI.WebControls.Table();
            try
            {
                myList.Add(myMirror);
                //First Row
                MyTable.Width       = Unit.Percentage(100);
                MyTable.BorderWidth = 1;
                MyTable.GridLines   = GridLines.Horizontal;


                TableRow  tr = new TableRow();
                TableCell td = new TableCell();


                //Fifth
                tr.CssClass   = "th";
                td.ColumnSpan = 4;
                td.Text       = "Student Mirror";
                tr.Cells.Add(td);
                MyTable.Rows.Add(tr);

                tr            = new TableRow();
                td            = new TableCell();
                td.ColumnSpan = 4;


                string sPath  = "";
                string sTable = "<table align='left' border='1' >";
                sTable += "<tr>";

                int    iMax    = 0;
                string sDegree = myMirror.SDegree;
                string sMajor  = myMirror.SMajor;
                //Get the count of general courses
                iMax = LibraryMOD.GetMajorGeneralIndex(sDegree, sMajor);

                for (int i = 0; i < iMax; i++)
                {
                    sPath   = "Images/Majors/GIF/" + myMirror.Mirror[i].sCourse + ".gif";
                    sTable += "<td><img alt='' src='" + sPath + "' /></td>";
                }
                sTable += "</tr>";
                sTable += "<tr>";

                for (int i = 0; i < iMax; i++)
                {
                    if (myMirror.Mirror[i].isRecommended)
                    {
                        sTable += "<td style='font-family: Arial, Helvetica, sans-serif; font-size: small; color: #000000; text-align: center; vertical-align: top; background-color: #F2B702'>" + myMirror.Mirror[i].sGrade + "</td>";
                    }
                    else
                    {
                        sTable += "<td style='font-family: Arial, Helvetica, sans-serif; font-size: small; color: #000000; text-align: center; vertical-align: top'>" + myMirror.Mirror[i].sGrade + "</td>";
                    }
                }
                sTable += "</tr>";
                sTable += "</table>";

                Literal Lt = new Literal();
                Lt.Text = sTable;
                td.Controls.Add(Lt);
                tr.Cells.Add(td);

                MyTable.Rows.Add(tr);

                tr            = new TableRow();
                td            = new TableCell();
                td.ColumnSpan = 4;

                int iCourses = 0;
                iCourses = myMirror.Mirror.Length;

                sPath   = "";
                sTable  = "<table align='left' border='1' >";
                sTable += "<tr>";
                for (int i = iMax; i < iCourses; i++)
                {
                    sPath   = "Images/Majors/GIF/" + myMirror.Mirror[i].sCourse + ".gif";
                    sTable += "<td><img alt='' src='" + sPath + "' /></td>";
                }
                sTable += "</tr>";
                sTable += "<tr>";
                for (int i = iMax; i < iCourses; i++)
                {
                    if (myMirror.Mirror[i].isRecommended)
                    {
                        sTable += "<td style='font-family: Arial, Helvetica, sans-serif; font-size: small; color: #000000; text-align: center; vertical-align: top; background-color: #F2B702'>" + myMirror.Mirror[i].sGrade + "</td>";
                    }
                    else
                    {
                        sTable += "<td style='font-family: Arial, Helvetica, sans-serif; font-size: small; color: #000000; text-align: center; vertical-align: top'>" + myMirror.Mirror[i].sGrade + "</td>";
                    }
                }
                sTable += "</tr>";
                sTable += "</table>";

                Lt      = new Literal();
                Lt.Text = sTable;
                td.Controls.Add(Lt);
                tr.Cells.Add(td);

                MyTable.Rows.Add(tr);

                //Majoe Electives & Free Electives
                MirrorDAL myMirrorDAL = new MirrorDAL();

                tr            = new TableRow();
                td            = new TableCell();
                td.ColumnSpan = 4;

                string MElective = myMirrorDAL.GetMajorElectiveCourses(myMirror.StudentNumber, Campus);
                string FElective = myMirrorDAL.GetFreeElectiveCourses(myMirror.StudentNumber, Campus);
                if (MElective.Length > 0 || FElective.Length > 0)
                {
                    tr            = new TableRow();
                    td            = new TableCell();
                    td.ColumnSpan = 4;
                }
                td.Text = "";
                if (MElective.Length > 0)
                {
                    td.Text += "Major Electives: " + "[ " + MElective + " ]";
                }

                if (FElective.Length > 0)
                {
                    if (MElective.Length > 0)
                    {
                        td.Text += " --- ";
                    }
                    td.Text += "Free Electives [" + FElective + " ]";
                }
                if (MElective.Length > 0 || FElective.Length > 0)
                {
                    tr.Cells.Add(td);
                    MyTable.Rows.Add(tr);
                }

                //Recommended
                tr = new TableRow();
                td = new TableCell();

                tr.CssClass   = "th";
                td.ColumnSpan = 4;
                td.Text       = "Recommended Courses";

                tr.Cells.Add(td);
                MyTable.Rows.Add(tr);

                int iCompletedHours = LibraryMOD.GetCompletedHours(sNo, Campus);

                //Tr=new TableRow();
                for (int i = 0; i < myMirror.Recommended.Count; i++)
                {
                    if ((iCompletedHours < 99 && myMirror.Recommended[i].sCourse.Contains("415") && myMirror.Recommended[i].sCourse != "RTV415") || (iCompletedHours < 99 && myMirror.Recommended[i].sCourse.Contains("419")))
                    {
                        //dont add Internship & graduation project in completed hours less than 99 credit hours
                    }
                    else
                    {
                        tr = new TableRow();
                        if (myMirror.Recommended[i].isOver)
                        {
                            tr.CssClass = "R_Critical";
                        }
                        else
                        {
                            if (i % 2 == 0)
                            {
                                tr.CssClass = "R_NormalWhite";
                            }
                            else
                            {
                                tr.CssClass = "R_NormalGray";
                            }
                        }
                        td                 = new TableCell();
                        td.Text            = (i + 1).ToString();
                        td.HorizontalAlign = HorizontalAlign.Center;
                        tr.Cells.Add(td);

                        td                 = new TableCell();
                        td.Text            = myMirror.Recommended[i].sCourse;
                        td.HorizontalAlign = HorizontalAlign.Center;
                        tr.Cells.Add(td);

                        td                 = new TableCell();
                        td.ColumnSpan      = 2;
                        td.Text            = myMirror.Recommended[i].sDesc;
                        td.HorizontalAlign = HorizontalAlign.Left;
                        tr.Cells.Add(td);

                        MyTable.Rows.Add(tr);
                    }
                }
            }
            catch (Exception ex)
            {
                LibraryMOD.ShowErrorMessage(ex);
            }
            finally
            {
            }
            return(MyTable);
        }