username@email.com
2025-05-14 99ddfbcecf0fa2881eb3a91028257eef87dab6de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CY.Infrastructure.Common;
using CY.BLL;
using CY.Model;
using CY.BLL.Sys;
 
namespace CY.WebForm.Pages.pay
{
    //吴辉
    //账户提现
    public partial class CashAccountToBank : BasePage
    {
        Pay_BankInfoBLL bll_Pay_BankInfoBLL = null;
        Pay_CashApplyBLL bll_Pay_CashApplyBLL = null;
        Sys_DictionaryBLL bll_Sys_DictionaryBLL = null;
        Pay_PaymentAccountBLL bll_Pay_PaymentAccountBLL = null;
 
        //初始化
        public CashAccountToBank()
        {
            bll_Pay_BankInfoBLL = new Pay_BankInfoBLL();
            bll_Pay_CashApplyBLL = new Pay_CashApplyBLL();
            bll_Sys_DictionaryBLL = new Sys_DictionaryBLL();
            bll_Pay_PaymentAccountBLL = new Pay_PaymentAccountBLL();
        }
 
        //页面加载
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindAccountMoney();
            }
        }
 
        //绑定页面数据
        public void BindAccountMoney()
        {
            //this.spanMyAccountMoney.InnerText = "¥ " + CurrentPayAccount.SurplusMoney.ToString2().TrimEnd('0').TrimEnd('.');
            //this.spanCanCashMoney.InnerText = "¥ " + (((int)(CurrentPayAccount.SurplusMoney / 100)) * 100).ToString();
 
            this.RepClientList.DataSource = bll_Pay_BankInfoBLL.GetModelListByMemberId(CurrentUser.MemberId);
            this.RepClientList.DataBind();
        }
 
        //提交提现申请
        protected void Submit_Cash(object sender, EventArgs e)
        {
            string newPayPwd = Request["txtdwpteg"].ToString2();
            string newRtslav = Request["txtrtslav"].ToString2();
            //解码并与支付码匹配 
            if (!Pay_PaymentAccountBLL.EqualsPwd(HttpContext.Current.Server.UrlDecode(newPayPwd), CurrentPayAccount.PayPwd))
            {
                JavaScript.MessageBox("支付码错误", this);
            }
            else
            {
                decimal? CashMoney = this.txtRechargeMoney.Value.ToDecimal2();
                decimal? MyMoney = (((int)(CurrentPayAccount.SurplusMoney / 100)) * 100).ToDecimal2();
                if (CashMoney > MyMoney || CashMoney < 100 || CashMoney == null || (CashMoney % 100) != 0)
                    JavaScript.MessageBox("金额输入错误", this);
                else
                {
                    Pay_CashApply m_Pay_CashApply = new Pay_CashApply();
                    m_Pay_CashApply.Payid = CurrentPayAccount.Keyid;
                    m_Pay_CashApply.Money = CashMoney;
                    m_Pay_CashApply.TargetBankId = this.txtTargetBankId.Value;
                    m_Pay_CashApply.TargetBankName = this.txtTargetBankName.Value;
                    m_Pay_CashApply.Cardholder = this.txtCardholder.Value;
                    m_Pay_CashApply.Remark = "申请时间:" + DateTime.Now.ToString() + ",申请人:" + CurrentUser.ShortName;
                    m_Pay_CashApply.State = 0;
                    m_Pay_CashApply.CreateTime = DateTime.Now;
                    m_Pay_CashApply.CashTypeId =0;
 
                    if (bll_Pay_CashApplyBLL.InsertModel(m_Pay_CashApply))
                        JavaScript.MessageBox("申请成功,我们会尽快审核并转账", this,true,true);
                    else
                        JavaScript.MessageBox("申请失败", this);
                }
            }
        }
    }
}