Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["aspx_zjPwd"] == null)
     {
         this.panel.Visible    = false;
         this.panelPwd.Visible = true;
     }
     else
     {
         this.panel.Visible    = true;
         this.panelPwd.Visible = false;
         panelSc.Visible       = true;
     }
     if (!IsPostBack)
     {
         //验证是否设置资金密码
         ISysUserBalanceService userBananceService = IoC.Resolve <ISysUserBalanceService>();
         var userBalance = userBananceService.GetUserBalance(this.CookUserInfo.Id);
         if (null == userBalance || string.IsNullOrEmpty(userBalance.Pwd))
         {
             Response.Redirect("/wap/users/mine/setTransPwd.html");
             return;
         }
     }
 }
        public static bool ManagerRecharge(decimal tradeAmt, int userid)
        {
            double             bili           = 5;
            ISysSettingService settingService = IoC.Resolve <ISysSettingService>();
            var fs = settingService.GetAll().Where(x => x.Key == "chongzhiBili").FirstOrDefault();

            if (null != fs)
            {
                if (!double.TryParse(fs.Value, out bili))
                {
                    bili = 5;
                }
            }
            ISysUserService        userServices       = IoC.Resolve <ISysUserService>();
            ISysUserBalanceService userBalanceService = IoC.Resolve <ISysUserBalanceService>();
            var balance = userBalanceService.GetUserBalance(userid);//获取当前用户余额

            var minOutMonery = ((tradeAmt + balance.UserAmt) * (decimal)(bili / 100));

            if (userServices.UpdateUserMinMinBettingMoney(userid, minOutMonery) > 0)
            {
                //更新用户提款流水要求
                return(true);
            }
            return(false);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     //if (Session["aspx_zjPwd"] == null)
     //{
     //    this.panel.Visible = false;
     //    this.panelPwd.Visible = true;
     //}
     //else
     //{
     this.panel.Visible    = true;
     this.panelPwd.Visible = false;
     panelSc.Visible       = true;
     //}
     if (!IsPostBack)
     {
         //验证是否设置资金密码
         ISysUserBalanceService userBananceService = IoC.Resolve <ISysUserBalanceService>();
         var userBalance = userBananceService.GetUserBalance(this.CookUserInfo.Id);
         if (null == userBalance || string.IsNullOrEmpty(userBalance.Pwd))
         {
             Response.Redirect("/Views/Users/UpdatePwd.aspx?zj=xx");
             return;
         }
     }
 }
Ejemplo n.º 4
0
        /// <summary>
        /// 撤销投注
        /// </summary>
        /// <param name="betcode"></param>
        private void CannelBettNum(string betcode)
        {
            if (string.IsNullOrEmpty(betcode))
            {
                AppGlobal.RenderResult(ApiCode.Fail);
                return;
            }
            IBetDetailService betDetailService = IoC.Resolve <IBetDetailService>();
            //验证请求参数是否正确
            var fs = betDetailService.Where(item => item.BetCode == betcode).FirstOrDefault();

            if (null == fs)
            {
                AppGlobal.RenderResult(ApiCode.Fail);
                return;
            }
            //撤单处理
            fs.Stauts = BetResultType.SysCancel;
            betDetailService.Save();

            //返还金额
            ISysUserBalanceService sysUserBalanceService = IoC.Resolve <ISysUserBalanceService>();
            var details = new SysUserBalanceDetail()
            {
                RelevanceNo = fs.BetCode,
                SerialNo    = "b" + Utils.BuilderNum(),
                Status      = 0,
                TradeAmt    = fs.TotalAmt,
                TradeType   = TradeType.撤单返款,
                UserId      = fs.UserId
            };

            sysUserBalanceService.UpdateUserBalance(details, fs.TotalAmt);
        }
Ejemplo n.º 5
0
        public bool CreateUser(SysUser item)
        {
            if (null == item)
            {
                return(false);
            }
            this.Create(item);
            this.Save();
            //初始化用户余额
            ISysUserBalanceService userbalance = IoC.Resolve <ISysUserBalanceService>();

            userbalance.Create(new SysUserBalance()
            {
                IsOpenVip = false,
                OccDate   = DateTime.Now,
                Status    = 0,
                UserAmt   = 0,
                UserId    = item.Id,
            });
            userbalance.Save();

            ISysQuotaService quotaService = IoC.Resolve <ISysQuotaService>();

            if (item.UserType == UserType.BasicProy)//总代配合初始化
            {
                quotaService.InintPrxyQuota(item);
            }
            else if (item.UserType == UserType.Proxy)//普通代理配合设置基本上多为零
            {
                quotaService.InintPrxyQuota(item, 0);
            }

            return(true);
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                var loginUserid = this.CookUserInfo.Id;

                ISysUserBalanceService userBananceService = IoC.Resolve <ISysUserBalanceService>();
                var userBalance = userBananceService.GetUserBalance(loginUserid);
                if (null == userBalance)
                {
                    return;
                }
                if (string.IsNullOrEmpty(userBalance.Pwd))
                {
                    oldzjPwd.Visible  = false;
                    nonwZiPwd.Visible = true;
                    showAl            = 1;
                    UpdateZiJinPwd    = "selected";
                    UpdateUserTable   = "display:none;";
                }
                else
                {
                    UpdateUserPwd    = "selected";
                    UpdateZiJinTable = "display:none;";
                }
            }
        }
        protected void btnVd_Click(object sender, EventArgs e)
        {
            string pwd = this.oldpwd.Text.Trim();

            if (string.IsNullOrEmpty(pwd))
            {
                Alert("请输入资金密码!");
                return;
            }
            ISysUserBalanceService sysUserBalanceService = IoC.Resolve <ISysUserBalanceService>();
            var fig = sysUserBalanceService.VdUserBalancePwd(this.CookUserInfo.Id, pwd);

            if (fig)
            {
                //验证成功
                Session["aspx_zjPwd"] = "ZJMM";
                this.panel.Visible    = true;
                this.panelPwd.Visible = false;
                panelSc.Visible       = true;
            }
            else
            {
                //验证失败
                Session["aspx_zjPwd"] = null;
                Alert("密码错误!");
                this.panel.Visible    = false;
                this.panelPwd.Visible = true;
            }
        }
Ejemplo n.º 8
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            //锁定
            string password = this.txtpwd.Text.Trim();

            if (string.IsNullOrEmpty(password))
            {
                Alert("请输入资金密码!");
                return;
            }
            ISysUserService        mSysUserService        = IoC.Resolve <ISysUserService>();
            ISysUserBalanceService mSysUserBalanceService = IoC.Resolve <ISysUserBalanceService>();

            //验证资金密码
            if (!mSysUserBalanceService.VdUserBalancePwd(CookUserInfo.Id, password))
            {
                Alert("资金密码验证失败!");
                return;
            }
            //修改为锁定
            if (mSysUserService.LockUserCards(this.CookUserInfo.Id))
            {
                //关闭窗口
                Response.Write("<script>parent.window.location.href = '/Views/Users/BindBankCard.aspx?dt=" + DateTime.Now.ToString() + "';</script>");
            }
            else
            {
                Alert("锁定失败,请稍后重试!");
                return;
            }
        }
Ejemplo n.º 9
0
        private void BindData()
        {
            int uid;

            if (!int.TryParse(Request.Params["id"], out uid))
            {
                Response.End();
                return;
            }
            //获取当前用户信息
            ISysUserService userService = IoC.Resolve <ISysUserService>();
            var             inuser      = userService.Get(uid);

            if (inuser == null)
            {
                Response.End();
                return;
            }
            this.lbInCode.Text = inuser.Code;

            ISysUserBalanceService userBalance = IoC.Resolve <ISysUserBalanceService>();
            var value = userBalance.GetUserBalance(this.CookUserInfo.Id);

            if (null == value || value.UserAmt < 10)
            {
                //Alert("您的余额不够");
                return;
            }
            this.lbMonery.Text = value.UserAmt.ToString();
        }
Ejemplo n.º 10
0
        public int BaseMaxMonery = 100000;//总代可充值10w

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //验证是否设置资金密码
                ISysUserBalanceService userBananceService = IoC.Resolve <ISysUserBalanceService>();
                var userBalance = userBananceService.GetUserBalance(this.CookUserInfo.Id);
                if (null == userBalance || string.IsNullOrEmpty(userBalance.Pwd))
                {
                    //Response.Redirect("/Views/Users/UpdatePwd.aspx?zj=xx");
                    //Response.Write();
                    ClientScript.RegisterStartupScript(this.GetType(), "change_postion", "parent.window.location='/Views/Users/UpdatePwd.aspx?zj=xx';", true);
                    // return;
                }
                this.BindData();
                if (CookUserInfo.UserType == BasicModel.UserType.BasicProy || CookUserInfo.UserType == BasicModel.UserType.Main)
                {
                    //总代/主管可以设置充值分红类型
                    PanelType.Visible = true;
                    BaseMaxMonery     = 100000;
                }
                else
                {
                    BaseMaxMonery = 10000;
                }
                spanEnd.InnerText = BaseMaxMonery.ToString();//充值限额为10w
            }
        }
Ejemplo n.º 11
0
        private void Undo()
        {
            string id       = Request.Params["betCode"];
            string catchNum = Request.Params["catchNum"];

            if (!string.IsNullOrEmpty(id))
            {
                ISysUserBalanceService userBanceService = IoC.Resolve <ISysUserBalanceService>();
                if (userBanceService.Cannel(id))
                {
                    AppGlobal.RenderResult(ApiCode.Success, "");
                }
                else
                {
                    AppGlobal.RenderResult(ApiCode.Success, "");
                }

                //修改当前内容为系统撤单
                if (id.ToLower().StartsWith("i"))
                {
                    //追号
                    this.CannelCatchNum(catchNum, id);
                }
                else
                {
                    //投注
                    this.CannelBettNum(id);
                }
            }
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 终止追号
        /// </summary>
        private void CannelCatchNum(string catchNum, string catchNumIssueCode)
        {
            ISysCatchNumService      sysCatchNumService      = IoC.Resolve <ISysCatchNumService>();
            ISysCatchNumIssueService sysCatchNumIssueService = IoC.Resolve <ISysCatchNumIssueService>();
            //验证当前单号是否正在进行
            var fs = sysCatchNumService.Where(item => item.CatchNumCode == catchNum).FirstOrDefault();

            if (fs == null)
            {
                //非法撤单
                AppGlobal.RenderResult(ApiCode.Fail);
                return;
            }
            //获取注单详情
            var source = sysCatchNumIssueService.GetCatchIssue(catchNum);

            //获取用户余额
            CatchNumIssue catchNumIssue = null;
            int           noCannelCount = 0;

            foreach (var item in source)
            {
                //未开奖的状态才允许撤单
                if (catchNumIssueCode == item.CatchNumIssueCode)
                {
                    fs.UserCannelIssue++;
                    fs.UserCannelMonery += item.TotalAmt;
                    item.Stauts          = BetResultType.SysCancel; //对本注进行撤单
                    catchNumIssue        = item;
                }
                if (item.Stauts == BetResultType.NotOpen)
                {
                    noCannelCount++;
                }
            }
            //撤单
            sysCatchNumIssueService.Save();
            if (noCannelCount <= 0) //全部撤销
            {
                sysCatchNumService.CannelCatch(catchNum);
            }
            sysCatchNumService.Save();

            //返还金额
            if (catchNumIssue != null)
            {
                ISysUserBalanceService sysUserBalanceService = IoC.Resolve <ISysUserBalanceService>();
                var details = new SysUserBalanceDetail()
                {
                    RelevanceNo = catchNumIssue.CatchNumIssueCode,
                    SerialNo    = "b" + Utils.BuilderNum(),
                    Status      = 0,
                    TradeAmt    = catchNumIssue.TotalAmt,
                    TradeType   = TradeType.追号返款,
                    UserId      = fs.UserId
                };
                sysUserBalanceService.UpdateUserBalance(details, catchNumIssue.TotalAmt);
            }
        }
        private ISysUserBalanceDetailService mSysUserBalanceDetailService; //用户余额明细

        public RebateHelper(ISysUserService sysUserService,
                            ISysUserBalanceService sysUserBalanceService,
                            ISysUserBalanceDetailService sysUserBalanceDetailService)
        {
            this.mSysUserService              = sysUserService;
            this.mSysUserBalanceService       = sysUserBalanceService;
            this.mSysUserBalanceDetailService = sysUserBalanceDetailService;
        }
 public MarketRequestManager(ISysUserBalanceDetailService sysUserBalanceDetailService,
                             ISysUserBalanceService sysUserBalanceService,
                             IMarketService marketService)
 {
     mSysUserBalanceService       = sysUserBalanceService;
     mSysUserBalanceDetailService = sysUserBalanceDetailService;
     mMarketService = marketService;
 }
        //开始抽奖
        private string ExRotate()
        {
            string result = "-1";
            ILargeRotaryService mLargeRotaryService = IoC.Resolve <ILargeRotaryService>();
            var item      = mLargeRotaryService.GetNowItem(CookUserInfo.Id);
            int lastCount = 0;

            if (item == null ||
                item.SubCount >= item.ALlCount)
            {
                result = "-1,0,0";//已经没有抽奖的次数了
            }
            else
            {
                //插入一次
                item.SubCount += 1;
                mLargeRotaryService.Save();//保存
                lastCount = item.ALlCount - item.SubCount;
                //抽奖结果
                var iawards = Awards();
                if (iawards.Name != None.ToString())
                {
                    var monery = GetMonery(iawards.Name);
                    //存入账号

                    var details = new BasicModel.SysUserBalanceDetail()
                    {
                        RelevanceNo = CookUserInfo.Id.ToString(),
                        SerialNo    = "q" + Utils.BuilderNum(),
                        Status      = 0,
                        TradeAmt    = monery,
                        TradeType   = BasicModel.TradeType.幸运大转盘,
                        UserId      = CookUserInfo.Id
                    };

                    //奖励金额
                    ISysUserBalanceService userBalanceServices = IoC.Resolve <ISysUserBalanceService>();

                    if (userBalanceServices.UpdateUserBalance(details, monery) > 0)
                    {
                    }
                    result = "1," + iawards.Name + "," + lastCount;
                }
                else
                {
                    result = "0,0," + lastCount;//未中奖
                }
            }
            return(result + "," + lastCount);
        }
Ejemplo n.º 16
0
        private void BindData()
        {
            int uid;

            if (!int.TryParse(Request.Params["uid"], out uid))
            {
                Response.End();
                return;
            }

            ISysUserService userServices = IoC.Resolve <ISysUserService>();
            var             user         = userServices.Get(uid);

            if (null == user)
            {
                Response.End();
                return;
            }
            var userCookieUser = new CookUserInfo()
            {
                PlayType = user.PlayType
            };

            var maxRemo = Math.Round((Utils.GetMaxRemo(userCookieUser) - user.Rebate), 1);

            this.lbUser.Text  = user.Code;
            this.lbLevel.Text = maxRemo.ToString();
            //获取用户余额
            ISysUserBalanceService userBalances = IoC.Resolve <ISysUserBalanceService>();

            lbMonery.Text = userBalances.GetUserBalance(uid).UserAmt.ToString();

            if (user.Rebate <= CookUserInfo.Rebate)
            {
                Label1.Text = user.Code;
                Label2.Text = lbMonery.Text;
                Label3.Text = this.lbLevel.Text;
                us.Visible  = true;
                ct.Visible  = false;
                return;
            }

            //获取上级级最大配额
            var parentmaxRemo = userServices.GetParentMaxRebate(uid);

            lbChildMax.Text = parentmaxRemo == -1 ? "0.0" : Math.Round(Utils.GetMaxRemo(userCookieUser) - parentmaxRemo.Value, 1).ToString();

            BuilderNowQuotaHtml(userCookieUser);
            InintRemo(maxRemo, parentmaxRemo.Value, userCookieUser);
        }
Ejemplo n.º 17
0
        public decimal GetUserBalance()
        {
            if (CookUserInfo == null)
            {
                return(0);
            }
            ISysUserBalanceService balanceService = IoC.Resolve <ISysUserBalanceService>();
            var item = balanceService.GetUserBalance(CookUserInfo.Id);

            if (item.UserAmt >= 0)
            {
                return(item.UserAmt);
            }
            return(0);
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="sysUserService"></param>
 /// <param name="sysQuotaService"></param>
 /// <param name="sysUserBalanceService"></param>
 /// <param name="sysQuotaDetailService"></param>
 /// <param name="sysUserBalanceDetailService"></param>
 /// <param name="sysSettingService"></param>
 public UsersRequestManager(ISysUserService sysUserService,
                            ISysQuotaService sysQuotaService,
                            ISysUserBalanceService sysUserBalanceService,
                            ISysQuotaDetailService sysQuotaDetailService,
                            ISysUserBalanceDetailService sysUserBalanceDetailService, ISysSettingService sysSettingService,
                            IBetDetailService betDetailService)
 {
     this.mSysUserService              = sysUserService;
     this.mSysQuotaService             = sysQuotaService;
     this.mSysUserBalanceService       = sysUserBalanceService;
     this.mSysQuotaDetailService       = sysQuotaDetailService;
     this.mSysUserBalanceDetailService = sysUserBalanceDetailService;
     this.mSysSettingService           = sysSettingService;
     this.mBetDetailService            = betDetailService;
 }
        /// <summary>
        /// 充值金额,  当天第一次充值
        /// </summary>
        /// <param name="userAmt"></param>
        /// <returns></returns>
        public static bool ManagerSend(decimal userAmt, int userid, string relevanceNo)
        {
            //验证当天是否领取过充值奖励
            ISendHisterService sendHisterService = IoC.Resolve <ISendHisterService>();

            if (sendHisterService.Where(x => x.OccDay == Convert.ToInt32(DateTime.Now.ToString("yyyyMMdd"))).Count() > 0)
            {
                return(false);
            }
            ISysUserBalanceService balanceService = IoC.Resolve <ISysUserBalanceService>(); //用户余额

            var activityMonery = RechargeConfig.AppendMonery(userAmt);                      //充值活动;

            if (activityMonery > 0)
            {
                //创建活动账变
                balanceService.UpdateUserBalance(new SysUserBalanceDetail()
                {
                    BankId      = -1,
                    RelevanceNo = relevanceNo,
                    SerialNo    = "d" + Utils.BuilderNum(),
                    Status      = 0,
                    TradeAmt    = activityMonery,
                    TradeType   = Ytg.BasicModel.TradeType.充值活动,
                    UserAmt     = activityMonery,
                    UserId      = userid,
                }, activityMonery);

                //更新用户提款流水要求 赠送金额 10 倍流水
                decimal         bili         = 8;
                ISysUserService userServices = IoC.Resolve <ISysUserService>();
                decimal         minOutMonery = (activityMonery + userAmt) * bili;
                if (userServices.UpdateUserMinMinBettingMoney(userid, minOutMonery) > 0)
                {
                    //更新用户提款流水要求
                    sendHisterService.Create(new SendHister()
                    {
                        OccDate = DateTime.Now,
                        OccDay  = Convert.ToInt32(DateTime.Now.ToString("yyyyMMdd")),
                        UserId  = userid
                    });
                    sendHisterService.Save();
                    return(true);
                }
            }

            return(false);
        }
        //资金
        protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
        {
            var chk = (sender as CheckBox);
            int id  = Convert.ToInt32(chk.ToolTip);
            ISysUserBalanceService userService = IoC.Resolve <ISysUserBalanceService>();

            if (chk.Checked)//禁用
            {
                userService.Frozen(id);
            }
            else
            {
                userService.UnFrozen(id);
            }
            this.BindList();
        }
Ejemplo n.º 21
0
        public decimal Max = 50000; //充值最大值

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //验证是否设置资金密码
                ISysUserBalanceService userBananceService = IoC.Resolve <ISysUserBalanceService>();
                var userBalance = userBananceService.GetUserBalance(this.CookUserInfo.Id);
                if (null == userBalance || string.IsNullOrEmpty(userBalance.Pwd))
                {
                    Response.Redirect("/Views/Users/UpdatePwd.aspx?zj=xx");
                    return;
                }

                this.InintSettings();
            }
        }
 public BankRequestManager(ISysBankTransferService sysBankTransferService,
                           ICompanyBankService companyBankService,
                           ISysUserBankService sysUserBankService,
                           ISysBankType sysBankTypeService,
                           IVipMentionApplyService vipMentionApplyService,
                           ISysUserService sysUserService,
                           ISysUserBalanceService sysUserBalanceService, IMentionQueusService mentionQueusService)
 {
     this.mSysBankTransferService = sysBankTransferService;
     this.mCompanyBankService     = companyBankService;
     this.mSysUserBankService     = sysUserBankService;
     this.mSysBankTypeService     = sysBankTypeService;
     this.mVipMentionApplyService = vipMentionApplyService;
     this.mSysUserService         = sysUserService;
     this.mSysUserBalanceService  = sysUserBalanceService;
     this.mMentionQueusService    = mentionQueusService;
 }
        //开始抽奖
        private string ExRotate()
        {
            string result = "";
            //验证今天是否签到
            ISignService signServices = IoC.Resolve <ISignService>();
            //查询今天是否已经签到过
            int occday = Convert.ToInt32(DateTime.Now.ToString("yyyyMMdd"));
            var fs     = signServices.Where(c => c.Uid == CookUserInfo.Id && c.OccDay == occday).FirstOrDefault();

            if (fs != null)
            {
                if (fs.IsDap)
                {
                    return(result = "-3,0,0");//已经抽过了
                }
                fs.IsDap = true;
                signServices.Save();                           //存储状态
                var iawards = Awards();
                var monery  = Convert.ToDecimal(iawards.Name); //抽取的金额 //RechargeConfig.LotteryLevelMonery(Convert.ToInt32(iawards.Name));
                //存入账号

                var details = new BasicModel.SysUserBalanceDetail()
                {
                    RelevanceNo = CookUserInfo.Id.ToString(),
                    SerialNo    = "q" + Utils.BuilderNum(),
                    Status      = 0,
                    TradeAmt    = monery,
                    TradeType   = BasicModel.TradeType.幸运大转盘,
                    UserId      = CookUserInfo.Id
                };

                //奖励金额
                ISysUserBalanceService userBalanceServices = IoC.Resolve <ISysUserBalanceService>();

                if (userBalanceServices.UpdateUserBalance(details, monery) > 0)
                {
                }
                result = "1," + iawards.Name + "," + 0;
            }
            else
            {
                //今天没签到呢
                result = "-1,0,0";//已经没有抽奖的次数了
            }
            return(result + ",0");
        }
Ejemplo n.º 24
0
        private RebateHelper mRebateHelper = null;                          //返点辅助


        public BetDetailRequestManager(IBetDetailService betDetailService,
                                       ISysUserService sysUserService,
                                       ISysUserBalanceService sysUserBalanceService,
                                       ISysUserBalanceDetailService sysUserBalanceDetailService,
                                       ISysCatchNumService sysCatchNumService,
                                       ISysCatchNumIssueService sysCatchNumIssueService,
                                       ILotteryIssueService lotteryIssueService,
                                       IPlayTypeRadioService playTypeRadioService)
        {
            this.mBetDetailService            = betDetailService;
            this.mSysUserService              = sysUserService;
            this.mSysUserBalanceService       = sysUserBalanceService;
            this.mSysUserBalanceDetailService = sysUserBalanceDetailService;
            this.mSysCatchNumService          = sysCatchNumService;
            this.mSysCatchNumIssueService     = sysCatchNumIssueService;
            this.mLotteryIssueService         = lotteryIssueService;
            this.mPlayTypeRadioService        = playTypeRadioService;

            this.mRebateHelper = new RebateHelper(this.mSysUserService, this.mSysUserBalanceService, this.mSysUserBalanceDetailService);
        }
 public InitialRequestManager(ISysUserService sysUserService,
                              ISysUserBalanceService sysUserBalanceService,
                              ISysUserBalanceDetailService SysUserBalanceDetailService,
                              INewsService newsService, IHotLotteryService hotLotteryService,
                              IBannerService bannerService, IMarketService marketservice,
                              ISysQuotaService sysQuotaService,
                              ISysSettingService sysSettingService,
                              ILockIpInfoService lockIpInfoService,
                              ILotteryIssueService lotteryIssueService)
 {
     this.mSysUserService              = sysUserService;
     this.mSysUserBalanceService       = sysUserBalanceService;
     this.mSysUserBalanceDetailService = SysUserBalanceDetailService;
     this.mNewsService         = newsService;
     this.mHotLotteryService   = hotLotteryService;
     this.mBannerService       = bannerService;
     this.mMarketService       = marketservice;
     this.mSysQuotaService     = sysQuotaService;
     this.mSysSettingService   = sysSettingService;
     this.mLockIpInfoService   = lockIpInfoService;
     this.mLotteryIssueService = lotteryIssueService;
 }
        ISysQuotaService mSysQuotaService;//配额
        protected void Page_Load(object sender, EventArgs e)
        {
            mSysUserService              = IoC.Resolve <ISysUserService>();
            mSysSettingService           = IoC.Resolve <ISysSettingService>();
            mSysUserBalanceService       = IoC.Resolve <ISysUserBalanceService>();
            mSysUserBalanceDetailService = IoC.Resolve <ISysUserBalanceDetailService>();
            mSysQuotaService             = IoC.Resolve <ISysQuotaService>();


            var path = Server.MapPath("~/cd/80000.txt");

            using (var st = System.IO.File.OpenText(path))
            {
                while (!st.EndOfStream)
                {
                    string code = st.ReadLine().Trim();
                    //13648
                    //13806
                    regist(code, code, 5521);
                }
            }
        }
        protected void btnMe_Click(object sender, EventArgs e)
        {
            if (CookUserInfo.Rebate != 0 || CookUserInfo.Rebate != 0.1)
            {
                Response.End();
                return;
            }

            int     betUserCount = 0;
            var     bettMonery   = GetM(ref betUserCount);
            decimal dm           = Convert.ToDecimal(bettMonery);

            if (dm > 0)
            {
                //插入工资
                //插入账变
                //存入账号
                var details = new BasicModel.SysUserBalanceDetail()
                {
                    RelevanceNo = CookUserInfo.Id.ToString(),
                    SerialNo    = "q" + Utils.BuilderNum(),
                    Status      = 0,
                    TradeAmt    = dm,
                    TradeType   = BasicModel.TradeType.分红,
                    UserId      = CookUserInfo.Id
                };

                //奖励金额
                ISysUserBalanceService userBalanceServices = IoC.Resolve <ISysUserBalanceService>();
                if (userBalanceServices.UpdateUserBalance(details, dm) > 0)
                {
                    ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script type=\"text/javascript\">$.alert('领取日工资成功!');</script>");
                    return;
                }
            }

            ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script type=\"text/javascript\">$.alert('领取日工资失败,请稍后再试!');</script>");
        }
Ejemplo n.º 28
0
        protected void btnChangeZij_Click(object sender, EventArgs e)
        {
            //修改资金密码
            if (string.IsNullOrEmpty(this.txtCode.Text.Trim()))
            {
                return;
            }
            if (string.IsNullOrEmpty(this.txtZiJPwd.Text.Trim()))
            {
                JsAlert("请填写资金密码!");
                return;
            }
            if (this.txtZiJPwd.Text.Trim() != this.txtZiJRePwd.Text.Trim())
            {
                JsAlert("两次资金密码不一致!");
                return;
            }

            ISysUserBalanceService userService = IoC.Resolve <ISysUserBalanceService>();
            ISysUserService        users       = IoC.Resolve <ISysUserService>();
            var uinfo = users.Get(this.txtCode.Text.Trim());

            if (uinfo == null)
            {
                JsAlert("非法请求");
            }

            if (userService.UpdateManUserBalancePwd(uinfo.Id, this.txtZiJPwd.Text.Trim()))
            {
                JsAlert("登陆密码修改成功!");
            }
            else
            {
                JsAlert("登陆密码修改失败!");
            }
        }
Ejemplo n.º 29
0
        protected void btnMe_Click(object sender, EventArgs e)
        {
            if (this.Master != null)
            {
                UserAmt = (this.Master as lotterySite).GetUserBalance();
            }

            if (!Utils.HasAvtivityDateTimes())
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script type=\"text/javascript\">$.alert('活动时间为每日07:30:00 – 次日凌晨02:00:00!');</script>");
                return;
            }
            //验证当天是否领取过礼包
            int occDay = Utils.GetActivityOccDay();
            ILargeRotaryService mLargeRotaryService = IoC.Resolve <ILargeRotaryService>();
            var fst = mLargeRotaryService.Where(x => x.ALlCount == occDay && x.Uid == CookUserInfo.Id).FirstOrDefault();

            if (fst != null)
            {
                Alert("今天已经领取过礼包了,明天再来吧!");
                return;
            }
            DateTime beginDate = Utils.GetNowBeginDate().AddDays(-1);
            DateTime endDate   = beginDate.AddDays(1);

            //获取用户当日有效投注量
            IBetDetailService detailService = IoC.Resolve <IBetDetailService>();
            var monery = detailService.GetUserBettMonery(this.CookUserInfo.Id, beginDate, endDate);

            if (monery <= 0)
            {
                Alert("没有可领取的礼包,投注未达标!");
                return;
            }
            var dm = GetMonery(monery);

            if (dm <= 0)
            {
                Alert("没有可领取的礼包,投注未达标!");
                return;
            }
            //插入账变
            //存入账号
            var details = new BasicModel.SysUserBalanceDetail()
            {
                RelevanceNo = CookUserInfo.Id.ToString(),
                SerialNo    = "q" + Utils.BuilderNum(),
                Status      = 0,
                TradeAmt    = dm,
                TradeType   = BasicModel.TradeType.投注送礼包,
                UserId      = CookUserInfo.Id
            };

            //奖励金额
            ISysUserBalanceService userBalanceServices = IoC.Resolve <ISysUserBalanceService>();

            if (userBalanceServices.UpdateUserBalance(details, dm) > 0)
            {
                string message = "领取礼包成功,领取金额为:" + dm + "<br/>";
                message += "昨日投注金额" + string.Format("{0:N2}", monery) + "<br>";
                message += "感谢你的参与,祝你游戏愉快!";
                ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script type=\"text/javascript\">$.alert(\"" + message + "\",1,function(){refchangemonery();});</script>");

                //添加领取记录
                mLargeRotaryService.Create(new BasicModel.LargeRotary()
                {
                    Uid      = CookUserInfo.Id,
                    ALlCount = Utils.GetActivityOccDay()
                });
                mLargeRotaryService.Save();
                isautoRefbanner = false;
            }
            else
            {
                Alert("礼包领取失败,请稍后再试!");
            }
        }
Ejemplo n.º 30
0
        protected void btnSummit_Click(object sender, EventArgs e)
        {
            //
            if (!IsShoping())
            {
                Alert("提现时间为早上 10:00 至 次日凌晨0:00!");
                return;
            }

            ISysUserBankService userBankServices = IoC.Resolve <ISysUserBankService>();
            var resctResult = userBankServices.SelectMentionBank(CookUserInfo.Id);
            var resct       = resctResult.FirstOrDefault();

            if (resct != null && resct.MentionCount >= 5)
            {
                Alert("今天您已经成功发起了" + resct.MentionCount + "次提现申请,提现失败!");
                return;
            }



            decimal outmonery;
            string  pwd      = this.txtPwd.Text.Trim();
            string  selValue = this.drpCards.SelectedValue;

            if (!decimal.TryParse(this.txtoutMonery.Text.Trim(), out outmonery) ||
                string.IsNullOrEmpty(pwd) ||
                string.IsNullOrEmpty(selValue))
            {
                Alert("参数验证错误!");
                return;
            }
            /**验证卡绑定时间*/
            foreach (var yh in resctResult)
            {
                string value = yh.Id + "," + yh.MinAmt + "," + yh.MaxAmt;
                if (value == selValue)
                {
                    //判断卡绑定时间
                    if (DateTime.Now.Subtract(yh.OccDate).TotalHours < 2)
                    {
                        Alert("银行卡绑定时间未达2小时,暂不允许提现!");
                        return;
                    }
                }
            }
            /*验证卡绑定时间**/
            var array = selValue.Split(',');
            int bankId;

            if (!int.TryParse(array[0], out bankId))
            {
                Alert("参数错误!");
                return;
            }
            ISysUserService userService = IoC.Resolve <ISysUserService>();
            var             iser        = userService.GetUserAndZiJin(this.CookUserInfo.Id);

            if (iser == null || iser.IsDelete || iser.Status == 1)
            {
                Alert("资金禁用");
                return;
            }
            ISysUserBalanceService sysUserBalanceService = IoC.Resolve <ISysUserBalanceService>();
            int state = sysUserBalanceService.HasMention(CookUserInfo.Id, outmonery);

            if (state == 0)
            {
                if (!sysUserBalanceService.VdUserBalancePwd(CookUserInfo.Id, pwd))//验证资金密码失败
                {
                    Alert("资金密码错误!");
                    return;
                }
            }
            else
            {
                //1为用户余额不够本次提款 3 流水未达到提款要求
                if (state == 1)
                {
                    Alert("可提款余额不够本次提款!");
                }
                else if (state == 3)
                {
                    Alert("投注金额未达到提款要求,无法提款!");
                }
                else if (state == -1)
                {
                    Alert("提款申请失败,请联系在线客服");
                }
                return;
            }

            try
            {
                var    result = userBankServices.SubmitMention(bankId, outmonery, CookUserInfo.Id);
                string msg    = "提现申请成功";
                string refurl = "";
                if (result == -1)
                {
                    msg = "余额不足,提现申请不成功";
                }
                else if (result == -2)
                {
                    msg = "系统异常,稍后再试";
                }
                else
                {
                    this.txtoutMonery.Text = "";
                    this.txtPwd.Text       = "";
                    //跳转至提现记录
                    refurl = "window.location='/Views/Users/MentionList.aspx'";
                }
                ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script type=\"text/javascript\">$.alert(\"" + msg + "\",1,function(){" + refurl + "});</script>");
            }
            catch (Exception ex)
            {
                Ytg.Scheduler.Comm.LogManager.Error("btnSummit_Click", ex);
                Alert("提现失败,请稍后再试!");
            }
        }