Ejemplo n.º 1
0
        public void GetListForPointGift()
        {
            string flag = "";

            try
            {
                int    pageIndex = (this.Request["pageIndex"] == null) ? 2 : int.Parse(this.Request["pageIndex"]);
                int    pageSize  = (this.Request["pageSize"] == null) ? 5 : int.Parse(this.Request["pageSize"]);
                string strWhere  = string.Empty;
                if (PubFunction.curParameter.bolGiftShare)
                {
                    strWhere = "PointGift.GiftClassID=GiftClass.GiftClassID and PointGift.GiftShopID=SysShop.ShopID";
                }
                else
                {
                    strWhere = "PointGift.GiftClassID=GiftClass.GiftClassID and PointGift.GiftShopID=SysShop.ShopID and SysShop.ShopID=1";
                }
                int       count;
                DataTable dt = new Chain.BLL.PointGift().GetListSP(pageSize, pageIndex, false, out count, new string[]
                {
                    strWhere
                }).Tables[0];
                flag = JsonPlus.ToJson(dt, "GiftID,GiftPhoto,GiftName,GiftExchangePoint");
            }
            catch
            {
            }
            this.Response.Write(flag);
        }
Ejemplo n.º 2
0
        public void GetConvertHistory()
        {
            string flag = "";

            try
            {
                int       pageIndex     = (this.Request["pageIndex"] == null) ? 2 : int.Parse(this.Request["pageIndex"]);
                int       pageSize      = (this.Request["pageSize"] == null) ? 5 : int.Parse(this.Request["pageSize"]);
                string    MemWeiXinCard = this.Request["MemWeiXinCard"];
                string    strWhere      = "GiftExchange.MemID=Mem.MemID and MemWeiXinCard='" + MemWeiXinCard + "'";
                int       count;
                DataTable dt = new Chain.BLL.GiftExchange().GetListGiftExchangeSP(pageSize, pageIndex, out count, new string[]
                {
                    strWhere
                }).Tables[0];
                flag = JsonPlus.ToJson(dt, "ExchangeAccount,ExchangeAllNumber,ExchangeAllPoint,ExchangeStatus,ExchangeRemark,ApplicationTime,ExchangeID");
            }
            catch
            {
            }
            this.Response.Write(flag);
        }
Ejemplo n.º 3
0
        public void GetPointChange()
        {
            string flag = "";

            try
            {
                int       pageIndex     = (this.Request["pageIndex"] == null) ? 2 : int.Parse(this.Request["pageIndex"]);
                int       pageSize      = (this.Request["pageSize"] == null) ? 5 : int.Parse(this.Request["pageSize"]);
                string    MemWeiXinCard = this.Request["MemWeiXinCard"];
                string    strWhere      = "MemWeiXinCard='" + MemWeiXinCard + "' and PointLog.PointShopID = SysShop.ShopID and PointLog.PointMemID = Mem.MemID and Mem.MemLevelID=MemLevel.LevelID and PointLog.PointUserID = SysUser.UserID";
                int       count;
                DataTable dt = new Chain.BLL.PointLog().GetListSP(pageSize, pageIndex, out count, new string[]
                {
                    strWhere
                }).Tables[0];
                flag = JsonPlus.ToJson(dt, "PointNumber,PointRemark,PointCreateTime");
            }
            catch
            {
            }
            this.Response.Write(flag);
        }
Ejemplo n.º 4
0
        public void GetExpense()
        {
            string flag = "";

            try
            {
                int       pageIndex     = (this.Request["pageIndex"] == null) ? 2 : int.Parse(this.Request["pageIndex"]);
                int       pageSize      = (this.Request["pageSize"] == null) ? 5 : int.Parse(this.Request["pageSize"]);
                string    MemWeiXinCard = this.Request["MemWeiXinCard"];
                string    strWhere      = "MemWeiXinCard='" + MemWeiXinCard + "'";
                int       count;
                DataTable dt = new Chain.BLL.Mem().GetMemExpenseToWeiXin(pageSize, pageIndex, out count, new string[]
                {
                    strWhere
                }).Tables[0];
                flag = JsonPlus.ToJson(dt, "OrderAccount,OrderTotalMoney,OrderDiscountMoney,OrderPayCoupon,OrderPoint,OrderCreateTime");
            }
            catch
            {
            }
            this.Response.Write(flag);
        }
Ejemplo n.º 5
0
        public void GetRecharge()
        {
            string flag = "";

            try
            {
                int       pageIndex     = (this.Request["pageIndex"] == null) ? 2 : int.Parse(this.Request["pageIndex"]);
                int       pageSize      = (this.Request["pageSize"] == null) ? 5 : int.Parse(this.Request["pageSize"]);
                string    MemWeiXinCard = this.Request["MemWeiXinCard"];
                string    strWhere      = "MemWeiXinCard='" + MemWeiXinCard + "' and MemRecharge.RechargeShopID = SysShop.ShopID and MemRecharge.RechargeMemID = Mem.MemID and Mem.MemLevelID=MemLevel.LevelID and MemRecharge.RechargeUserID = SysUser.UserID";
                int       count;
                DataTable dt = new Chain.BLL.MemRecharge().GetListSP(pageSize, pageIndex, out count, new string[]
                {
                    strWhere
                }).Tables[0];
                flag = JsonPlus.ToJson(dt, "RechargeType,RechargeAccount,RechargeMoney,RechargeOrdMoney,RechargeGive,RechargeCreateTime");
            }
            catch
            {
            }
            this.Response.Write(flag);
        }
Ejemplo n.º 6
0
 public void GetLevel()
 {
     try
     {
         HttpContext.Current.Response.ContentType = "application/json;charset=utf-8";
         string jsonCallBackFunName = string.Empty;
         jsonCallBackFunName = HttpContext.Current.Request.Params["callback"].ToString();
         Chain.BLL.MemLevel          bll       = new Chain.BLL.MemLevel();
         List <Chain.Model.MemLevel> listLevel = bll.GetLevelList("");
         StringBuilder sb      = new StringBuilder();
         string[]      strList = new string[listLevel.Count];
         for (int i = 0; i < listLevel.Count; i++)
         {
             strList[i] = JsonPlus.ToJson(listLevel[i]);
             if (0 == i)
             {
                 sb.AppendFormat("{0}\":{1}", "{\"" + i, strList[i] + "}");
             }
             else
             {
                 sb.AppendFormat(",{0}\":{1}", "{\"" + i, strList[i] + "}");
             }
         }
         if (listLevel.Count > 1)
         {
             HttpContext.Current.Response.Write(jsonCallBackFunName + "([" + sb.ToString() + "])");
         }
         else
         {
             HttpContext.Current.Response.Write(jsonCallBackFunName + "(" + sb.ToString() + ")");
         }
     }
     catch
     {
     }
 }