Drop-down menu for current location of the simulated dynamic network

Source: Internet
Author: User
Drop-down menu for current location of the simulated dynamic network

The Code is as follows:

Public string GetBoardDropDownList (int paraParentID)
{
String BoardText = "<script language = \" javascript \ "type = \" text/javascript \ "> ";
BoardText + = "var boardxml = '<? Xml version = \ "1.0 \" encoding = \ "gb2312 \"?> ";
BoardText + = "<BoardList> ";
BoardText + = BoardRec (0 );
BoardText + = "</BoardList> '; </script> ";
Return BoardText;
}
Public string BoardRec (int paraParentID)
{
String BoardText = "";
DataSet ds1 = myCData. GetDataSet ("select * from DV_Board where ParentID =" + paraParentID + "order by orders Asc", 0, "TableName ");
For (int j = 0; j <ds1.Tables [0]. Rows. Count; j ++)
{
Int BoardID = Convert. ToInt32 (ds1.Tables [0]. Rows [j] ["BoardID"]);
String BoardType = ds1.Tables [0]. Rows [j] ["BoardType"]. ToString ();
Int Parentid = Convert. ToInt32 (ds1.Tables [0]. Rows [j] ["parentid"]);
Int Depth = Convert. ToInt32 (ds1.Tables [0]. Rows [j] ["depth"]);
Int Rootid = Convert. ToInt32 (ds1.Tables [0]. Rows [j] ["rootid"]);
Int Child = Convert. ToInt32 (ds1.Tables [0]. Rows [j] ["child"]);
Int Hidden = 0;
Int Nopost = 0;
If (Child = 0)
{
Nopost = 0;
BoardText + = "<board boardid = \" "+ BoardID +" \ "boardtype = \" "+ BoardType +" \ "parentid = \" "+ Parentid +" \ "depth = \ "" + Depth + "\" rootid = \ "" + Rootid + "\" child = \ "" + Child + "\" hidden = \ "" + Hidden + "\" nopost = \ "" + Nopost + "\"> </board> ";
}
Else
{
Nopost = 1;
BoardText + = "<board boardid = \" "+ BoardID +" \ "boardtype = \" "+ BoardType +" \ "parentid = \" "+ Parentid +" \ "depth = \ "" + Depth + "\" rootid = \ "" + Rootid + "\" child = \ "" + Child + "\" hidden = \ "" + Hidden + "\" nopost = \ "" + Nopost + "\"> ";
BoardText + = BoardRec (BoardID );
BoardText + = "</board> ";
}
}
Ds1.Clear ();
Return BoardText;
}
Public string GetBoardPostioin (string paraBBSName, int parabardid)
{
String BoardText = "";
BoardText = "<a href = 'index. aspx 'onmouseover = \ "showmenu (event, BoardJumpList (0),'', 0); \ ">" + paraBBSName + "</a> ";
BoardText + = GetBoardPostioinRec (paraBoardID );
Return BoardText;
}
Public string GetBoardPostioinRec (int paraParentID)
{
String BoardText = "";
If (paraParentID! = 0)
{
DataSet ds1 = myCData. GetDataSet ("select * from DV_Board where BoardID =" + paraParentID + "order by orders Asc", 0, "TableName ");
If (ds1.Tables [0]. Rows. Count> 0)
{
If (Convert. ToInt32 (ds1.Tables [0]. Rows [0] ["Child"])> 0)
{
BoardText = "→ <a href = 'index. aspx? BoardID = "+ ds1.Tables [0]. rows [0] ["BoardID"]. toString () + "'onmouseover = \" showmenu (event, BoardJumpList ("+ ds1.Tables [0]. rows [0] ["BoardID"]. toString () + "),'', 0); \ ">" + ds1.Tables [0]. rows [0] ["BoardType"]. toString () + "</a> ";
}
Else
{
BoardText = "→ <a href = 'index. aspx? BoardID = "+ ds1.Tables [0]. rows [0] ["BoardID"]. toString () + "'>" + ds1.Tables [0]. rows [0] ["BoardType"]. toString () + "</a> ";
}
BoardText = GetBoardPostioinRec (Convert. ToInt32 (ds1.Tables [0]. Rows [0] ["ParentID"]) + BoardText;
}
Ds1.Clear ();
}
Return BoardText;
}

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.