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; } } }
/// <summary> /// 提现数据列表绑定 /// </summary> private void Bind() { ISysSettingService settingService = IoC.Resolve <ISysSettingService>(); var sh = settingService.GetAll().Where(x => x.Key == "QLZHGZ").FirstOrDefault(); if (sh != null) { if (!decimal.TryParse(sh.Value, out ShenHeMonery)) { ShenHeMonery = 5000; } } string code = this.txtUserCode.Text.Trim(); //用户编号 string seriaNo = ""; // this.txtSeriaNo.Text.Trim(); //业务单号 string beginDate = this.txtBeginDate.Text.Trim(); //业务开始日期 string endDate = this.txtEndDate.Text.Trim(); //业务截止日期 decimal beginMonery = -1; decimal endMoner = -1; if (!decimal.TryParse(this.txtBeginMonery.Text, out beginMonery) || !decimal.TryParse(this.txtEndMonery.Text.Trim(), out endMoner)) { beginMonery = -1; endMoner = -1; } int type = Convert.ToInt32(this.drpStates.SelectedValue); int recordCount = 0; IMentionQueusService mentionQueusService = IoC.Resolve <IMentionQueusService>(); List <Ytg.BasicModel.DTO.MentionDTO> result = mentionQueusService.SelectBy(code, seriaNo, beginDate, endDate, beginMonery, endMoner, type, pagerControl.CurrentPageIndex, ref recordCount); this.repList.DataSource = result; this.repList.DataBind(); this.pagerControl.RecordCount = recordCount; }
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); }
static List <SysSetting> GetAllSettings() { ISysSettingService sysSettingService = null; IDbContextFactory factory = new DbContextFactory(); sysSettingService = new SysSettingService(new Repo <SysSetting>(factory)); return(sysSettingService.GetAll().ToList()); }
/// <summary> /// 构造函数 /// </summary> public CorrespondenceSettingsController() { CorrespondenceSettingsService = base.GetObject <ICorrespondenceSettingsService>("GQT3.QT.Service.CorrespondenceSettings"); CorrespondenceSettings2Service = base.GetObject <ICorrespondenceSettings2Service>("GQT3.QT.Service.CorrespondenceSettings2"); QTSysSetService = base.GetObject <IQTSysSetService>("GQT3.QT.Service.QTSysSet"); GAppvalRecordService = base.GetObject <IGAppvalRecordService>("GSP3.SP.Service.GAppvalRecord"); GKPaymentMstService = base.GetObject <IGKPaymentMstService>("GGK3.GK.Service.GKPaymentMst"); SysSettingService = base.GetObject <ISysSettingService>("GQT3.QT.Service.SysSetting"); }
/// <summary> /// 初始化新用户账户金额 /// </summary> public static void InintNewUserBalance(SysUser outuser, ISysSettingService sysSettingService, ISysUserBalanceService sysUserBalanceService, ISysUserBalanceDetailService sysUserBalanceDetailService, ISysUserService sysUserService) { #region 注册活动 //新用户注册赠送金额 var defaultMoneuy = 0m; //赠送金额 var minOutBettMonery = 0m; //最低提款金额 var settingItem = sysSettingService.Where(x => x.Key == "ZCZSHD").FirstOrDefault(); if (null != settingItem && !string.IsNullOrEmpty(settingItem.Value)) { try { var dto = Newtonsoft.Json.JsonConvert.DeserializeObject <Ytg.BasicModel.DTO.SettingDTO>(settingItem.Value); if (dto != null) { if (dto.p1 == "0") { if (!decimal.TryParse(dto.p2, out defaultMoneuy)) { defaultMoneuy = 0; } if (!decimal.TryParse(dto.p3, out minOutBettMonery)) { minOutBettMonery = 1; } } } } catch { } } #endregion sysUserBalanceService.Create(new SysUserBalance() { Status = 0, UserAmt = defaultMoneuy, UserId = outuser.Id, }); sysUserBalanceService.Save(); if (defaultMoneuy > 0 && outuser.UserType != UserType.BasicProy) { /**插入账变*/ sysUserBalanceDetailService.Create(new SysUserBalanceDetail() { SerialNo = "b" + Utils.BuilderNum(), TradeAmt = defaultMoneuy, TradeType = TradeType.注册活动, UserAmt = defaultMoneuy, UserId = outuser.Id, }); /**插入账变*/ sysUserBalanceDetailService.Save(); //修改提款最低流水 sysUserService.UpdateUserMinMinBettingMoney(outuser.Id, defaultMoneuy * minOutBettMonery); } }
/// <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; }
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; } }
/// <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); }
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); } } }
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; }
static SiteHelper() { ISysSettingService sysSettingService = IoC.Resolve <ISysSettingService>(); SysSetting = sysSettingService.SeleteAll(); }
private void Bind() { ISysSettingService sysSettingService = IoC.Resolve <ISysSettingService>(); var rList = sysSettingService.SeleteAll(); if (rList != null && rList.Count > 0) { foreach (var item in rList) { switch (item.Key) { //平台名称 case "PTMC": this.txtTitle.Text = item.Value; break; //网站开关 case "WZKG": drpIsShowDialog.SelectedValue = item.Value; break; //网站关闭公告内容 case "WZGGKG": this.txtContent.Text = item.Value; break; //中奖排行开关 case "ZJPHKG": drpShangBanOpen.SelectedValue = item.Value; break; //会员上榜最低中奖金额 case "HYSPZDZJJE": this.txtMinMonery.Text = item.Value; break; //虚拟上榜会员昵称 case "XNSPHYNC": this.txtXuNiInContennt.Text = item.Value; break; case "CZXZ": //充值限制 if (!string.IsNullOrEmpty(item.Value)) { var ary = item.Value.Split(','); this.txtInMinMonery.Text = ary[0]; this.txtInMaxMonery.Text = ary[1]; } break; case "TXXZ": //提款限制 if (!string.IsNullOrEmpty(item.Value)) { var ary = item.Value.Split(','); this.txtOutMinMonery.Text = ary[0]; this.txtOutMaxMonery.Text = ary[1]; } break; case "ZCZSHD": //充值赠送活动 if (!string.IsNullOrEmpty(item.Value)) { var des = Newtonsoft.Json.JsonConvert.DeserializeObject <SettingDTO>(item.Value); if (null != des) { chkopenZengSong.Checked = des.p1 == "0"; //0为开启 txtNewUserZenSong.Text = des.p2; txtNewUserBeiShu.Text = des.p3; } } break; case "chongzhiBili": //充值提款消费比例 if (!string.IsNullOrEmpty(item.Value)) { txtRechangeMinBili.Text = item.Value; } break; case "ZXLTPATH": //跳转地址 this.txtUrl.Text = string.IsNullOrEmpty(item.Value)?"http://":item.Value; break; case "KHLJ": this.txtKfAddress.Text = string.IsNullOrEmpty(item.Value) ? "http://" : item.Value; break; case "QLZHGZ": //提现审核 this.txtShMonery.Text = item.Value; break; case "mobao_pay": //摩宝支付 this.drpMb.SelectedValue = item.Value; break; case "zhifu_pay": //智付支付 this.drpzhifu.SelectedValue = item.Value; break; case "my18_pay": //ny18 this.drpMy18.SelectedValue = item.Value; break; case "ti_xian_isopen": //是否开启提现 this.drptx.SelectedValue = item.Value; break; case "ti_xian_shi_bai_info": //关闭提现功能原因 this.txtTxErrorMsg.Text = item.Value; break; case "zhb_rect_url": this.lbzfb.Text = item.Value; break; case "wx_rect_url": this.lbwx.Text = item.Value; break; } } } }
protected void btnSave_Click(object sender, EventArgs e) { ISysSettingService sysSettingService = IoC.Resolve <ISysSettingService>(); List <SysSetting> sysSettingList = new List <SysSetting>(); //平台名称 SysSetting sysSetting = new SysSetting(); sysSetting.Key = "PTMC"; sysSetting.Value = this.txtTitle.Text; sysSettingList.Add(sysSetting); //网站开关 SysSetting sysSetting1 = new SysSetting(); sysSetting1.Key = "WZKG"; sysSetting1.Value = drpIsShowDialog.SelectedValue; sysSettingList.Add(sysSetting1); //网站公告开关 SysSetting sysSetting2 = new SysSetting(); sysSetting2.Key = "WZGGKG"; sysSetting2.Value = this.txtContent.Text; sysSettingList.Add(sysSetting2); //中奖排行开关 SysSetting sysSetting3 = new SysSetting(); sysSetting3.Key = "ZJPHKG"; sysSetting3.Value = drpShangBanOpen.SelectedValue; sysSettingList.Add(sysSetting3); //会员上榜最低中奖金额 SysSetting sysSetting4 = new SysSetting(); sysSetting4.Key = "HYSPZDZJJE"; sysSetting4.Value = this.txtMinMonery.Text; sysSettingList.Add(sysSetting4); //虚拟上榜会员昵称 CreateSettingItem("XNSPHYNC", this.txtXuNiInContennt.Text, sysSettingList); //充值限制 SysSetting sysSetting5 = new SysSetting(); sysSetting5.Key = "CZXZ"; sysSetting5.Value = (string.IsNullOrEmpty(this.txtInMinMonery.Text.Trim()) ? "10" : this.txtInMinMonery.Text.Trim()) + "," + (string.IsNullOrEmpty(this.txtInMaxMonery.Text.Trim()) ? "50000" : this.txtInMaxMonery.Text.Trim()); sysSettingList.Add(sysSetting5); //提现限制 SysSetting sysSetting6 = new SysSetting(); sysSetting6.Key = "TXXZ"; sysSetting6.Value = (string.IsNullOrEmpty(this.txtOutMinMonery.Text.Trim()) ? "100" : this.txtOutMinMonery.Text.Trim()) + "," + (string.IsNullOrEmpty(this.txtOutMaxMonery.Text.Trim()) ? "50000" : this.txtOutMaxMonery.Text.Trim()); sysSettingList.Add(sysSetting6); //注册赠送活动 SettingDTO settingDto = new SettingDTO() { p1 = this.chkopenZengSong.Checked ? "0" : "1", p2 = txtNewUserZenSong.Text.Trim(), p3 = txtNewUserBeiShu.Text.Trim(), }; var des = Newtonsoft.Json.JsonConvert.SerializeObject(settingDto); SysSetting sysSetting7 = new SysSetting(); sysSetting7.Key = "ZCZSHD"; sysSetting7.Value = des; sysSettingList.Add(sysSetting7); double outBili = 5; if (double.TryParse(this.txtRechangeMinBili.Text.Trim(), out outBili)) { SysSetting sysSetting8 = new SysSetting(); sysSetting8.Key = "chongzhiBili"; sysSetting8.Value = outBili.ToString(); sysSettingList.Add(sysSetting8); } //登录失败时跳转 SysSetting sysSetting9 = new SysSetting(); sysSetting9.Key = "ZXLTPATH"; sysSetting9.Value = this.txtUrl.Text.Trim(); sysSettingList.Add(sysSetting9); //客服地址 SysSetting sysSetting10 = new SysSetting(); sysSetting10.Key = "KHLJ"; sysSetting10.Value = this.txtKfAddress.Text.Trim(); sysSettingList.Add(sysSetting10); //提现审核 SysSetting sysSetting11 = new SysSetting(); sysSetting11.Key = "QLZHGZ"; sysSetting11.Value = this.txtShMonery.Text.Trim(); sysSettingList.Add(sysSetting11); ////摩宝 SysSetting sysSetting12 = new SysSetting(); sysSetting12.Key = "mobao_pay"; sysSetting12.Value = this.drpMb.SelectedValue; sysSettingList.Add(sysSetting12); ////智付 SysSetting sysSetting13 = new SysSetting(); sysSetting13.Key = "zhifu_pay"; sysSetting13.Value = this.drpzhifu.SelectedValue; sysSettingList.Add(sysSetting13); ////my18 SysSetting sysSetting14 = new SysSetting(); sysSetting14.Key = "my18_pay"; sysSetting14.Value = this.drpMy18.SelectedValue; sysSettingList.Add(sysSetting14); ////是否开启提现 SysSetting sysSetting15 = new SysSetting(); sysSetting15.Key = "ti_xian_isopen"; sysSetting15.Value = this.drptx.SelectedValue; sysSettingList.Add(sysSetting15); ////关闭提现功能原因 SysSetting sysSetting16 = new SysSetting(); sysSetting16.Key = "ti_xian_shi_bai_info"; sysSetting16.Value = this.txtTxErrorMsg.Text; sysSettingList.Add(sysSetting16); ////支付宝充值 string zfbpath = SaveZfbImage(); if (!string.IsNullOrEmpty(zfbpath)) { SysSetting sysSetting17 = new SysSetting(); sysSetting17.Key = "zhb_rect_url"; sysSetting17.Value = zfbpath; sysSettingList.Add(sysSetting17); } ////微信充值 string wxstr = SaveWxImage(); if (!string.IsNullOrEmpty(wxstr)) { SysSetting sysSetting18 = new SysSetting(); sysSetting18.Key = "wx_rect_url"; sysSetting18.Value = wxstr; sysSettingList.Add(sysSetting18); } if (sysSettingService.Update(sysSettingList)) { JsAlert("保存成功!"); } else { JsAlert("保存失败!"); } }
protected void btnSave_Click(object sender, EventArgs e) { decimal changeMonery = 0m; if (!decimal.TryParse(this.txtinMonery.Text.Trim(), out changeMonery) || changeMonery <= 0) { JsAlert("充值金额格式错误!"); return; } var details = new SysUserBalanceDetail() { RelevanceNo = "system.recharge", SerialNo = "q" + Utils.BuilderNum(), Status = 0, TradeAmt = changeMonery, TradeType = radDefault.Checked?TradeType.系统充值:TradeType.分红, UserId = Convert.ToInt32(Request.QueryString["id"]) }; if (radKouk.Checked) { details.TradeType = TradeType.其他; details.TradeAmt = 0 - details.TradeAmt; changeMonery = 0 - changeMonery; } var userBalance = IoC.Resolve <ISysUserBalanceService>(); if (userBalance.UpdateUserBalance(details, changeMonery) > 0) { if (radDefault.Checked) { //普通充值,需增加提款限额 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>(); var minOutMonery = (changeMonery * (decimal)(bili / 100)); if (userServices.UpdateUserMinMinBettingMoney(details.UserId, minOutMonery) > 0) { //更新用户提款流水要求 } } if (Request.Params["tp"] == "1")//分红 { JsAlert("分红成功", true); } else if (Request.Params["tp"] == "0") { JsAlert("充值成功", true); } else { JsAlert("扣减成功", true); } } else { JsAlert("充值失败,请关闭后重试", false); } }
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("系统参数设置错误!"); } }