WebApplication/Html/ajax/sc.ashx.cs

(完整代码) 2KB

using System;
using System.Collections.Generic;
using System.Web.SessionState;
using System.Web;
using System.Collections;

namespace WebApplication.Html.ajax
{
    /// <summary>
    /// sc 的摘要说明
    /// </summary>
    public class sc : IHttpHandler,IRequiresSessionState
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            if (context.Request["infoid"] != null) 
            {
                Hashtable ht = new Hashtable();
                ht["ChannelID"] = "1000075";
                ht["ClassID"] = "132";
                ht["Inputer"] = context.Session["LoginInfoID"];
                ht["Title"] = context.Session["LoginLoginName"];
                ht["DepartID"] = context.Session["LoginDepartID"];
                ht["UserInfoID"] = context.Session["LoginInfoID"];
                ht["SerivceInfoID"] = context.Request["infoid"];
                ht["CreateDate"] = DateTime.Parse(DBUtility.DbHelperSQL.GetSingle("select getdate()").ToString()).ToString("yyyy-MM-dd HH:mm:ss");
                if (DBUtility.DbHelperSQL.Exists("select * from GZXX_U_Like where SerivceInfoID = '" + context.Request["infoid"] + "' and UserInfoID = '" + context.Session["LoginInfoID"] + "'"))
                {
                    context.Response.Write("已经收藏过该服务项目!");
                }
                else
                {
                    BLL.Models.GZXX_Model bll = new BLL.Models.GZXX_Model();
                    if (bll.AddContent("GZXX_U_Like", ht) > 0)
                    {
                        context.Response.Write("收藏成功!");
                    }
                    else 
                    {
                        context.Response.Write("收藏失败!");
                    }
                }
            }
            else 
            {
                context.Response.Write("参数错误!");
            }
        }

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

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

AI 解读

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

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