using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
using System.Web.UI;
|
using System.Web.UI.WebControls;
|
using CY.BLL;
|
using CY.BLL.Sys;
|
using CY.Model;
|
using CY.Infrastructure.Common;
|
using CY.Model.Pay;
|
using CY.Infrastructure.Query;
|
|
namespace CY.WebForm.Pages.member
|
{
|
public partial class MemberAccountNew : BasePage
|
{
|
EC_MemberBasicBLL bll_EC_MemberBasicBLL = null;
|
Sys_DictionaryBLL bll_Sys_DictionaryBLL = null;//字典业务逻辑操作类对象
|
Pay_CreditLineLevelRuleBLL bll_Pay_CreditLineLevelRuleBLL = null;
|
public int LevelCount = 0;
|
public Pay_CreditLineLevelRule m_Pay_CreditLineLevelRule = null;
|
public Pay_PaymentAccount n_m_Pay_PaymentAccount = null;
|
|
//初始化
|
public MemberAccountNew()
|
{
|
bll_EC_MemberBasicBLL = new EC_MemberBasicBLL();
|
bll_Sys_DictionaryBLL = new Sys_DictionaryBLL();
|
bll_Pay_CreditLineLevelRuleBLL = new Pay_CreditLineLevelRuleBLL();
|
m_Pay_CreditLineLevelRule = new Pay_CreditLineLevelRule();
|
n_m_Pay_PaymentAccount = new Pay_PaymentAccount();
|
}
|
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
Guid nowGuid = CurrentUser.MemberId;
|
n_m_Pay_PaymentAccount = bll_EC_MemberBasicBLL.GetPaymentAccountByMemberId(nowGuid);
|
m_Pay_CreditLineLevelRule = bll_Pay_CreditLineLevelRuleBLL.GetModel(n_m_Pay_PaymentAccount.LevelRule);
|
|
this.BtnSearch.Visible = false;
|
if (!IsPostBack)
|
{
|
DataBindToPage();
|
}
|
}
|
|
//数据绑定
|
public void DataBindToPage()
|
{
|
|
|
Pagination pa = new Pagination();
|
pa.PageSize = 500;
|
pa.PageIndex = 1;
|
this.RepCreditLineList.DataSource = bll_Pay_CreditLineLevelRuleBLL.GetModelPageList(pa);
|
this.RepCreditLineList.DataBind();
|
LevelCount = this.RepCreditLineList.Items.Count;
|
LevelCount = (LevelCount == 0 ? 1 : LevelCount);
|
|
|
|
#region 账户信息表赋值
|
if (n_m_Pay_PaymentAccount != null)
|
{
|
this.spanPaymentAccountPayLevel.InnerText = n_m_Pay_PaymentAccount.PayLevel.ToString2();
|
this.spanPaymentAccountPayMoney.InnerText = "¥ " + n_m_Pay_PaymentAccount.PayMoney.ToDecimal2Yen().ToString2();
|
this.spanPaymentAccountCreditLine.InnerText = n_m_Pay_PaymentAccount.CreditLine.ToDecimal2Yen().ToString2();
|
this.spanPaymentAccountSurplusCredit.InnerText = n_m_Pay_PaymentAccount.SurplusCredit.ToDecimal2Yen().ToString2();
|
this.spanPaymentAccountCreditUsed.InnerText = (n_m_Pay_PaymentAccount.CreditLine.Value - n_m_Pay_PaymentAccount.SurplusCredit.Value).ToDecimal2Yen().ToString2();
|
//this.spanPaymentAccountSurplusMoney.InnerText = m_Pay_PaymentAccount.SurplusMoney.ToDecimal2Yen().ToString2();
|
this.spanPaymentAccountOrderCommissionMoney.InnerText = n_m_Pay_PaymentAccount.OrderCommissionMoney.ToDecimal2Yen().ToString2();
|
this.spanPaymentAccountScore.InnerText = n_m_Pay_PaymentAccount.Score.ToString2();
|
this.spanPaymentAccountPromotionMoney.InnerText = n_m_Pay_PaymentAccount.PromotionMoney.ToDecimal2Yen().ToString2();
|
this.spanProxyMoney.InnerText = n_m_Pay_PaymentAccount.ProxyMoney.ToDecimal2Yen().ToString2();
|
this.spanProxyMoneyCash.InnerText = n_m_Pay_PaymentAccount.ProxyMoneyCash.ToDecimal2Yen().ToString2();
|
this.spanProxyMoneyAudit.InnerText = n_m_Pay_PaymentAccount.ProxyMoneyAudit.ToDecimal2Yen().ToString2();
|
if (CurrentUser.MemberType == "买家会员")
|
{
|
this.ShowComission.Visible = false;
|
}
|
else
|
{
|
this.HideComission.Visible = false;
|
}
|
}
|
#endregion
|
}
|
|
protected void btn_Query_Click(object sender, EventArgs e)
|
{
|
this.BtnSearch.Visible = true;
|
string startDate = this.txtBeginData.Value;
|
string endDate = this.txtEndDate.Value;
|
PaymentAccountQueryModel model = bll_EC_MemberBasicBLL.GetPaymentAccountQueryResult(startDate, endDate, CurrentPayAccount.Keyid.Value);
|
if (model != null)
|
{
|
this.spanAllScore.InnerText = model.AllScore.ToString2();
|
this.spanUsedScore.InnerText = model.UsedScore.ToString2();
|
this.spanSurplusScore.InnerText = model.SurplusScore.ToString2();
|
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.spanAllPayMoney.InnerText = model.AllPayMoney.ToDecimal2Yen().ToString2();
|
this.spanPayMoneyByPrint.InnerText = model.PayMoneyByPrint.ToDecimal2Yen().ToString2();
|
}
|
}
|
|
protected void btnReSet_Click(object sender, EventArgs e)
|
{
|
this.BtnSearch.Visible = true;
|
this.txtBeginData.Value = string.Empty;
|
this.txtEndDate.Value = string.Empty;
|
PaymentAccountQueryModel model = bll_EC_MemberBasicBLL.GetPaymentAccountQueryResult(string.Empty, string.Empty, CurrentPayAccount.Keyid.Value);
|
if (model != null)
|
{
|
this.spanAllScore.InnerText = model.AllScore.ToString2();
|
this.spanUsedScore.InnerText = model.UsedScore.ToString2();
|
this.spanSurplusScore.InnerText = model.SurplusScore.ToString2();
|
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.spanAllPayMoney.InnerText = model.AllPayMoney.ToDecimal2Yen().ToString2();
|
this.spanPayMoneyByPrint.InnerText = model.PayMoneyByPrint.ToDecimal2Yen().ToString2();
|
}
|
}
|
}
|
}
|