Meeting/Admin/Ajax/gethanddata.ashx.cs

(完整代码) 2KB

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;

namespace WebApplication.Admin.Ajax
{
    /// <summary>
    /// gethanddata 的摘要说明
    /// </summary>
    public class gethanddata : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            //context.Response.Write("Hello World");
            if (context.Request["infoids"] != null)
            {
                string html = string.Empty;
                int count = 0;
                if (context.Request["infoids"] == "") { }
                else
                {
                    BLL.Models.GZXX_Model mll = new BLL.Models.GZXX_Model();
                    DataTable dt = mll.GetDataTable("*", "[GZXX_U_Questions]", " where [InfoID] in (" + context.Request["infoids"].Replace("|", ",") + ") and verify = 1 ", 10 * (int.Parse(context.Request["currentsize"]) - 1), 10, null, " order by InfoID desc ");
                    string haveinfoid = "|" + context.Request["infoids"].ToString() + "|";
                   
                    //int count = mll.GetCount("GZXX_U_Questions", " where [QuestionType] in (" + context.Request["questiontype"] + ")", null);
                    count = context.Request["infoids"].Split('|').Length;
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {


                        html += "<div style=\"clear:both;border-bottom:1px dashed #ccc;height:42px;width:98%\"><div class=\"itemdiv\" style=\"width:8%\">" + dt.Rows[i]["InfoID"].ToString() + "</div>";
                        html += "<div class=\"itemdiv\" style=\"width:17%\">" + dt.Rows[i]["QuestionType"].ToString() + "</div>";
                        html += "<div class=\"itemdiv\" style=\"width:65%;white-space: nowrap;overflow-x: hidden;\">" + dt.Rows[i]["Content"].ToString() + "</div>";
                        html += "<div class=\"itemdiv Ctd\" style=\"width:10%\"><a class=\"edit\" onclick='parent.sp(\"Content/_HandEditQuestion.aspx?action=edit&channelid=1000015&infoid=" + dt.Rows[i]["InfoID"].ToString() + "\", 960, 520, \"编辑试题\");'></a><a class=\"delete\" onclick=\"removeresult(this,'" + dt.Rows[i]["InfoID"].ToString() + "')\"></a></div>";
                        html += "</div>";
                    }
                }
                context.Response.Write("操作成功!@@@" + html + "@@@" + Math.Ceiling(double.Parse(count.ToString()) / 10).ToString());
            }
            else
            {
                context.Response.Write("参数错误!@@@");
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。