Handler/WarehouseHandler.ashx.cs

(开头部分) 19KB

这里只显示每个文件的开头 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>
    /// WarehouseHandler 的摘要说明
    /// </summary>
    public class WarehouseHandler : IHttpHandler
    {
        WarehouseDAL dal = new WarehouseDAL();
        LogDAL Errordal = new LogDAL();
        CommodityDBDataContext db = new CommodityDBDataContext();
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            var action = context.Request["action"];
            int count = 0;
            int page = 0;
            int rows = 0;
            switch (action)
            {
                case "Inlist":
                    page = int.Parse(context.Request["page"]);
                    rows = int.Parse(context.Request["rows"]);
                    var Brand = context.Request["BrandID"];
                    var Name = context.Request["InName"];
                    var InBeginDate = context.Request["BeginInDate"];
                    var InEndDate = context.Request["EndInDate"];
                    var data = dal.GetInWarehouseList(Brand, Name, InBeginDate, InEndDate, page, rows, out count);
                    string result = data.ToJson();
                    string returnJson = "{\"total\":" + count.ToString() + ",\"rows\":" + result + "}";
                    context.Response.Write(returnJson);
                    break;
                case "Outlist":
                    page = int.Parse(context.Request["page"]);
                    rows = int.Parse(context.Request["rows"]);
                    var OutBrand = context.Request["BrandID"];
                    var OutName = context.Request["OutName"];
                    var OutBeginDate = context.Request["OutBeginDate"];
                    var OutEndDate = context.Request["OutEndDate"];
                    var Outdata = dal.GetOutWarehouseList(OutBrand, OutName, OutBeginDate, OutEndDate, page, rows, out count);
                    string Outresult = Outdata.ToJson();
                    string OutreturnJson = "{\"total\":" + count.ToString() + ",\"rows\":" + Outresult + "}";
                    context.Response.Write(OutreturnJson);
                    break;
                case "Goods":
                    context.Response.Write(GetGoodsList(context));
                    break;
                //case "sele":
                //    context.Response.Write(GetGoodsInfo(context));
                //    break;
                case "Inadd":
                    context.Response.Write(AddInInfo(context)); //入库
后面还有 416 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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