📄 usershow.aspx.cs
字号:
return;
default:
return;
}
}
}
protected void EgvUserPoint_DataBound(object sender, EventArgs e)
{
if (this.EgvUserPoint.Rows.Count > 0)
{
GridViewRow footerRow = this.EgvUserPoint.FooterRow;
int num = 3;
while (footerRow.Cells.Count != num)
{
footerRow.Cells.RemoveAt(0);
}
footerRow.CssClass = this.EgvUserPoint.RowStyle.CssClass;
ArrayList totalInComeAndPayOutAll = UserPointLog.GetTotalInComeAndPayOutAll(this.userName);
decimal num2 = DataConverter.CDecimal(totalInComeAndPayOutAll[0]);
decimal num3 = DataConverter.CDecimal(totalInComeAndPayOutAll[1]);
footerRow.Cells[0].ColumnSpan = 3;
footerRow.Cells[1].ColumnSpan = 2;
footerRow.Cells[2].ColumnSpan = 1;
footerRow.Cells[0].Controls.Add(CreateTable("本页合计", "总计" + this.m_PointName, "right"));
footerRow.Cells[1].Controls.Add(CreateTable("收入:" + this.m_CurrentPageIncome.ToString() + " 支出:" + Math.Abs(this.m_CurrentPagePayout).ToString() + "", "收入:" + Math.Abs(num2).ToString() + " 支出:" + Math.Abs(num3).ToString() + "", "left"));
Table child = CreateTable(" ", string.Format(this.m_PointName + "余额:{0:0}", num2 - num3), "right");
child.Rows[1].Cells[0].Attributes.Add("align", "center");
footerRow.Cells[2].Controls.Add(child);
}
}
protected void EgvUserPoint_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
UserPointLogInfo dataItem = (UserPointLogInfo) e.Row.DataItem;
if (dataItem != null)
{
Label label = (Label) e.Row.FindControl("LblIncomePayOut");
label.Text = this.GetIncomePayOut(dataItem.Point, dataItem.IncomePayOut);
}
}
}
protected void GdvPaymentLogList_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
PaymentLogInfo dataItem = e.Row.DataItem as PaymentLogInfo;
if (dataItem != null)
{
Label label = (Label) e.Row.FindControl("LblStatus");
Label label2 = (Label) e.Row.FindControl("LblPlatform");
label.Text = PaymentLog.GetStatusDepict(dataItem.PlatformId, dataItem.Status);
if (dataItem.Status != 1)
{
e.Row.Cells[0].Enabled = false;
}
label2.Text = PayPlatform.GetPayPlatformById(dataItem.PlatformId).PayPlatformName;
}
}
}
protected string GetCurrencyType(object type)
{
return BankrollItem.GetCurrencyType(type);
}
public string GetIncomePayOut(decimal point, int incomePayOut)
{
string str = "";
if (incomePayOut == 1)
{
str = " <span style='color:blue'> +" + point.ToString() + "</span>";
this.m_CurrentPageIncome += point;
return str;
}
str = " <span style='color:red'> -" + point.ToString() + "</span>";
this.m_CurrentPagePayout += point;
return str;
}
protected string GetMoneyType(object type)
{
return BankrollItem.GetMoneyType(type);
}
protected PayPlatformInfo GetPayPlatformById(int payPlatformId)
{
return PayPlatform.GetPayPlatformById(payPlatformId);
}
public string IncomePayout(int consumeType, int validNum)
{
string str2 = validNum.ToString() + "天";
switch (consumeType)
{
case 1:
return ("<span style='color:blue'> +" + str2 + "</span>");
case 2:
return ("<span style='color:red'> " + str2 + "</span>");
}
return "<span style='color:#000000'>其他</span>";
}
private void InitPrivew()
{
if (PEContext.Current.Admin.UserName.Equals(BasePage.RequestString("UserName")))
{
this.BtnModifyUserSubmit.Enabled = true;
}
else
{
this.BtnModifyUserSubmit.Enabled = RolePermissions.AccessCheck(OperateCode.UserModify);
}
this.BtnAddPoint.Enabled = RolePermissions.AccessCheck(OperateCode.UserPointManage);
this.BtnAddValidDate.Enabled = RolePermissions.AccessCheck(OperateCode.UserValidDateManage);
this.BtnDelete.Enabled = RolePermissions.AccessCheck(OperateCode.UserDelete);
this.BtnLock.Enabled = RolePermissions.AccessCheck(OperateCode.UserLock);
this.BtnMinusPoint.Enabled = RolePermissions.AccessCheck(OperateCode.UserPointManage);
this.BtnMinusValidDate.Enabled = RolePermissions.AccessCheck(OperateCode.UserValidDateManage);
}
protected string IsShow()
{
string str = "";
if (!this.m_ShowCompanyInfo)
{
str = "display:none";
}
return str;
}
private void LoadContacter(UserInfo usersInfo)
{
ContacterInfo contacterByUserName = new ContacterInfo();
contacterByUserName = Contacter.GetContacterByUserName(usersInfo.UserName);
if (contacterByUserName != null)
{
this.LblTrueName.Text = contacterByUserName.TrueName;
this.LblTitle.Text = contacterByUserName.Title;
this.LblCountry.Text = contacterByUserName.Country;
this.LblProvince.Text = contacterByUserName.Province;
this.LblCity.Text = contacterByUserName.City;
this.LblZipCode.Text = contacterByUserName.ZipCode;
this.LblAddress.Text = contacterByUserName.Address;
this.LblOfficePhone.Text = contacterByUserName.OfficePhone;
this.LblHomephone.Text = contacterByUserName.HomePhone;
this.LblMobile.Text = contacterByUserName.Mobile;
this.LblFax.Text = contacterByUserName.Fax;
this.LblPHS.Text = contacterByUserName.Phs;
this.LblHomePage.Text = contacterByUserName.Homepage;
this.LbllEmail.Text = "<a href='mailto:" + contacterByUserName.Email + "' target='_blank'>" + contacterByUserName.Email + "</a>";
this.LblQQ.Text = contacterByUserName.QQ;
this.LblMSN.Text = contacterByUserName.Msn;
this.LblICQ.Text = contacterByUserName.Icq;
this.LblYahoo.Text = contacterByUserName.Yahoo;
this.LblUC.Text = contacterByUserName.UC;
this.LblAim.Text = contacterByUserName.Aim;
if (contacterByUserName.Birthday.HasValue)
{
this.LblBirthday.Text = contacterByUserName.Birthday.Value.ToString("yyyy年MM月dd日");
}
this.LblIDCard.Text = contacterByUserName.IdCard;
this.LblNativePlace.Text = contacterByUserName.NativePlace;
this.LblNation.Text = contacterByUserName.Nation;
this.LblSex.Text = BasePage.EnumToHtml<UserSexType>(contacterByUserName.Sex);
this.LblMarriage.Text = BasePage.EnumToHtml<UserMarriageType>(contacterByUserName.Marriage);
this.LblEducation.Text = Choiceset.GetDictionaryFieldValueByName("PE_Contacter", "Education")[contacterByUserName.Education].DataTextField;
this.LblGraduateFrom.Text = contacterByUserName.GraduateFrom;
this.LblInterestsOfLife.Text = contacterByUserName.InterestsOfLife;
this.LblInterestsOfCulture.Text = contacterByUserName.InterestsOfCulture;
this.LblInterestsOfAmusement.Text = contacterByUserName.InterestsOfAmusement;
this.LblInterestsOfSport.Text = contacterByUserName.InterestsOfSport;
this.LblInterestsOfOther.Text = contacterByUserName.InterestsOfOther;
this.LblIncome.Text = Choiceset.GetDictionaryFieldValueByName("PE_Contacter", "Income")[contacterByUserName.Income].DataTextField;
this.LblCompany.Text = contacterByUserName.Company;
this.LblDepartment.Text = contacterByUserName.Department;
this.LblPosition.Text = contacterByUserName.Position;
this.LblOperation.Text = contacterByUserName.Operation;
this.LblCompanyAddress.Text = contacterByUserName.CompanyAddress;
}
}
protected void OtherIncome_Click(object sender, EventArgs e)
{
BasePage.ResponseRedirect("AddOtherIncome.aspx?UserID=" + this.userId.ToString());
}
protected void Page_Load(object sender, EventArgs e)
{
UserInfo userById;
this.m_CurrentPagePayout = 0M;
this.m_CurrentPageIncome = 0M;
this.userId = BasePage.RequestInt32("UserID");
this.userName = BasePage.RequestString("UserName");
int infoType = BasePage.RequestInt32("InfoType");
if ((this.userId <= 0) && string.IsNullOrEmpty(this.userName))
{
AdminPage.WriteErrMsg("<li>参数不足!</li>", "UserManage.aspx");
}
this.BtnExchangePoint.Text = this.m_PointName + "兑换";
this.BtnAddPoint.Text = "奖励" + this.m_PointName;
this.BtnMinusPoint.Text = "扣除" + this.m_PointName;
this.EgvUserPoint.Columns[2].HeaderText = SiteConfig.UserConfig.PointName + "数";
if (this.userId != 0)
{
userById = Users.GetUserById(this.userId);
this.userName = userById.UserName;
}
else
{
userById = Users.GetUsersByUserName(this.userName);
this.userId = userById.UserId;
}
if (!userById.IsNull)
{
if (!base.IsPostBack)
{
this.InitPrivew();
if (!SiteConfig.ConfigInfo().UserConfig.EnableRegCompany)
{
this.EBtnRegCompany.Visible = false;
}
this.CompanySet(userById);
this.CheckAgent(userById);
this.LblUserId.Text = userById.UserId.ToString();
this.LblUserStatus.Text = BasePage.EnumToHtml<UserStatus>(userById.Status);
this.LblUserFriendGroup.Text = userById.UserFriendGroup.Replace("$", ",");
this.LblConsumeMoney.Text = userById.ConsumeMoney.ToString("0.00") + " 元";
this.LblConsumePoint.Text = userById.ConsumePoint.ToString() + " " + SiteConfig.UserConfig.PointUnit;
this.LblConsumeExp.Text = userById.ConsumeExp.ToString() + " 分";
this.LblPostItems.Text = userById.PostItems.ToString();
this.LblPassedItems.Text = userById.PassedItems.ToString();
this.LblRejectItems.Text = userById.RejectItems.ToString();
this.LblDelItems.Text = userById.DelItems.ToString();
this.LblLoginTimes.Text = userById.LoginTimes.ToString();
this.LblUserName.Text = userById.UserName;
this.LblEmail.Text = "<a href='mailto:" + userById.Email + "' target='_blank'>" + userById.Email + "</a>";
this.LblGroupName.Text = UserGroups.GetGroupName(userById.GroupId);
this.LblUserType.Text = BasePage.EnumToHtml<UserType>(userById.UserType);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -