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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
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.BLL.Sys;
using CY.Model;
using CY.Model.Pay;
 
namespace CY.WebForm.Pages.member
{
    public partial class AdminAccountNew : BasePage
    {
        EC_MemberBasicBLL bll_EC_MemberBasicBLL = null;
        Sys_DictionaryBLL bll_Sys_DictionaryBLL = null;//字典业务逻辑操作类对象
 
        public string Province { get; set; }
        public string City { get; set; }
        public string County { get; set; }
 
        //初始化
        public AdminAccountNew()
        {
            bll_EC_MemberBasicBLL = new EC_MemberBasicBLL();
            bll_Sys_DictionaryBLL = new Sys_DictionaryBLL();
            Province = CY.Config.WebInfo.Instance.WebProvinceName;
            City = CY.Config.WebInfo.Instance.WebCityName;
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataBindToPage();
            }
        }
 
        //数据绑定
        public void DataBindToPage()
        {
            decimal commission = CY.Config.WebInfo.Instance.FirmOrderAgencyFee.ToDecimal2().Value;
            PaymentAccountModelByAdmin model = bll_EC_MemberBasicBLL.GetPaymentAccountModelByAdmin(CurrentPayAccount.Keyid.Value, commission);
            if (model != null)
            {
                this.spanNoReturnCredit.InnerText = model.NoReturnCredit.ToDecimal2Yen().ToString2();
                this.spanCanHaveMoney.InnerText = model.CanHaveMoney.ToDecimal2Yen().ToString2();
                this.spanCanPayMoney.InnerText = model.CanPayMoney.ToDecimal2Yen().ToString2();
                this.spanActualHaveMoney.InnerText = model.ActualHaveMoney.ToDecimal2Yen().ToString2();
                this.spanTotalIncome.InnerText = model.TotalIncome.ToDecimal2Yen().ToString2();
                this.spanTotalExpend.InnerText = model.TotalExpend.ToDecimal2Yen().ToString2();
                this.spanTotalProfit.InnerText = model.TotalProfit.ToDecimal2Yen().ToString2();
            }
 
        }
 
        protected void btn_Query_Click(object sender, EventArgs e)
        {
            string startDate = this.txtBeginData.Value;
            string endDate = string.Empty;
            if (!string.IsNullOrEmpty(this.txtEndDate.Value.ToString()))
            {
                endDate = DateTime.Parse(this.txtEndDate.Value.ToString()).AddDays(1).ToString();
            }
            string selectProvince = string.Empty;
            string selectCity = string.Empty;
            string selectCounty = string.Empty;
            if (Request["selectProvince"] != null)
            {
                selectProvince = Request["selectProvince"].ToString();
                Province = selectProvince;
            }
            if (Request["selectCity"] != null)
            {
                selectCity = Request["selectCity"].ToString();
                City = selectCity;
            }
            if (Request["selectCounty"] != null)
            {
                selectCounty = Request["selectCounty"].ToString();
                County = selectCounty;
            }
            PaymentAccountQueryModelByAdmin model = bll_EC_MemberBasicBLL.GetPaymentAccountQueryModelByAdmin(CurrentPayAccount.Keyid.Value, startDate, endDate, selectProvince, selectCity, selectCounty);
            if (model != null)
            {
                this.spanAllIncome.InnerText = model.AllIncome.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByRegsiter.InnerText = model.AllIncomeByRegsiter.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByDeposit.InnerText = model.AllIncomeByDeposit.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByDepositByRenewal.InnerText = model.AllIncomeByDepositByRenewal.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByWebAd.InnerText = model.AllIncomeByWebAd.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByNoteAd.InnerText = model.AllIncomeByNoteAd.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByManageSoftware.InnerText = model.AllIncomeByManageSoftware.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByCommission.InnerText = model.AllIncomeByCommission.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByReturnCredit.InnerText = model.AllIncomeByReturnCredit.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByReturnCommission.InnerText = model.AllIncomeByReturnCommission.ToDecimal2Yen().ToString2();
 
                this.spanAllExpend.InnerText = model.AllExpend.ToDecimal2Yen().ToString2();
                this.spanAllProfit.InnerText = model.AllProfit.ToDecimal2Yen().ToString2();
                this.spanRechargeMoney.InnerText = model.RechargeMoney.ToDecimal2Yen().ToString2();
                this.spanWithdrawMoney.InnerText = model.WithdrawMoney.ToDecimal2Yen().ToString2();
                this.spanSurplusMoney.InnerText = model.SurplusMoney.ToDecimal2Yen().ToString2();
                this.spanAllCredit.InnerText = model.AllCredit.ToDecimal2Yen().ToString2();
                this.spanHasCredit.InnerText = model.HasCredit.ToDecimal2Yen().ToString2();
                this.spanCreditUsed.InnerText = model.CreditUsed.ToDecimal2Yen().ToString2();
                this.spanCreditByBefore.InnerText = model.CreditByBefore.ToDecimal2Yen().ToString2();
                this.spanCreditByAdd.InnerText = model.CreditByAdd.ToDecimal2Yen().ToString2();
 
                this.spanAllScore.InnerText = model.AllScore.ToString();
                this.spanUsedScore.InnerText = model.UsedScore.ToString();
                this.spanSurplusScore.InnerText = model.SurplusScore.ToString();
                this.spanAllPromotionMoney.InnerText = model.AllPromotionMoney.ToDecimal2Yen().ToString2();
                this.spanUsedPromotionMoney.InnerText = model.UsedPromotionMoney.ToDecimal2Yen().ToString2();
                this.spanSurplusPromotionMoney.InnerText = model.SurplusPromotionMoney.ToDecimal2Yen().ToString2();
                this.spanAllCommissionMoney.InnerText = model.AllCommissionMoney.ToDecimal2Yen().ToString2();
                this.spanUsedCommissionMoney.InnerText = model.UsedCommissionMoney.ToDecimal2Yen().ToString2();
                this.spanSurplusCommissionMoney.InnerText = model.SurplusCommissionMoney.ToDecimal2Yen().ToString2();
                //this.spanAllPayReturn.InnerText = model.AllPayReturn.ToDecimal2Yen().ToString2();
                this.spanAllPayMoney.InnerText = model.AllPayMoney.ToDecimal2Yen().ToString2();
                this.spanPayMoneyByPrint.InnerText = model.PayMoneyByPrint.ToDecimal2Yen().ToString2();
            }
        }
 
        protected void btnReSet_Click(object sender, EventArgs e)
        {
            txtBeginData.Value = string.Empty;
            txtEndDate.Value = string.Empty;
            string startDate =string.Empty;
            string endDate = string.Empty;
            string selectProvince = CY.Config.WebInfo.Instance.WebProvinceName;
            string selectCity = CY.Config.WebInfo.Instance.WebCityName;
            string selectCounty = string.Empty;
            Province = CY.Config.WebInfo.Instance.WebProvinceName;
            City = CY.Config.WebInfo.Instance.WebCityName;
            County = "";
            PaymentAccountQueryModelByAdmin model = bll_EC_MemberBasicBLL.GetPaymentAccountQueryModelByAdmin(CurrentPayAccount.Keyid.Value, startDate, endDate, selectProvince, selectCity, selectCounty);
            if (model != null)
            {
                this.spanAllIncome.InnerText = model.AllIncome.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByRegsiter.InnerText = model.AllIncomeByRegsiter.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByDeposit.InnerText = model.AllIncomeByDeposit.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByDepositByRenewal.InnerText = model.AllIncomeByDepositByRenewal.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByWebAd.InnerText = model.AllIncomeByWebAd.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByNoteAd.InnerText = model.AllIncomeByNoteAd.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByManageSoftware.InnerText = model.AllIncomeByManageSoftware.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByCommission.InnerText = model.AllIncomeByCommission.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByReturnCredit.InnerText = model.AllIncomeByReturnCredit.ToDecimal2Yen().ToString2();
                this.spanAllIncomeByReturnCommission.InnerText = model.AllIncomeByReturnCommission.ToDecimal2Yen().ToString2();
 
                this.spanAllExpend.InnerText = model.AllExpend.ToDecimal2Yen().ToString2();
                this.spanAllProfit.InnerText = model.AllProfit.ToDecimal2Yen().ToString2();
                this.spanRechargeMoney.InnerText = model.RechargeMoney.ToDecimal2Yen().ToString2();
                this.spanWithdrawMoney.InnerText = model.WithdrawMoney.ToDecimal2Yen().ToString2();
                this.spanSurplusMoney.InnerText = model.SurplusMoney.ToDecimal2Yen().ToString2();
                this.spanAllCredit.InnerText = model.AllCredit.ToDecimal2Yen().ToString2();
                this.spanHasCredit.InnerText = model.HasCredit.ToDecimal2Yen().ToString2();
                this.spanCreditUsed.InnerText = model.CreditUsed.ToDecimal2Yen().ToString2();
                this.spanCreditByBefore.InnerText = model.CreditByBefore.ToDecimal2Yen().ToString2();
                this.spanCreditByAdd.InnerText = model.CreditByAdd.ToDecimal2Yen().ToString2();
 
                this.spanAllScore.InnerText = model.AllScore.ToString();
                this.spanUsedScore.InnerText = model.UsedScore.ToString();
                this.spanSurplusScore.InnerText = model.SurplusScore.ToString();
                this.spanAllPromotionMoney.InnerText = model.AllPromotionMoney.ToDecimal2Yen().ToString2();
                this.spanUsedPromotionMoney.InnerText = model.UsedPromotionMoney.ToDecimal2Yen().ToString2();
                this.spanSurplusPromotionMoney.InnerText = model.SurplusPromotionMoney.ToDecimal2Yen().ToString2();
                this.spanAllCommissionMoney.InnerText = model.AllCommissionMoney.ToDecimal2Yen().ToString2();
                this.spanUsedCommissionMoney.InnerText = model.UsedCommissionMoney.ToDecimal2Yen().ToString2();
                this.spanSurplusCommissionMoney.InnerText = model.SurplusCommissionMoney.ToDecimal2Yen().ToString2();
                //this.spanAllPayReturn.InnerText = model.AllPayReturn.ToDecimal2Yen().ToString2();
                this.spanAllPayMoney.InnerText = model.AllPayMoney.ToDecimal2Yen().ToString2();
                this.spanPayMoneyByPrint.InnerText = model.PayMoneyByPrint.ToDecimal2Yen().ToString2();
            }
        }
    }
}