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) { this.m_ClientId = userById.ClientId; if (!base.IsPostBack) { this.InitPrivew(); if (!SiteConfig.ConfigInfo().UserConfig.EnableRegCompany) { this.EBtnRegCompany.Visible = false; } this.CompanySet(userById); this.CheckeShop(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.LogOnTimes.ToString(); this.LblUserName.Text = userById.UserName; this.LnkEmail.Text = userById.Email; this.LnkEmail.NavigateUrl = "mailto:" + userById.Email; this.LnkEmail.Target = "_blank"; this.LblGroupName.Text = UserGroups.GetGroupName(userById.GroupId); this.LblUserType.Text = BasePage.EnumToHtml <UserType>(userById.UserType); 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.LastLogOnTime.ToString())) { this.LblLastLoginTime.Text = userById.LastLogOnTime.Value.ToString("yyyy年MM月dd日 HH时mm分ss秒"); } this.LblLastLoginIP.Text = userById.LastLogOnIP; 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); } }
protected void Page_Load(object sender, EventArgs e) { this.BtnExchangePoint.Text = "兑换" + SiteConfig.UserConfig.PointName; this.BtnConsumeLog.Text = SiteConfig.UserConfig.PointName + "明细"; if (string.Compare(SiteConfig.SiteInfo.ProductEdition, "cms", true) == 0) { this.BtnShoppingCart.Visible = false; this.BtnRemitValidate.Visible = false; } if (!base.IsPostBack) { UserInfo usersByUserName = Users.GetUsersByUserName(PEContext.Current.User.UserName); if (usersByUserName.IsNull) { DynamicPage.WriteErrMsg("<li>没有" + PEContext.Current.User.UserName + "的用户信息,请检查此用户是否注册是否存在!</li>"); } this.InitPrivew(usersByUserName); this.LblUserName.Text = usersByUserName.UserName; this.LblEmail.Text = usersByUserName.Email; this.LblGroupName.Text = UserGroups.GetGroupName(usersByUserName.GroupId); this.LblUserType.Text = BasePage.EnumToHtml <UserType>(usersByUserName.UserType); this.LblBalance.Text = usersByUserName.Balance.ToString("0.00"); this.LblUserPoint.Text = usersByUserName.UserPoint.ToString(); this.LblUserExp.Text = usersByUserName.UserExp.ToString(); this.m_ShowCompanyInfo = false; if (SiteConfig.ConfigInfo().UserConfig.EnableRegCompany) { switch (usersByUserName.UserType) { case UserType.Persional: this.BtnRegCompany.Visible = true; this.BtnDelCompany.Visible = false; this.BtnExitCompany.Visible = false; break; case UserType.Creator: this.m_ShowCompanyInfo = true; this.LblAuditingCompanyMemberCountTitle.Visible = true; this.LblAuditingCompanyMemberCount.Visible = true; this.LblAuditingCompanyMemberCount.Text = Users.GetAuditingCompanyMemberCount(usersByUserName.CompanyId).ToString() + " 名"; if (usersByUserName.ClientId == 0) { this.BtnDelCompany.Visible = true; } break; case UserType.Administrators: this.m_ShowCompanyInfo = true; this.BtnExitCompany.Visible = true; break; case UserType.CommonLeaguer: this.m_ShowCompanyInfo = true; this.BtnExitCompany.Visible = true; break; case UserType.AuditingLeaguer: this.BtnExitCompany.Visible = true; break; } } if (this.m_ShowCompanyInfo) { this.CompanyInfo1.CompanyId = usersByUserName.CompanyId; this.CompanyMemberManage1.CompanyId = usersByUserName.CompanyId; this.CompanyMemberManage1.UserType = usersByUserName.UserType; this.CompanyMemberManage1.UserId = usersByUserName.UserId; this.CompanyMemberManage1.ReturnAddress = "Default.aspx"; } this.LblValidNum.Text = Users.GetValidNum(usersByUserName.EndTime); this.LblUnsignedItems.Text = SignInLog.GetNotSignInContentCountByUserName(PEContext.Current.User.UserName).ToString(); this.LblUnreadMsg.Text = EasyOne.Accessories.Message.UnreadMessageCount(PEContext.Current.User.UserName).ToString(); if (usersByUserName.IsInheritGroupRole) { this.LblSpecialPermission.Text = "继承会员组权限"; } else { this.LblSpecialPermission.Text = "单独权限设置"; } this.LblRegTime.Text = usersByUserName.RegTime.ToString("yyyy年MM月dd日"); this.LblJoinTime.Text = usersByUserName.JoinTime.ToString("yyyy年MM月dd日"); if (!string.IsNullOrEmpty(usersByUserName.LastLogOnTime.ToString())) { this.LblLastLoginTime.Text = usersByUserName.LastLogOnTime.Value.ToString("yyyy年MM月dd日 HH时mm分ss秒"); } this.LblLastLoginIP.Text = usersByUserName.LastLogOnIP; ContacterInfo contacterByUserName = new ContacterInfo(); contacterByUserName = Contacter.GetContacterByUserName(usersByUserName.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 = contacterByUserName.Email; 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; } if (!SiteConfig.SiteOption.EnablePointMoneyExp) { this.BalancePoint.Style.Add("display", "none"); this.ExpValid.Style.Add("display", "none"); this.BtnExchangePoint.Visible = false; this.BtnExchangeValidDate.Visible = false; this.BtnRecharge.Visible = false; this.BtnRechargeLog.Visible = false; this.BtnConsumeLog.Visible = false; this.BtnBankroll.Visible = false; } this.BtnPayOnline.Attributes.Add("onclick", "this.form.target='_newName'"); if (SiteConfig.SiteInfo.ProductEdition.ToLower() != "eshop") { this.BtnOrder.Visible = false; } } if (EasyOne.Accessories.Message.UnreadMessageCount(PEContext.Current.User.UserName) > 0) { string script = "<script language='javascript'>window.open('../User/Message/PopupMessageRead.aspx?Unread=1&MessageID=" + EasyOne.Accessories.Message.GetUnreadMessageFirstId(PEContext.Current.User.UserName).ToString() + "', 'newmessage', 'width=600,height=400,scrollbars=yes,resizable=yes')</script>"; if (!this.Page.ClientScript.IsClientScriptBlockRegistered(typeof(string), "OpenWindow")) { this.Page.ClientScript.RegisterClientScriptBlock(typeof(string), "OpenWindow", script); } } }