MxWeiXinPF.Web/weixin/groupbuy/groupbuying.ashx.cs

(开头部分) 7KB

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

using MxWeiXinPF.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MxWeiXinPF.Web.weixin.groupbuy
{
    /// <summary>
    /// groupbuying 的摘要说明
    /// </summary>
    public class groupbuying : IHttpHandler
    {
        protected Model.wx_purchase_base basemodel;
        protected int totalCount = 0;
        protected int count = 0;
        protected int limitCount = 0;
        protected string huodname = "";
        protected int tuangj = 0;
        protected int yg = 0;
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/json";
            string _action = MyCommFun.QueryString("myact");
            string shopsPwd = MyCommFun.QueryString("shopsPwd");
            string sn = MyCommFun.QueryString("sn");
            int id = MyCommFun.RequestInt("baseid");
            int baseid = MyCommFun.RequestInt("baseid");
            string customerName = MyCommFun.QueryString("customerName");
            string tel = MyCommFun.QueryString("tel");
            int customerNum = MyCommFun.RequestInt("customerNum");
            string address = MyCommFun.QueryString("address");
            string Remark = MyCommFun.QueryString("Remark");



            BLL.wx_purchase_base basebll = new BLL.wx_purchase_base();
            Dictionary<string, string> jsonDict = new Dictionary<string, string>();
            BLL.wx_purchase_customer customerbll = new BLL.wx_purchase_customer();
            Model.wx_purchase_customer model = new Model.wx_purchase_customer();
            string openid = MyCommFun.RequestOpenid();  //得到微信用户的openid
            if (_action == "commit")
            { 
                basemodel = basebll.GetModel(id);
                if (basemodel != null)
                { 
                    totalCount = Convert.ToInt32(basemodel.totalCount);
                    limitCount = Convert.ToInt32(basemodel.limitCount);
                    count = totalCount - customerbll.GetRecordAmount(id);//剩余的商品数量
                    yg = customerbll.GetRecordyg(openid, id);  //个人剩余的可购买数量

                    if (shopsPwd == "" && sn == "")
                    {
                        #region    //新增一次消费 
                        if (count < customerNum)
                        {
                            jsonDict.Add("ret", "fail");
                            jsonDict.Add("content", "超过数量!"); 
                            context.Response.Write(MyCommFun.getJsonStr(jsonDict));
                            return;
后面还有 113 行代码,购买后查看完整代码

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

AI 解读

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

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