Handler/UserHandler.ashx.cs

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using GoodsProject.DAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Bowin.Common.Linq;
using Bowin.Common.Linq.Sql;
using GoodsProject.Model;

namespace GoodsProject.Handler
{
    /// <summary>
    /// UserHandler 的摘要说明
    /// </summary>
    public class UserHandler : IHttpHandler
    {

        UserDAL dal = new UserDAL();
        LogDAL Errordal = new LogDAL();
        CommodityDBDataContext db = new CommodityDBDataContext();
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            var action = context.Request["action"];
            switch (action)
            {
                case "list":
                    int count = 0;
                    var page = int.Parse(context.Request["page"]);
                    var rows = int.Parse(context.Request["rows"]);
                    var data = dal.GetUserList(page, rows, out count);
                    string result = data.ToJson();
                    string returnJson = "{\"total\":" + count.ToString() + ",\"rows\":" + result + "}";
                    context.Response.Write(returnJson);
                    break;
                case "sele":
                    context.Response.Write(GetUserInfo(context));
                    break;
                case "add":
                    context.Response.Write(AddInfo(context));
                    break;
                case "del":
                    context.Response.Write(Removelist(context));
                    break;
                case "pass":
                    context.Response.Write(UpdatePass(context));
                    break;
                case "login":
                    context.Response.Write(Login(context));
                    break;
                    
                default:
                    break;
            }
        }
        #region 查找用户
        public string GetUserInfo(HttpContext context)
        {
            string ID = context.Request["ID"];
           
后面还有 157 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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