コード例 #1
0
        private void BindMemInfo(int MemID)
        {
            Chain.BLL.Mem   bllMem        = new Chain.BLL.Mem();
            Chain.Model.Mem modelMem      = bllMem.GetModel(MemID);
            int             exchangePoint = new Chain.BLL.GiftExchange().GetMemExchangePoint("MemID=" + MemID + " and ExchangeStatus=1");

            this.spMemPointTotal.InnerHtml = (modelMem.MemPoint - exchangePoint).ToString();
        }
コード例 #2
0
        public void ConvertGift()
        {
            int flag = 0;

            try
            {
                string MemWeiXinCard    = this.Request["MemWeiXinCard"];
                int    GiftID           = int.Parse(this.Request["GiftID"]);
                int    Num              = int.Parse(this.Request["Num"]);
                string memAddress       = this.Request["memAddress"];
                string telNumber        = this.Request["telNumber"];
                int    SumExchangePoint = int.Parse(this.Request["SumExchangePoint"]);
                Chain.Model.GiftExchange giftExchange = new Chain.Model.GiftExchange();
                Chain.Model.Mem          mem          = new Chain.BLL.Mem().GetMemByWeiXinCard(MemWeiXinCard);
                giftExchange.MemID             = mem.MemID;
                giftExchange.ExchangeTelePhone = telNumber;
                giftExchange.ExchangeAddress   = memAddress;
                giftExchange.ExchangeAccount   = DateTime.Now.ToString("yyMMddhhmmssffff");
                giftExchange.ExchangeAllNumber = Num;
                giftExchange.ExchangeAllPoint  = SumExchangePoint;
                giftExchange.ApplicationTime   = DateTime.Now;
                giftExchange.ApplicationRemark = "";
                giftExchange.ExchangeType      = 3;
                giftExchange.ExchangeStatus    = 1;
                flag = new Chain.BLL.GiftExchange().Add(giftExchange);
                if (flag > 0)
                {
                    Chain.Model.GiftExchangeDetail giftExchangeDetailModel = new Chain.Model.GiftExchangeDetail();
                    giftExchangeDetailModel.ExchangeID     = flag;
                    giftExchangeDetailModel.ExchangeGiftID = GiftID;
                    giftExchangeDetailModel.ExchangeNumber = Num;
                    giftExchangeDetailModel.ExchangePoint  = new Chain.BLL.PointGift().GetModel(GiftID).GiftExchangePoint *Num;
                    flag = new Chain.BLL.GiftExchangeDetail().Add(giftExchangeDetailModel);
                }
            }
            catch
            {
                flag = 0;
            }
            this.Response.Write(flag);
        }
コード例 #3
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);
        }