Ejemplo n.º 1
0
        private void GetForums()
        {
            page.InnerHtml += "<table class=\"fstr\">\n";

            com.CommandText = "select id,name,description from forum order by [position]";
            OleDbDataReader dReader = com.ExecuteReader();

            List<ForumItem> list = new List<ForumItem>();

            while (dReader.Read())
            {
                ForumItem fi = new ForumItem();
                fi.id = dReader.GetInt32(0);
                fi.name = dReader.GetString(1);
                fi.description = dReader.GetString(2);

                list.Add(fi);
            }

            for (int i = 0; i < list.Count; i++)
            {
                page.InnerHtml += "<tr class=\"fstr\">";
                page.InnerHtml += ForumObjectParser(list[i].name, list[i].id, list[i].description);
                page.InnerHtml += "</tr>";
            }

            page.InnerHtml += "</table>\n";
        }
Ejemplo n.º 2
0
        private void GetForums()
        {
            page.InnerHtml += "<table class=\"fstr\">\n";


            com.CommandText = "select id,name,description from forum order by [position]";
            OleDbDataReader dReader = com.ExecuteReader();

            List <ForumItem> list = new List <ForumItem>();

            while (dReader.Read())
            {
                ForumItem fi = new ForumItem();
                fi.id          = dReader.GetInt32(0);
                fi.name        = dReader.GetString(1);
                fi.description = dReader.GetString(2);

                list.Add(fi);
            }

            for (int i = 0; i < list.Count; i++)
            {
                page.InnerHtml += "<tr class=\"fstr\">";
                page.InnerHtml += ForumObjectParser(list[i].name, list[i].id, list[i].description);
                page.InnerHtml += "</tr>";
            }


            page.InnerHtml += "</table>\n";
        }
Ejemplo n.º 3
0
        private void GetSubForums(string forumId)
        {
            page.InnerHtml += "<table class=\"fstr\">\n";


            com.CommandText =
                "select id,name,description from subforum where(forum=" + forumId + ") order by [position];";

            OleDbDataReader  dReader = com.ExecuteReader();
            List <ForumItem> list    = new List <ForumItem>();

            while (dReader.Read())
            {
                ForumItem fi = new ForumItem();
                fi.id   = dReader.GetInt32(0);
                fi.name = dReader.GetString(1);
                try
                {
                    fi.description = dReader.GetString(2);
                }
                catch (InvalidCastException) { fi.description = ""; };
                list.Add(fi);
            }
            for (int i = 0; i < list.Count; i++)
            {
                page.InnerHtml += "<tr class=\"fstr\">";
                page.InnerHtml += SubForumObjectParser(list[i].name, list[i].id, list[i].description);
                page.InnerHtml += "</tr>";
            }
            page.InnerHtml += "</table>\n";
        }
Ejemplo n.º 4
0
        private void GetSubForums(string forumId)
        {
            page.InnerHtml += "<table class=\"fstr\">\n";

            com.CommandText =
                "select id,name,description from subforum where(forum=" + forumId + ") order by [position];";

            OleDbDataReader dReader = com.ExecuteReader();
            List<ForumItem> list = new List<ForumItem>();

            while (dReader.Read())
            {
                ForumItem fi = new ForumItem();
                fi.id = dReader.GetInt32(0);
                fi.name = dReader.GetString(1);
                try
                {
                    fi.description = dReader.GetString(2);
                }
                catch (InvalidCastException) { fi.description = ""; };
                list.Add(fi);

            }
            for (int i = 0; i < list.Count; i++)
            {
                page.InnerHtml += "<tr class=\"fstr\">";
                page.InnerHtml += SubForumObjectParser(list[i].name, list[i].id, list[i].description);
                page.InnerHtml += "</tr>";

            }
            page.InnerHtml += "</table>\n";
        }