protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //获取是否开启摩宝支付
                ISysSettingService settingService = IoC.Resolve <ISysSettingService>();
                var fs = settingService.GetSetting("mobao_pay");
                if (fs != null)
                {
                    mb_pay.Visible = fs.Value == "0" ? true : false;
                }
                //智付
                var zf = settingService.GetSetting("zhifu_pay");
                if (zf != null)
                {
                    zf_pay.Visible = zf.Value == "0" ? true : false;
                }

                //my18
                var my18 = settingService.GetSetting("my18_pay");
                if (my18 != null)
                {
                    my_18.Visible = my18.Value == "0" ? true : false;
                }
            }
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.ViewStateMode = System.Web.UI.ViewStateMode.Enabled;
            ISysSettingService settingService = IoC.Resolve <ISysSettingService>();

            if (!IsPostBack)
            {
                //huoqu yong hurt yue
                //GetUserBalance();
                //获取首页新闻
                //GetTopNews();
                var mobao_pay = settingService.GetSetting("mobao_pay");

                if (mobao_pay != null)
                {
                    if (mobao_pay.Value == "0")
                    {
                        playStr = "/Views/pay/PayIndex.aspx";
                    }
                }
                //智付
                var zhifu_pay = settingService.GetSetting("zhifu_pay");
                if (zhifu_pay != null)
                {
                    if (zhifu_pay.Value == "0")
                    {
                        playStr = "/Views/pay/zhifu/PayIndex.aspx";
                    }
                }
                if (string.IsNullOrEmpty(playStr))
                {
                    playStr = "/Views/pay/Payment.aspx";
                }

                this.InintLotterys();
            }
            //获取在线客服信息

            var fs = settingService.GetSetting("KHLJ");

            if (fs != null)
            {
                this.CustomerServceUrl = fs.Value;
            }
        }
Beispiel #3
0
        /// <summary>
        /// 虚拟上榜会员
        /// </summary>
        /// <returns></returns>
        public static List <XuNiItem> GetWinsMonery()
        {
            ISysSettingService sysSettingService = IoC.Resolve <ISysSettingService>();
            var setting = sysSettingService.GetSetting("XNSPHYNC");

            if (setting == null)
            {
                return(new List <XuNiItem>());
            }
            string content = setting.Value;

            if (string.IsNullOrEmpty(content))
            {
                return(new List <XuNiItem>());
            }
            List <XuNiItem> XuNiItems = new List <XuNiItem>();
            var             array     = content.Split(',');

            foreach (var a in array)
            {
                if (string.IsNullOrEmpty(a))
                {
                    continue;
                }
                var item = a.Split('|');
                if (item.Length != 2)
                {
                    continue;
                }
                XuNiItem xu = new XuNiItem();
                xu.UserCode = item[0];
                decimal outDec = 0;
                if (!decimal.TryParse(item[1], out outDec))
                {
                    outDec = 1000;
                }
                xu.UserWinMonery = outDec;
                XuNiItems.Add(xu);
            }

            return(XuNiItems);
        }
Beispiel #4
0
        private void LoadData()
        {
            decimal monery;
            string  payType = "";

            if (Request.Params["amount"] != null && Request.Params["bankCode"] != null)
            {
                payType = Request.Params["bankCode"].ToString();
                monery  = Convert.ToInt32(Request.Params["amount"].ToString());
            }
            else
            {
                Response.Redirect("/Views/pay/PayIndex.aspx");
                return;
            }
            var sp = !IsShoping();

            if (sp)
            {
                Response.Redirect("/Views/pay/PayIndex.aspx");
                return;
            }


            //验证支付金额
            if (monery < Min || monery > Max)
            {
                Response.Redirect("/Views/pay/PayIndex.aspx");
                return;
            }

            ICompanyBankService companyBankServices = IoC.Resolve <ICompanyBankService>();

            try
            {
                CompanyBankVM companyBank = companyBankServices.GetCompanyBank(payType);
                if (companyBank == null)
                {
                    Response.Redirect("/Views/pay/PayIndex.aspx");
                    return;
                }

                var result = companyBankServices.GetRechargeBankInfo(companyBank.BankId, CookUserInfo.Id, monery).FirstOrDefault();
                if (result == null)
                {
                    Response.Redirect("/Views/pay/PayIndex.aspx");
                    return;
                }
                ISysSettingService sysSettingService = IoC.Resolve <ISysSettingService>();
                var zfbsetting = sysSettingService.GetSetting("zhb_rect_url");
                var wxsetting  = sysSettingService.GetSetting("wx_rect_url");
                if (null != zfbsetting)
                {
                    zbfqrcode = BootStrapper.SiteHelper.rectImagePath + zfbsetting.Value;
                }
                if (null != wxsetting)
                {
                    wxqrcode = BootStrapper.SiteHelper.rectImagePath + zfbsetting.Value;
                }

                userName.Text              = result.BankOwner;
                userCode.Text              = result.BankNo;
                txtNum.Text                = result.Num;
                this.hidBankid.Value       = result.Id.ToString();
                this.imgLogo.AlternateText = result.BankName;
                this.imgLogo.ImageUrl      = "/Views/pay/mobao/images/" + payType + ".jpg";
                hidecztype.Value           = payType;
                this.lbMonery_.Text        = monery.ToString();
                bankLink.NavigateUrl       = result.BankWebUrl;

                Ytg.Scheduler.Comm.LogManager.Info(DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") + " -- " + sp + "  BankOwner=" + result.BankOwner + " BankNo=" + result.BankNo + " Num=" + result.Num + " id=" + result.Id + " result.BankName=" + result.BankName);
            }
            catch (Exception ex)
            {
                Alert("系统参数设置错误!");
            }
        }