userinfo.aspx.cs
来自「1、用SQL查询器打开install目录下的dooogo.sql运行之后创建数据」· CS 代码 · 共 127 行
CS
127 行
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Club.Framework;
using Club.Framework.Components;
using Club.Framework.Configuration;
using Club.Framework.Data;
using Club.Framework.Xml;
namespace Club.Home
{
/// <summary>
/// UserInfo 的摘要说明。
/// </summary>
public class userInfo : System.Web.UI.Page
{
protected Club.Common.WebUI.ContentRegion titleContains;
protected Club.Common.WebUI.ContentRegion headerContains;
protected Club.Common.WebUI.ContentRegion Content;
protected Club.Common.WebUI.SitePage PageManage;
protected string Title=string.Empty;
protected System.Web.UI.WebControls.Panel p_Info;
protected int RegisterId
{
get
{
if(Request.Params["RegisterId"]==null||Request.Params["RegisterId"]=="")
{
return 0;
}
return int.Parse(Request.Params["RegisterId"]);
}
}
protected int LoginRegisterId
{
get
{
try
{
return FormSecurity.GetMemberId();
}
catch
{
return 0;
}
}
}
private c_UserInfo _userInfo;
protected c_UserInfo UserInfo
{
get
{
return _userInfo;
}
}
private c_UserDataInfo userData;
public c_UserDataInfo UserData
{
get
{
return userData;
}
}
private c_HomeSettingInfo setting;
protected c_HomeSettingInfo Setting
{
get
{
return this.setting;
}
}
private void Page_Load(object sender, System.EventArgs e)
{
if(this.RegisterId==0)
{
throw new ShowException("对不起!没有找到该用户网站!",Globals.UrlFormats.Home());
}
this._userInfo=Globals.DbProvider.Select_c_UserByID(this.RegisterId);
this.setting=Globals.DbProvider.Select_c_HomeSettingByRegisterID(this.RegisterId);
if(this.setting==null)
{
throw new ShowException("您的网站还未设置,请在个人管理设置!",Globals.UrlFormats.Home());
}
//如果不是用户本人并关闭网站提示
if(!setting.IsOpen&&this.RegisterId!=this.LoginRegisterId)
{
throw new ShowException("该网站已经关闭!",Globals.UrlFormats.Home());
}
if(setting.SiteTitle==null||setting.SiteTitle=="")
{
setting.SiteTitle = UserInfo.NiceName + "的网上家园";
}
this.Title=setting.SiteTitle + "-详细资料";
this.userData=Globals.DbProvider.Select_c_UserDataByRegisterID(this.RegisterId);
this.p_Info.Visible = this.userData.IsOpen;
Page.DataBind();
}
#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?