Esempio n. 1
0
        private void SelectBetList()
        {
            int  pageIndex;
            int  pageSize;
            int  totalCount  = 0;
            bool ispageIndex = int.TryParse(Request.Params["pageIndex"], out pageIndex);

            if (!ispageIndex)
            {
                pageIndex = 1;
            }
            bool ispageSize = int.TryParse(Request.Params["pageSize"], out pageSize);

            if (!ispageSize)
            {
                pageSize = 15;
            }

            try
            {
                var palyRadioCode = -1;
                if (!string.IsNullOrEmpty(Request.Params["palyRadioCode"]))
                {
                    palyRadioCode = Convert.ToInt32(Request.Params["palyRadioCode"]);
                }

                var search = new BetListDTO
                {
                    startTime     = Convert.ToDateTime(Request.Params["startTime"]),
                    endTime       = Convert.ToDateTime(Request.Params["endTime"]),
                    status        = Convert.ToInt32(Request.Params["status"]),
                    tradeType     = Convert.ToInt32(Request.Params["tradeType"]),
                    lotteryCode   = Request.Params["SellotteryCode"],
                    palyRadioCode = palyRadioCode,
                    issueCode     = Request.Params["issueCode"],
                    model         = Convert.ToInt32(Request.Params["model"]),
                    betCode       = Request.Params["betCode"],
                    userAccount   = Request.Params["userAccount"],
                    userType      = Convert.ToInt32(Request.Params["userType"])
                };


                var result = this.mBetDetailService.GetBetListBy(search.startTime, search.endTime, search.status,
                                                                 search.tradeType, search.lotteryCode, search.palyRadioCode, search.issueCode, search.model,
                                                                 search.betCode, search.userAccount, search.userType, this.LoginUserId, pageIndex, pageSize, ref totalCount);
                AppGlobal.RenderResult <List <BetList> >(ApiCode.Success, result, "", pageIndex, totalCount);
            }
            catch (Exception ex)
            {
                Ytg.Scheduler.Comm.LogManager.Error("SelectBetList", ex);
                AppGlobal.RenderResult(ApiCode.Exception);
            }
        }
Esempio n. 2
0
        private void GetNotOpenBetList()
        {
            string lotterycode = Request.Params["lotterycode"];//彩种id

            //var source = this.mBetDetailService.GetNotOpenBetDetail(this.LoginUserId, lotteryId);
            //AppGlobal.RenderResult<List<NotOpenBetDetailDTO>>(ApiCode.Success, source);

            int pageIndex  = 1;
            int pageSize   = 10;
            int totalCount = 0;

            try
            {
                var palyRadioCode = -1;
                var search        = new BetListDTO
                {
                    startTime     = DateTime.Now.AddDays(-1),
                    endTime       = DateTime.Now,
                    status        = -1,                  //Convert.ToInt32(Request.Params["status"]),
                    tradeType     = 2,                   //Convert.ToInt32(Request.Params["tradeType"]),
                    lotteryCode   = lotterycode,         // Request.Params["SellotteryCode"],
                    palyRadioCode = palyRadioCode,
                    issueCode     = "",                  // Request.Params["issueCode"],
                    model         = -1,                  //Convert.ToInt32(Request.Params["model"]),
                    betCode       = "",                  //Request.Params["betCode"],
                    userAccount   = this.LoginUser.Code, //Request.Params["userAccount"],
                    userType      = -1                   //, Convert.ToInt32(Request.Params["userType"])
                };


                var result = this.mBetDetailService.GetBetListBy(search.startTime, search.endTime, search.status,
                                                                 search.tradeType, search.lotteryCode, search.palyRadioCode, search.issueCode, search.model,
                                                                 search.betCode, search.userAccount, search.userType, this.LoginUserId, pageIndex, pageSize, ref totalCount);
                AppGlobal.RenderResult <List <BetList> >(ApiCode.Success, result, "", pageIndex, totalCount);
            }
            catch (Exception ex) { }
        }