protected void Sure_Btn_Click(object sender, EventArgs e) { M_UserInfo mu = buser.GetLogin(false); int money = DataConvert.CLng(Money_T.Text); if (BeforeCheck(mu, money)) { //生成提现单据 M_Cash cashMod = new M_Cash(); cashMod.UserID = mu.UserID; cashMod.money = money; cashMod.YName = mu.UserName; cashMod.Account = Account_T.Text; cashMod.Bank = Bank_T.Text; cashMod.PeopleName = PName_T.Text; //cashMod.Remark = mu.UserName + "发起提现,金额:" + cashMod.money.ToString("f2"); cashMod.yState = 0; cashMod.Classes = 0; cashMod.Remark = Remark_T.Text; buser.MinusVMoney(mu.UserID, money, M_UserExpHis.SType.SIcon, "提现至银行卡"); cashBll.insert(cashMod); function.WriteSuccessMsg("提现申请成功,请等待管理员审核", "WithDrawLog.aspx"); } else { function.WriteErrMsg("提现申请拒绝"); } }
public void WithDraw_Add() { M_UserInfo mu = buser.GetLogin(false); double money = Convert.ToDouble(Request.Form["Money_T"]); double fee = SiteConfig.SiteOption.MastMoney > 0 ? (money * (SiteConfig.SiteOption.MastMoney / 100)) : 0; if (money < 1) { function.WriteErrMsg("提现金额错误,不能小于1"); return; } if (mu.Purse < (money + fee)) { function.WriteErrMsg("你只有[" + mu.Purse.ToString("f2") + "],需[" + (money + fee).ToString("F2") + "]才可提现"); return; } //生成提现单据 M_Cash cashMod = new M_Cash(); cashMod.UserID = mu.UserID; cashMod.money = money; cashMod.WithDrawFee = fee; cashMod.YName = mu.UserName; cashMod.Account = Request.Form["Account_T"]; cashMod.Bank = Request.Form["Bank_T"]; cashMod.PeopleName = Request.Form["PName_T"]; //cashMod.Remark = mu.UserName + "发起提现,金额:" + cashMod.money.ToString("f2"); cashMod.Remark = Request.Form["Remark_T"]; buser.MinusVMoney(mu.UserID, money, M_UserExpHis.SType.Purse, cashMod.Remark); if (cashMod.WithDrawFee > 0) { buser.MinusVMoney(mu.UserID, cashMod.WithDrawFee, M_UserExpHis.SType.Purse, "提现手续费率" + SiteConfig.SiteOption.MastMoney.ToString("F2") + "%"); } cashBll.insert(cashMod); function.WriteSuccessMsg("提现申请成功,请等待管理员审核", "WithDrawLog"); return; }
protected void Pay_Btn_Click(object sender, EventArgs e) { B_Cash cashBll = new B_Cash(); double min = 29, multi = 29, max = 0; int count = Unbrealla.LendCountByUser(mu.UserID); max = mu.SilverCoin - (count * PlugConfig.Info.Foregift); double money = DataConverter.CDouble(Money_T.Text); //double fee = SiteConfig.UserConfig.WD_FeePrecent > 0 ? (money * (SiteConfig.UserConfig.WD_FeePrecent / 100)) : 0; //string shortPwd = Request.Form["ShortPwd_T"]; if (money < 1) { function.WriteErrMsg("提现金额错误,不能小于1"); return; } if (money < min) { function.WriteErrMsg("提现金额必须>=[" + min.ToString("F0") + "]"); return; } if (money > max) { function.WriteErrMsg("提现金额必须小于[" + max + "]"); return; } if ((money % multi) != 0) { function.WriteErrMsg("提现金额必须是[" + multi + "]的倍数"); return; } //if (mu.Purse < (money + fee)) { function.WriteErrMsg("你只有[" + mu.Purse.ToString("f2") + "],需[" + (money + fee).ToString("F2") + "]才可提现"); return; } //if (string.IsNullOrEmpty(shortPwd)) { function.WriteErrMsg("未输入支付密码"); return; } //if (!mu.PayPassWord.Equals(StringHelper.MD5(shortPwd))) { function.WriteErrMsg("支付密码不正确"); return; } //生成提现单据 M_Cash cashMod = new M_Cash(); cashMod.UserID = mu.UserID; cashMod.money = money; cashMod.WithDrawFee = 0; cashMod.YName = mu.UserName; //cashMod.Account = bankMod.CardNum; //cashMod.Bank = Request.Form["Bank_T"]; cashMod.PeopleName = mu.TrueName; cashMod.Remark = "押金提现"; buser.MinusVMoney(mu.UserID, money, M_UserExpHis.SType.SIcon, cashMod.Remark); //if (cashMod.WithDrawFee > 0) //{ // buser.MinusVMoney(mu.UserID, cashMod.WithDrawFee, M_UserExpHis.SType.Purse, "提现手续费率" + SiteConfig.SiteOption.MastMoney.ToString("F2") + "%"); //} cashBll.insert(cashMod); function.WriteSuccessMsg("押金提现申请成功,请等待管理员审核", "/User/"); }
protected void ToPurse_Btn_Click(object sender, EventArgs e) { M_UserInfo mu = buser.GetLogin(false); int money = DataConvert.CLng(Money_T.Text); if (BeforeCheck(mu, money)) { //完成币值转换,并计算分成 buser.MinusVMoney(mu.UserID, money, M_UserExpHis.SType.SIcon, "提现入余额"); //buser.AddMoney(mu.UserID, money, M_UserExpHis.SType.Purse, "提现入余额"); //AutoUnit(mu, money); ////生成提现记录,由后台管理员确认后再转入余额 M_Cash cashMod = new M_Cash(); cashMod.UserID = mu.UserID; cashMod.money = money; cashMod.YName = mu.UserName; cashMod.Bank = "余额"; cashMod.Classes = 1;//余额提现 cashBll.insert(cashMod); function.WriteSuccessMsg("申请成功,请等待管理员审核"); } }
public void WithDraw_Add() { M_UserInfo mu = buser.GetLogin(false); double money = Convert.ToDouble(Request.Form["Money_T"]); double fee = SiteConfig.UserConfig.WD_FeePrecent > 0 ? (money * (SiteConfig.UserConfig.WD_FeePrecent / 100)) : 0; string shortPwd = Request.Form["ShortPwd_T"]; if (money < 1) { function.WriteErrMsg("提现金额错误,不能小于1"); return; } if (money < SiteConfig.UserConfig.WD_Min) { function.WriteErrMsg("提现金额必须>=[" + SiteConfig.UserConfig.WD_Min + "]"); return; } if (SiteConfig.UserConfig.WD_Max > 0 && money > SiteConfig.UserConfig.WD_Max) { function.WriteErrMsg("提现金额必须小于[" + SiteConfig.UserConfig.WD_Max + "]"); return; } if (SiteConfig.UserConfig.WD_Multi > 0 && (money % SiteConfig.UserConfig.WD_Multi) != 0) { function.WriteErrMsg("提现金额必须是[" + SiteConfig.UserConfig.WD_Multi + "]的倍数"); return; } if (mu.Purse < (money + fee)) { function.WriteErrMsg("你只有[" + mu.Purse.ToString("f2") + "],需[" + (money + fee).ToString("F2") + "]才可提现"); return; } if (string.IsNullOrEmpty(shortPwd)) { function.WriteErrMsg("未输入支付密码"); return; } if (!mu.PayPassWord.Equals(StringHelper.MD5(shortPwd))) { function.WriteErrMsg("支付密码不正确"); return; } //生成提现单据 M_Cash cashMod = new M_Cash(); cashMod.UserID = mu.UserID; cashMod.money = money; cashMod.WithDrawFee = fee; cashMod.YName = mu.UserName; cashMod.CardType = Request.Form["cardType_rad"]; cashMod.Remark = Request.Form["Remark_T"]; switch (cashMod.CardType) { case "银行卡": { cashMod.Account = Request.Form["Account_T"]; cashMod.Bank = Request.Form["Bank_T"]; cashMod.PeopleName = Request.Form["PName_T"]; } break; default: //其它网络支付方式 { cashMod.Account = Request.Form["Net_Account_T"]; cashMod.Bank = cashMod.CardType; cashMod.PeopleName = Request.Form["Net_PName_T"]; cashMod.QRcode = Request.Form["QRCode_t"]; } break; } //银行账户信息 int bankid = DataConverter.CLng(Request.Form["bankid"]); M_User_Bank bankMod = bankBll.SelReturnModel(bankid); //账户不存在则新增 if (bankMod == null || !bankMod.CardNum.Equals(cashMod.Account.Trim())) { bankMod = new M_User_Bank(); bankMod.CardNum = cashMod.Account; bankMod.BankName = cashMod.Bank; bankMod.PeopleName = cashMod.PeopleName; bankMod.Remark = cashMod.Remark; bankMod.UserID = mu.UserID; bankMod.ID = bankBll.Insert(bankMod); } buser.MinusVMoney(mu.UserID, money, M_UserExpHis.SType.Purse, cashMod.Remark); if (cashMod.WithDrawFee > 0) { buser.MinusVMoney(mu.UserID, cashMod.WithDrawFee, M_UserExpHis.SType.Purse, "提现手续费率" + SiteConfig.SiteOption.MastMoney.ToString("F2") + "%"); } cashBll.insert(cashMod); function.WriteSuccessMsg("提现申请成功,请等待管理员审核", "WithDrawLog"); }