Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BusinessBLL.SiteService service = new BusinessBLL.SiteService();

            StringBuilder result = new StringBuilder();

            //max siteid 61

            result.Append("{");

            //网站列表
            result.Append("\"site_list\":");
            result.Append(service.GetSiteList());

            //外部词典
            result.Append(",\"ext_dic\":");
            result.Append(service.GetExtDic());

            //停止词典
            result.Append(",\"stop_dic\":");
            result.Append(service.GetStopDic());

            //删除词典
            result.Append(",\"del_dic\":[]");

            result.Append("}");

            Response.Write(result.ToString());
            Response.End();
        }
    }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string result = "";

            int siteId = Convert.ToInt32(Request["siteId"] ?? "0");
            int page   = Convert.ToInt32(Request["page"] ?? "0");

            if (siteId > 0)
            {
                BusinessBLL.SiteService service = new BusinessBLL.SiteService();

                var sexSpider = service.GetSexSpider(siteId);

                var lists = GetLists(sexSpider, page);

                result = Newtonsoft.Json.JsonConvert.SerializeObject(lists, serializerSettings);
            }
            else
            {
                result = "SiteId 无效!";
            }

            Response.Write(result.ToString());
            Response.End();
        }
    }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BusinessBLL.SiteService service = new BusinessBLL.SiteService();

            StringBuilder result = new StringBuilder();

            //具体对象
            result.Append(service.GetSiteList());

            Response.Write(result.ToString());
            Response.End();
        }
    }
Esempio n. 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BusinessBLL.SiteService service = new BusinessBLL.SiteService();

            string jsonHtml = Request["models"];

            if (jsonHtml == null || jsonHtml == "")
            {
                return;
            }

            service.UpdateSiteList(jsonHtml);

            //Response.Write("callback()");
            //Response.End();
        }
    }
Esempio n. 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string url = Request["url"] ?? "";

            int siteId = Convert.ToInt32(Request["siteId"] ?? "0");

            if (siteId > 0 && url != "")
            {
                BusinessBLL.SiteService service = new BusinessBLL.SiteService();

                var sexSpider = service.GetSexSpider(siteId);
                var lists     = GetImages(sexSpider, HttpUtility.UrlDecode(url));

                this.Repeater1.DataSource = lists;
                this.Repeater1.DataBind();
            }
        }
    }