📄 usershow.aspx.cs
字号:
this.LblBalance.Text = userById.Balance.ToString("0.00") + " 元";
this.LblUserPoint.Text = userById.UserPoint.ToString() + " " + SiteConfig.UserConfig.PointUnit;
this.LblUserExp.Text = userById.UserExp.ToString() + " 分";
this.LblValidNum.Text = Users.GetValidNum(userById.EndTime);
this.LblUnsignedItems.Text = SigninLog.GetNotSigninContentCountByUserName(userById.UserName).ToString() + " 篇";
this.LblUnreadMsg.Text = Message.UnreadMessageCount(userById.UserName).ToString() + " 条";
if (userById.IsInheritGroupRole)
{
this.LblSpecialPermission.Text = "继承会员组权限";
}
else
{
this.LblSpecialPermission.Text = "单独权限设置";
}
this.LblRegTime.Text = userById.RegTime.ToString("yyyy年MM月dd日");
this.LblJoinTime.Text = userById.JoinTime.ToString("yyyy年MM月dd日");
if (!string.IsNullOrEmpty(userById.LastLoginTime.ToString()))
{
this.LblLastLoginTime.Text = userById.LastLoginTime.Value.ToString("yyyy年MM月dd日 HH时mm分ss秒");
}
this.LblLastLoginIP.Text = userById.LastLoginIP;
if (userById.Status == UserStatus.Locked)
{
this.BtnLock.Text = " 解锁此会员 ";
this.BtnLock.OnClientClick = "return confirm('确定要解锁此会员吗?');";
this.HdnLockType.Value = "0";
}
else
{
this.BtnLock.Text = " 锁定此会员 ";
this.BtnLock.OnClientClick = "return confirm('确定要锁定此会员吗?');";
this.HdnLockType.Value = "1";
}
this.LoadContacter(userById);
if (!SiteConfig.SiteOption.EnablePointMoneyExp)
{
this.BalancePoint.Style.Add("display", "none");
this.ExpValid.Style.Add("display", "none");
this.ConsumeMoney.Style.Add("display", "none");
this.ConsumeExp.Style.Add("display", "none");
this.Details.Style.Add("display", "none");
this.BtnIncome.Visible = false;
this.OtherIncome.Visible = false;
this.BtnPayment.Visible = false;
this.BtnExchangePoint.Visible = false;
this.BtnAddPoint.Visible = false;
this.BtnMinusPoint.Visible = false;
this.BtnExchangeValid.Visible = false;
this.BtnAddValidDate.Visible = false;
this.BtnMinusValidDate.Visible = false;
}
}
this.ShowInfoInitialize(infoType, userById);
}
}
private void ShowInfoInitialize(int infoType, UserInfo userInfo)
{
if (infoType == 0)
{
this.OdsInfo.StartRowIndexParameterName = "startRowIndexId";
this.OdsInfo.MaximumRowsParameterName = "maxNumberRows";
this.OdsInfo.TypeName = "PowerEasy.Shop.Order";
this.OdsInfo.SelectMethod = "GetList";
this.OdsInfo.SelectCountMethod = "GetTotalOfOrder";
if (!this.Page.IsPostBack)
{
this.InfoTabTitle0.Attributes.Add("class", "titlemouseover");
this.OdsInfo.SelectParameters.Add("searchType", TypeCode.String, "19");
this.OdsInfo.SelectParameters.Add("field", TypeCode.String, "UserName");
this.OdsInfo.SelectParameters.Add("keyword", TypeCode.String, userInfo.UserName);
this.OdsInfo.SelectParameters.Add("action", TypeCode.String, "search");
this.EgvOrder.DataSourceID = "OdsInfo";
this.EgvOrder.DataBind();
this.EgvOrder.Visible = true;
}
}
else
{
this.InfoTabTitle0.Attributes.Add("onclick", "window.location.href='UserShow.aspx?InfoType=0&UserID=" + userInfo.UserId.ToString() + "'");
}
if (infoType == 1)
{
this.OdsInfo.StartRowIndexParameterName = "startRowIndex";
this.OdsInfo.MaximumRowsParameterName = "maximumRows";
this.OdsInfo.TypeName = "PowerEasy.Accessories.BankrollItem";
this.OdsInfo.SelectMethod = "GetList";
this.OdsInfo.SelectCountMethod = "GetTotalOfBankrollItem";
if (!this.Page.IsPostBack)
{
this.InfoTabTitle1.Attributes.Add("class", "titlemouseover");
this.OdsInfo.SelectParameters.Add("searchType", TypeCode.String, "10");
this.OdsInfo.SelectParameters.Add("field", TypeCode.Int32, "6");
this.OdsInfo.SelectParameters.Add("keyword", TypeCode.String, userInfo.UserName);
this.EgvBankrollItem.DataSourceID = "OdsInfo";
this.EgvBankrollItem.DataBind();
this.EgvBankrollItem.Visible = true;
}
}
else
{
this.InfoTabTitle1.Attributes.Add("onclick", "window.location.href='UserShow.aspx?InfoType=1&UserID=" + userInfo.UserId.ToString() + "'");
}
if (infoType == 2)
{
this.OdsInfo.TypeName = "PowerEasy.UserManage.UserPointLog";
this.OdsInfo.StartRowIndexParameterName = "startRowIndexId";
this.OdsInfo.MaximumRowsParameterName = "maxNumberRows";
this.OdsInfo.SelectMethod = "GetPointList";
this.OdsInfo.SelectCountMethod = "GetNumberOfUsersOnline";
this.EgvUserPoint.DataSourceID = "OdsInfo";
if (!this.Page.IsPostBack)
{
this.InfoTabTitle2.Attributes.Add("class", "titlemouseover");
this.OdsInfo.SelectParameters.Add("scopesType", TypeCode.String, "10");
this.OdsInfo.SelectParameters.Add("field", TypeCode.String, "1");
this.OdsInfo.SelectParameters.Add("keyword", TypeCode.String, userInfo.UserName);
this.EgvUserPoint.DataBind();
this.EgvUserPoint.Visible = true;
}
}
else
{
this.InfoTabTitle2.Attributes.Add("onclick", "window.location.href='UserShow.aspx?InfoType=2&UserID=" + userInfo.UserId.ToString() + "'");
}
if (infoType == 3)
{
this.OdsInfo.TypeName = "PowerEasy.UserManage.UserValidLog";
this.OdsInfo.StartRowIndexParameterName = "startRowIndexId";
this.OdsInfo.MaximumRowsParameterName = "maxNumberRows";
this.OdsInfo.SelectMethod = "GetValidList";
this.OdsInfo.SelectCountMethod = "GetNumberOfUsersOnline";
if (!this.Page.IsPostBack)
{
this.InfoTabTitle3.Attributes.Add("class", "titlemouseover");
this.OdsInfo.SelectParameters.Add("scopesType", TypeCode.String, "10");
this.OdsInfo.SelectParameters.Add("field", TypeCode.String, "1");
this.OdsInfo.SelectParameters.Add("keyword", TypeCode.String, userInfo.UserName);
this.EgvUserValid.DataSourceID = "OdsInfo";
this.EgvUserValid.DataBind();
this.EgvUserValid.Visible = true;
}
}
else
{
this.InfoTabTitle3.Attributes.Add("onclick", "window.location.href='UserShow.aspx?InfoType=3&UserID=" + userInfo.UserId.ToString() + "'");
}
if (infoType == 4)
{
this.OdsInfo.TypeName = "PowerEasy.Accessories.PaymentLog";
this.OdsInfo.StartRowIndexParameterName = "startRowIndexId";
this.OdsInfo.MaximumRowsParameterName = "maxNumberRows";
this.OdsInfo.SelectMethod = "GetList";
this.OdsInfo.SelectCountMethod = "GetTotalOfPaymentLog";
if (!this.Page.IsPostBack)
{
this.InfoTabTitle4.Attributes.Add("class", "titlemouseover");
this.OdsInfo.SelectParameters.Add("searchType", TypeCode.String, "10");
this.OdsInfo.SelectParameters.Add("field", TypeCode.String, "UserName");
this.OdsInfo.SelectParameters.Add("keyword", TypeCode.String, userInfo.UserName);
this.GdvPaymentLogList.DataSourceID = "OdsInfo";
this.GdvPaymentLogList.DataBind();
this.GdvPaymentLogList.Visible = true;
}
}
else
{
this.InfoTabTitle4.Attributes.Add("onclick", "window.location.href='UserShow.aspx?InfoType=4&UserID=" + userInfo.UserId.ToString() + "'");
}
if (infoType == 5)
{
this.OdsInfo.TypeName = "PowerEasy.Crm.Complain";
this.OdsInfo.StartRowIndexParameterName = "startRowIndexId";
this.OdsInfo.MaximumRowsParameterName = "maxNumberRows";
this.OdsInfo.SelectMethod = "GetList";
this.OdsInfo.SelectCountMethod = "GetTotal";
if (!this.Page.IsPostBack)
{
this.InfoTabTitle5.Attributes.Add("class", "titlemouseover");
this.OdsInfo.SelectParameters.Add("searchType", TypeCode.String, "0");
this.OdsInfo.SelectParameters.Add("field", TypeCode.Int32, "3");
this.OdsInfo.SelectParameters.Add("keyword", TypeCode.String, userInfo.UserName);
this.EgvComplain.DataSourceID = "OdsInfo";
this.EgvComplain.DataBind();
this.EgvComplain.Visible = true;
}
}
else
{
this.InfoTabTitle5.Attributes.Add("onclick", "window.location.href='UserShow.aspx?InfoType=5&UserID=" + userInfo.UserId.ToString() + "'");
}
if (infoType == 6)
{
this.OdsInfo.TypeName = "PowerEasy.Shop.Order";
this.OdsInfo.StartRowIndexParameterName = "startRowIndexId";
this.OdsInfo.MaximumRowsParameterName = "maxNumberRows";
this.OdsInfo.SelectMethod = "GetList";
this.OdsInfo.SelectCountMethod = "GetTotalOfOrder";
if (!this.Page.IsPostBack)
{
this.InfoTabTitle6.Attributes.Add("class", "titlemouseover");
this.OdsInfo.SelectParameters.Add("searchType", TypeCode.String, "10");
this.OdsInfo.SelectParameters.Add("field", TypeCode.String, "AgentName");
this.OdsInfo.SelectParameters.Add("keyword", TypeCode.String, userInfo.UserName);
this.OdsInfo.SelectParameters.Add("action", TypeCode.String, string.Empty);
this.EgvAgentOrders.DataSourceID = "OdsInfo";
this.EgvAgentOrders.DataBind();
this.EgvAgentOrders.Visible = true;
}
}
else
{
this.InfoTabTitle6.Attributes.Add("onclick", "window.location.href='UserShow.aspx?InfoType=6&UserID=" + userInfo.UserId.ToString() + "'");
}
if (infoType == 7)
{
this.OdsInfo.TypeName = "PowerEasy.Accessories.BankrollItem";
this.OdsInfo.StartRowIndexParameterName = "startRowIndex";
this.OdsInfo.MaximumRowsParameterName = "maximumRows";
this.OdsInfo.SelectMethod = "GetBillOfAgent";
this.OdsInfo.SelectCountMethod = "GetTotalOfBill";
if (!this.Page.IsPostBack)
{
this.InfoTabTitle7.Attributes.Add("class", "titlemouseover");
this.OdsInfo.SelectParameters.Add(new Parameter("startRowIndex", TypeCode.Int32));
this.OdsInfo.SelectParameters.Add(new Parameter("maximumRows", TypeCode.Int32));
this.OdsInfo.SelectParameters.Add(new Parameter("userName", TypeCode.String, userInfo.UserName));
this.EgvBill.DataSourceID = "OdsInfo";
this.EgvBill.DataBind();
this.EgvBill.Visible = true;
}
}
else
{
this.InfoTabTitle7.Attributes.Add("onclick", "window.location.href='UserShow.aspx?InfoType=7&UserID=" + userInfo.UserId.ToString() + "'");
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -