コード例 #1
0
    public string Quizeloader(string TestID, int _PageItems, int Index)
    {
        string html = "";

        if (Dst.statecount == 0)
        {
            BindQuizes(TestID);
        }
        html += "<table class=\"Quiz_table\">";
        if (_PageItems != 0)
        {
            PageItems = _PageItems;
            int Pages = QuizCount % PageItems == 0?QuizCount / PageItems:(int)(QuizCount / PageItems) + 1;
            QuizPagerCount = Pages;
            //QuizPagerCount = 9;
            for (int j = 0; j < PageItems; j++)
            {
                int    ex   = Index * _PageItems - _PageItems + j;
                string temp = Dst.Readex(ex) + "";
                if (temp != "")
                {
                    html += temp;
                }
            }
        }
        else
        {
            string temp = Dst.Read() + "";
            while (temp != "")
            {
                html += temp;
                temp  = Dst.Read() + "";
            }
        }
        html += "</table>";
        return(html);
    }