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.Model;
using CY.Infrastructure.Query;
using CY.Infrastructure.Common;
using CY.BLL.Sys;
namespace CY.WebForm.Pages.member
{
//吴辉
//账户安全信息
public partial class AccountSafe : BasePage
{
EC_MemberBasicBLL bll_EC_MemberBasicBLL = null;
//初始化
public AccountSafe()
{
bll_EC_MemberBasicBLL = new EC_MemberBasicBLL();
}
//页面加载
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataBindToPage();
}
}
//数据绑定
public void DataBindToPage()
{
Guid nowGuid = CurrentUser.MemberId;
EC_SafeValidation m_EC_SafeValidation = bll_EC_MemberBasicBLL.GetSafeValidationByMemberId(nowGuid);
int AccountSafeLevel = 0; //账户安全级别
#region 账户安全信息表赋值
if (m_EC_SafeValidation != null)
{
if (m_EC_SafeValidation.MobileNumValidated)
{
this.imgSMS.Src = "../../images/Common/icon-msg_true.png";
this.spanSMS.InnerHtml = "已验证";
AccountSafeLevel += 1;
}
else
{
this.imgSMS.Src = "../../images/Common/icon-msg_false.png";
this.spanSMS.InnerHtml = "立即验证";
}
if (m_EC_SafeValidation.MailValidated)
{
this.imgEmail.Src = "../../images/Common/icon-msg_true.png";
this.spanEmail.InnerHtml = "已验证";
AccountSafeLevel += 1;
}
else
{
this.imgEmail.Src = "../../images/Common/icon-msg_false.png";
this.spanEmail.InnerHtml = "立即验证";
}
if (!string.IsNullOrEmpty(CurrentPayAccount.PayPwd))
{
this.imgSafeCode.Src = "../../images/Common/icon-msg_true.png";
this.spanSafeCode.InnerHtml = "已设置";
AccountSafeLevel += 1;
}
else
{
this.imgSafeCode.Src = "../../images/Common/icon-msg_false.png";
this.spanSafeCode.InnerHtml = "立即设置";
}
switch ( AccountSafeLevel)
{
case 0:
case 1:
this.spanAccountSafeLevel.InnerText = "差";
break;
case 2:
this.spanAccountSafeLevel.InnerText = "一般";
break;
case 3:
this.spanAccountSafeLevel.InnerText = "极好";
break;
default:
break;
}
}
#endregion
}
}
}