コード例 #1
0
    public string GetRandomCommentHTML(string path, string tid)
    {
        string  node = Util.ReadInfoFromXML(path, "random_comment");
        string  html = "";
        DataSet ds   = cc.GetRandomComments(tid);

        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            string[] str = new string[6];
            str[0] = ds.Tables[0].Rows[i]["Comment"].ToString();
            str[1] = "label_" + i;
            str[2] = ds.Tables[0].Rows[i]["Start"].ToString();
            str[3] = "star_" + i;
            str[4] = ds.Tables[0].Rows[i]["Name"].ToString();
            str[5] = ds.Tables[0].Rows[i]["Time"].ToString();
            html  += string.Format(node, str);
        }
        return(html);
    }