本文整理汇总了C#中DBLayer.GetPageContent方法的典型用法代码示例。如果您正苦于以下问题:C# DBLayer.GetPageContent方法的具体用法?C# DBLayer.GetPageContent怎么用?C# DBLayer.GetPageContent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBLayer
的用法示例。
在下文中一共展示了DBLayer.GetPageContent方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Session["CurrentUser"] == null)
{
Response.Redirect("Login.aspx");
}
if (CurrentPage != 0)
{
//BindData();
DBLayer db = new DBLayer();
DataSet ds = new DataSet();
ds = db.GetPageContent(CurrentPage);
if (ds.Tables[0].Rows.Count > 0)
{
uiTextBoxTitle.Text = ds.Tables[0].Rows[0]["arTitle"].ToString();
uiFCKeditorContent.Value = Server.HtmlDecode(ds.Tables[0].Rows[0]["arContent"].ToString());
}
uiPanelCurrentPages.Visible = false;
uiPanelCurrent.Visible = true;
}
else
{
Response.Redirect("AdminCP.aspx");
}
}
}
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
DBLayer db = new DBLayer();
DataSet ds = new DataSet();
ds = db.GetPageContent(2);
uiLabelTitle.Text = ds.Tables[0].Rows[0]["Title"].ToString();
uiLiteralContent.Text = Server.HtmlDecode(ds.Tables[0].Rows[0]["Content"].ToString());
}
示例3: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DBLayer db = new DBLayer();
DataSet ds = new DataSet();
ds = db.GetPageContent(2);
uiLiteralContent.Text = Server.HtmlDecode(ds.Tables[0].Rows[0]["arContent"].ToString());
}
RegisterStartupScript("menu", "<script type='text/javascript'>$(\"#m5\").addClass(\"selected\");</script>");
}
示例4: uiGridViewPages_RowCommand
protected void uiGridViewPages_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "EditPages")
{
DBLayer db = new DBLayer();
CurrentPage = Convert.ToInt32(e.CommandArgument);
DataSet ds = db.GetPageContent(CurrentPage);
uiTextBoxTitle.Text = ds.Tables[0].Rows[0]["Title"].ToString();
uiTextBoxContent.Text = Server.HtmlDecode(ds.Tables[0].Rows[0]["Content"].ToString());
uiPanelViewPages.Visible = false;
uiPanelEdit.Visible = true;
}
}
示例5: uiGridViewPages_RowCommand
protected void uiGridViewPages_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "EditPage")
{
int id = Convert.ToInt32(e.CommandArgument.ToString());
CurrentPage = id;
DBLayer db = new DBLayer();
DataSet ds = new DataSet();
ds = db.GetPageContent(id);
if (ds.Tables[0].Rows.Count > 0)
{
uiTextBoxTitle.Text = ds.Tables[0].Rows[0]["arTitle"].ToString();
uiFCKeditorContent.Value = Server.HtmlDecode(ds.Tables[0].Rows[0]["arContent"].ToString());
}
uiPanelCurrentPages.Visible = false;
uiPanelCurrent.Visible = true;
}
}
示例6: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["PID"] != null && !string.IsNullOrEmpty(Request.QueryString["PID"].ToString()))
{
int id = Convert.ToInt32(Request.QueryString["PID"].ToString());
DBLayer db = new DBLayer();
DataSet ds = new DataSet();
ds = db.GetPageContent(id);
if (ds.Tables[0].Rows.Count != 0)
{
uiLabelTitle.Text = ds.Tables[0].Rows[0]["Title"].ToString();
uiLiteralContent.Text = Server.HtmlDecode(ds.Tables[0].Rows[0]["Content"].ToString());
}
else
{
Response.Redirect("Node.aspx?PID=2");
}
}
else
{
Response.Redirect("Node.aspx?PID=2");
}
}