Magazine catalogue (page part Codebehind)

Source: Internet
Author: User
Page using System;
Using System.Data;
Using System.Data.SqlClient;


Using System.Web;
Using System.Web.UI;
Using System.Web.UI.WebControls;




Namespace cj168. Web
{
<summary>
Summary description for Showissuecat.
</summary>
public class ShowIssueCat:System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label Lbmaginfo;

protected System.Web.UI.WebControls.DataList Datalistmagcat;
protected System.Web.UI.WebControls.DataList DatalistShowMagArtTitleLevel2;
protected System.Web.UI.WebControls.DataList DatalistShowMagArtTitleLevel1;
protected System.Web.UI.WebControls.DataList DataList1;

protected System.Web.UI.WebControls.DataList datalistShowMagArtTitleLevel3;

protected System.Web.UI.WebControls.LinkButton LinkButton;
protected System.Web.UI.WebControls.AdRotator Adrotator1;
protected System.Web.UI.WebControls.Label Lbartdetailtitle;

protected System.Web.UI.WebControls.Label lbartquotation;
protected System.Web.UI.WebControls.Label Lbartmainheader;
protected System.Web.UI.WebControls.Label Lbartsubheader;
protected System.Web.UI.WebControls.Label Lbartviewpoint;
protected System.Web.UI.WebControls.Label Lbartpageno;
protected System.Web.UI.WebControls.Label lbartcontent;





Public Showissuecat ()
{
Page.Init + = new System.EventHandler (Page_Init);
}

protected void Page_Load (object sender, EventArgs e)
{
Put user code to initialize the page here

if (! IsPostBack)
//{




Showcat ();


//}

}

void Binddata (int magid, int magyear, int yearissue)



void Showcat ()
{
String magname = request.params["Magname"];
int magid = Int32.Parse (request.params["Magid"]);
int magyear = Int32.Parse (request.params["magyear"]);
int yearissue = Int32.Parse (request.params["yearissue"]);



if (strmagname!= string.empty && strmagid!= string.empty && strmagyear!= string.empty && str Yearissue!= String.Empty)
//{


Lbmaginfo.text = Magname + "" + Magyear + "annual" + Yearissue + "period";
//}
Else
//{
Lbmaginfo.text = "parameter Error";
//}


cj168. Dataaccess.magsdb showmagissuecat = new cj168. Dataaccess.magsdb ();
Datalistmagcat.datasource = Showmagissuecat.getmagissuecat (Magid, Magyear, yearissue);
Datalistmagcat.databind ();


}



Public DataSet showsubcat (int magid, int magyear, int yearissue, int catID)
{

cj168. Dataaccess.magsdb showsubcat = new cj168. Dataaccess.magsdb ();
DataSet dr = Showsubcat.getsubcat (Magid, Magyear, Yearissue, CatID);

Return Dr;

}

Public DataSet showmagarttitle (int catissueid)
{

cj168. Dataaccess.magsdb showmagarttitle = new cj168. Dataaccess.magsdb ();
DataSet dr = Showmagarttitle.getmagarttitle (Catissueid);

Return Dr;

}

Public String showarturl (int artid)
{
String magname = request.params["Magname"];
int magid = Int32.Parse (request.params["Magid"]);
int magyear = Int32.Parse (request.params["magyear"]);
int yearissue = Int32.Parse (request.params["yearissue"]);

Return "Showissuecat.aspx?" Magname= "+ magname +" &magid= "+ Magid +" &magyear= "+ magyear +" &yearissue= "+ yearissue +" &txtID= "+ A Rtid;

}

public void Arttitlelinkbutton_click (object sender, EventArgs e)
{
int artid = ((LinkButton) sender). TabIndex;
cj168. Dataaccess.magsdb showartdetail = new cj168. Dataaccess.magsdb ();
DataSet myDataSet = Showartdetail.getartdetail (ArtID);

DataRowView Myrowview = mydataset.tables["Artdetail"]. DEFAULTVIEW[0];

if (myrowview["quotation"]. ToString (). Trim ()!= String.Empty)
{
Lbartquotation.visible = true;
Lbartquotation.text = "<div class= ' quotation ' >" + myrowview["quotation"]. ToString () + "</div>";
}
Else
{
Lbartquotation.visible = false;
}

Lbartmainheader.text = "<div class= ' Mainheader ' >" + myrowview["Mainheader"]. ToString () + "</div>";
if (myrowview["Subheader"]. ToString (). Trim ()!= String.Empty)
{
Lbartsubheader.visible = true;
Lbartsubheader.text = "<div class= ' subheader ' >" + myrowview["subheader"]. ToString () + "</div>";
}
Else
{
Lbartsubheader.visible = false;
}

if (myrowview["ViewPoint"]. ToString (). Trim ()!= String.Empty)
{lbartviewpoint.visible = true;
Lbartviewpoint.text = "<div class= ' ViewPoint ' >" + myrowview["ViewPoint"]. ToString () + "</div>";
}
Else
{lbartviewpoint.visible = false;
}

Lbartpageno.text = "<div class= ' PageNo ' >" + "pages:" + myrowview["PageNo"]. ToString () + "</div>";

Lbartcontent.text = "<div class= ' content ' >" + myrowview["content"]. ToString () + "</div>";

}


protected void Page_Init (object sender, EventArgs e)
{
//
Codegen:this the call are required by the ASP.net Web Form Designer.
//
InitializeComponent ();
}

#region Web Form Designer generated code
<summary>
Required to Designer support-do not modify
The contents is with the Code Editor.
</summary>
private void InitializeComponent ()
{
This. Load + = new System.EventHandler (this. Page_Load);

}
#endregion
}
}


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.