using System;
using System.Data;
using System.Web;
using System.Collections.Generic;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using TopWinCMS.BLL;
using TopWinCMS.Common;
/// <summary>
/// WS_FindHistTory 的摘要说明
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class WS_FindHistTory : System.Web.Services.WebService
{

    [System.Web.Services.WebMethod]
    [System.Web.Script.Services.ScriptMethod]
    public string[] GetKeyList(string prefixText, int count)
    {
        List<string> items = new List<string>(count);
        DataSet myDataSet = new TagsManage().GetInfoList(count.ToString(), prefixText);


        foreach (DataRow dr in myDataSet.Tables[0].Rows)
        {
            items.Add(dr[0].ToString());
        }
        return items.ToArray();

    }
    [System.Web.Services.WebMethod]
    [System.Web.Script.Services.ScriptMethod]
    public string[] GetAuthorList(string prefixText, int count)
    {
        List<string> items = new List<string>(count);

        DataSet myDataSet = new ContentPropertyManage().GetInfoList(count.ToString(), 1, prefixText);
        foreach (DataRow dr in myDataSet.Tables[0].Rows)
        {
            items.Add(dr[0].ToString());
        }
        return items.ToArray();
    }

    [System.Web.Services.WebMethod]
    [System.Web.Script.Services.ScriptMethod]
    public string[] GetFromList(string prefixText, int count )
    {
        List<string> items = new List<string>(count);

        DataSet myDataSet = new ContentPropertyManage().GetInfoList(count.ToString(), 2, prefixText);
        foreach (DataRow dr in myDataSet.Tables[0].Rows)
        {
            items.Add(dr[0].ToString());
        }
        return items.ToArray();
    }
}