gridview顯示主從表

DD.JPG

<%@ Page Language="C#" MasterPageFile="~/sz668w_web/MasterPage.master" AutoEventWireup="true" CodeFile="sortmanage.aspx.cs" Inherits="sz668w_web_Default" Title="Untitled Page" %>
None.gif<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
None.gif    <div style="z-index: 101; left: 0px; width: 650px; position: absolute; top: -22px;
None.gif        height: 100px">
None.gif        &nbsp;<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
None.gif            AutoGenerateColumns="False" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None"
None.gif            BorderWidth="1px" Caption="欄目信息" CaptionAlign="Top" CellPadding="3" DataKeyNames="sortid"
None.gif            OnPageIndexChanging="GridView1_PageIndexChanging" OnRowCancelingEdit="GridView1_RowCancelingEdit"
None.gif            OnRowDataBound="GridView1_RowDataBound" OnRowDeleting="GridView1_RowDeleting"
None.gif            OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating" PageSize="2"
None.gif            Width="642px">
None.gif            <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
None.gif            <Columns>
None.gif                <asp:BoundField DataField="sortid" HeaderText="一級欄目ID" ReadOnly="True" />
None.gif                <asp:TemplateField HeaderText="一級欄目名稱">
None.gif                    <EditItemTemplate>
None.gif                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("sortname") %>'></asp:TextBox>
None.gif                    </EditItemTemplate>
None.gif                    <ItemTemplate>
None.gif                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("sortname") %>'></asp:Label>
None.gif                    </ItemTemplate>
None.gif                    <ControlStyle Width="60px" />
None.gif                </asp:TemplateField>
None.gif                <asp:TemplateField HeaderText="一級欄目首頁">
None.gif                    <EditItemTemplate>
None.gif                        <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("sorturl") %>'></asp:TextBox>
None.gif                    </EditItemTemplate>
None.gif                    <ItemTemplate>
None.gif                        <asp:Label ID="Label4" runat="server" Text='<%# Bind("sorturl") %>'></asp:Label>
None.gif                    </ItemTemplate>
None.gif                    <ControlStyle Width="100px" />
None.gif                </asp:TemplateField>
None.gif                <asp:TemplateField HeaderText="二級欄目信息">
None.gif                    <ItemTemplate>
None.gif                        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" AllowPaging="True" PageSize="2"
None.gif                        OnPageIndexChanging="GridView2_PageIndexChanging" OnRowCancelingEdit="GridView2_RowCancelingEdit"
None.gif                        OnRowDeleting="GridView2_RowDeleting"
None.gif            OnRowEditing="GridView2_RowEditing" OnRowUpdating="GridView2_RowUpdating" DataKeyNames="sortid" BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4" >
None.gif                            <Columns>
None.gif                                <asp:BoundField DataField="sortid" HeaderText="二級欄目ID" ReadOnly="True" />
None.gif                                <asp:TemplateField HeaderText="二級欄目名稱">
None.gif                                    <EditItemTemplate>
None.gif                                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("sortname") %>'></asp:TextBox>
None.gif                                    </EditItemTemplate>
None.gif                                    <ItemTemplate>
None.gif                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("sortname") %>'></asp:Label>
None.gif                                    </ItemTemplate>
None.gif                                </asp:TemplateField>
None.gif                                <asp:TemplateField HeaderText="二級欄目首頁">
None.gif                                    <EditItemTemplate>
None.gif                                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("sorturl") %>'></asp:TextBox>
None.gif                                    </EditItemTemplate>
None.gif                                    <ItemTemplate>
None.gif                                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("sorturl") %>'></asp:Label>
None.gif                                    </ItemTemplate>
None.gif                                </asp:TemplateField>
None.gif                                <asp:CommandField ShowEditButton="True" />
None.gif                                <asp:CommandField ShowDeleteButton="True" />
None.gif                            </Columns>
None.gif                            <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
None.gif                            <RowStyle BackColor="White" ForeColor="#330099" />
None.gif                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
None.gif                            <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
None.gif                            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
None.gif                        </asp:GridView>
None.gif                    </ItemTemplate>
None.gif                </asp:TemplateField>
None.gif                <asp:CommandField ShowEditButton="True" />
None.gif                <asp:CommandField ShowDeleteButton="True" />
None.gif            </Columns>
None.gif            <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
None.gif            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
None.gif            <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
None.gif            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
None.gif            <AlternatingRowStyle BackColor="#F7F7F7" />
None.gif        </asp:GridView>
None.gif    </div>
None.gif    <br />
None.gif    <br />
None.gif    <br />
None.gif    <br />
None.gif    <br />
None.gif    <br />
None.gif    <br />
None.gif    <br />
None.gif    <br />
None.gif    <br />
None.gif    <br />
None.gif    <br />
None.gif    &nbsp;<br />
None.gif    &nbsp;<br />
None.gif    <br />
None.gif    <br />
None.gif</asp:Content>
None.gif
None.gif


cs

None.gifusing System;
None.gifusing System.Data;
None.gifusing System.Configuration;
None.gifusing System.Collections;
None.gifusing System.Web;
None.gifusing System.Web.Security;
None.gifusing System.Web.UI;
None.gifusing System.Web.UI.WebControls;
None.gifusing System.Web.UI.WebControls.WebParts;
None.gifusing System.Web.UI.HtmlControls;
None.gifusing System.Data.SqlClient;
None.gifusing Microsoft.ApplicationBlocks.Data;
None.gifusing System.IO;
None.gifusing System.Xml;
None.gifpublic partial class sz668w_web_Default :classbase
ExpandedBlockStart.gif{
InBlock.gif    public string power = "";
InBlock.gif    protected void Page_Load(object sender, EventArgs e)
ExpandedSubBlockStart.gif    {
InBlock.gif        power = Convert.ToString(Session["power"]);
InBlock.gif        if (power == "超級管理員" || power == "城市管理員")
ExpandedSubBlockStart.gif        {
ExpandedSubBlockEnd.gif        }

InBlock.gif        else
ExpandedSubBlockStart.gif        {
InBlock.gif            Response.Redirect("manager.aspx");
ExpandedSubBlockEnd.gif        }

InBlock.gif        if (!IsPostBack)
ExpandedSubBlockStart.gif        {
InBlock.gif            GridViewBind();
InBlock.gif            //GridView2Bind();
InBlock.gif          
//  this.InitDDLValue(DropDownList1, "select  sortid,sortname from sortinfo where len(sortid)=2");
InBlock.gif
           
ExpandedSubBlockEnd.gif        }

InBlock.gif
ExpandedSubBlockEnd.gif    }

InBlock.gif    public void GridViewBind()
ExpandedSubBlockStart.gif    {
InBlock.gif        DataSet ds = new DataSet();
InBlock.gif        try
ExpandedSubBlockStart.gif        {
InBlock.gif            string str = "select * from sortinfo where len(sortid)=2 order by sortid";
InBlock.gif            ds = SqlHelper.ExecuteDataset(ConStr, CommandType.Text, str);
InBlock.gif            if (ds != null)
ExpandedSubBlockStart.gif            {
InBlock.gif                this.GridView1.DataSource = ds.Tables[0].DefaultView;
InBlock.gif                this.GridView1.DataBind();
ExpandedSubBlockEnd.gif            }

InBlock.gif            else
ExpandedSubBlockStart.gif            {
InBlock.gif                Response.Write("<script language='javascript'>alert('數據庫爲空!');</script>");
InBlock.gif
ExpandedSubBlockEnd.gif            }

ExpandedSubBlockEnd.gif        }

InBlock.gif        catch (Exception ee)
ExpandedSubBlockStart.gif        {
InBlock.gif            Response.Write(ee.ToString());
InBlock.gif           // Response.Write("<script language='javascript'>alert('數據庫出錯!');</script>");
ExpandedSubBlockEnd.gif
        }

InBlock.gif
ExpandedSubBlockEnd.gif    }

InBlock.gif    protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
ExpandedSubBlockStart.gif    {
InBlock.gif
InBlock.gif        GridView1.EditIndex = e.NewEditIndex;
InBlock.gif        //當前編輯行背景色高亮
InBlock.gif        
//this.GridView1.EditRowStyle.BackColor = Color.FromName("#F7CE90");
InBlock.gif

InBlock.gif        GridViewBind();
ExpandedSubBlockEnd.gif    }

ExpandedSubBlockStart.gif    /// <summary>
InBlock.gif    
/// 取消編輯狀態
InBlock.gif    
/// </summary>
InBlock.gif    
/// <param name="sender"></param>
ExpandedSubBlockEnd.gif    
/// <param name="e"></param>

InBlock.gif    protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
ExpandedSubBlockStart.gif    {
InBlock.gif        GridView1.EditIndex = -1;
InBlock.gif        GridViewBind();
ExpandedSubBlockEnd.gif    }

ExpandedSubBlockStart.gif    /// <summary>
InBlock.gif    
/// 刪除記錄過程
InBlock.gif    
/// </summary>
InBlock.gif    
/// <param name="sender"></param>
ExpandedSubBlockEnd.gif    
/// <param name="e"></param>

InBlock.gif    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
ExpandedSubBlockStart.gif    {
InBlock.gif
InBlock.gif        //得到單位編號
InBlock.gif
        string id = GridView1.DataKeys[e.RowIndex].Values[0].ToString();
InBlock.gif        //轉換爲整數
InBlock.gif        
//int ID=Convert.ToInt32(rowToDelete);
InBlock.gif        
//從數據庫中刪除
InBlock.gif       
// Response.Write(id)
InBlock.gif
        string str = "DELETE FROM sortinfo where left(sortid,2)='" + id + "'";
InBlock.gif
InBlock.gif        try
ExpandedSubBlockStart.gif        {
InBlock.gif            SqlHelper.ExecuteNonQuery(ConStr, CommandType.Text, str);
InBlock.gif            //重新綁定數據
InBlock.gif         
//   GridViewBind();
ExpandedSubBlockEnd.gif
        }

InBlock.gif        catch (Exception ex)
ExpandedSubBlockStart.gif        {
InBlock.gif            Response.Write("數據庫錯誤,錯誤原因:" + ex.Message);
InBlock.gif            Response.End();
ExpandedSubBlockEnd.gif        }

InBlock.gif
InBlock.gif        //xml數據庫
ExpandedSubBlockStart.gif
      /*  string url = Server.MapPath("~/xml/sortinfo.xml");
InBlock.gif        string str_username = GridView1.DataKeys[e.RowIndex].Values[0].ToString();
InBlock.gif        XmlDocument xmlDoc = new XmlDocument();
InBlock.gif        xmlDoc.Load(url); //加載XML文件 
InBlock.gif        XmlNode root = xmlDoc.SelectSingleNode("sortinfo");
InBlock.gif        XmlNodeList xnl = root.ChildNodes; 
InBlock.gif        for (int i = 0; i < xnl.Count; i++)
InBlock.gif        {
InBlock.gif            XmlNodeList xnl11 = xnl.Item(i).SelectNodes("sortid");//查找username下面節點集合 
InBlock.gif            XmlElement xe = (XmlElement)xnl11.Item(0); //username節點下面的元素 
InBlock.gif            if (xe.InnerText == str_username) //獲取節點以及所有子集的串聯值 
InBlock.gif            {
InBlock.gif
InBlock.gif                root.RemoveChild(xe.ParentNode);//移除指頂節點 
InBlock.gif                // xe.ParentNode.RemoveChild(xe); 
InBlock.gif                // xnl.Item(i).RemoveChild(xe); 
InBlock.gif                // if(i<xnl.Count)i=i-1; 
InBlock.gif            }
InBlock.gif        }
ExpandedSubBlockEnd.gif        xmlDoc.Save(url);
*/

InBlock.gif        GridViewBind();
ExpandedSubBlockEnd.gif    }

ExpandedSubBlockStart.gif    /// <summary>
InBlock.gif    
/// 更新記錄過程
InBlock.gif    
/// </summary>
InBlock.gif    
/// <param name="sender"></param>
ExpandedSubBlockEnd.gif    
/// <param name="e"></param>

InBlock.gif    protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
ExpandedSubBlockStart.gif    {
InBlock.gif        string ID = GridView1.DataKeys[e.RowIndex].Values[0].ToString();
InBlock.gif        //  string password = getmd5(((TextBox)GridView1.Rows[e.RowIndex].FindControl("textbox1")).Text);
InBlock.gif

InBlock.gif        string str1 = ((TextBox)GridView1.Rows[e.RowIndex].FindControl("TextBox2")).Text;
InBlock.gif        string str2 = ((TextBox)GridView1.Rows[e.RowIndex].FindControl("TextBox3")).Text;
InBlock.gif        //判斷表單項是否有空並給出提示信息
InBlock.gif
       
InBlock.gif        try
ExpandedSubBlockStart.gif        {
InBlock.gif            string str = "update sortinfo set sortname='" +str1 + "' ,sorturl='"+str2+"' where sortid='" + ID + "'";
InBlock.gif            // Response.Write(str);
InBlock.gif
            SqlHelper.ExecuteNonQuery(ConStr, CommandType.Text, str);
InBlock.gif
ExpandedSubBlockEnd.gif        }

InBlock.gif        catch (SqlException err)
ExpandedSubBlockStart.gif        {
InBlock.gif
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gif        /*try
InBlock.gif        {
InBlock.gif            string url=Server.MapPath("~/xml/sortinfo.xml");
InBlock.gif            XmlDocument xmlDoc=new XmlDocument();
InBlock.gif            xmlDoc.Load(url);
ExpandedSubBlockEnd.gif            XmlNode root=xmlDoc.SelectSingleNode("sortinfo");
*/

InBlock.gif
InBlock.gif        Response.Write("<script language='javascript'>alert('數據已被保存!');</script>");
InBlock.gif        //返回瀏覽狀態
InBlock.gif
        GridView1.EditIndex = -1;
InBlock.gif        GridViewBind();
ExpandedSubBlockEnd.gif    }

ExpandedSubBlockStart.gif    /// <summary>
InBlock.gif    
/// 分頁事件
InBlock.gif    
/// </summary>
InBlock.gif    
/// <param name="sender"></param>
ExpandedSubBlockEnd.gif    
/// <param name="e"></param>

InBlock.gif    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
ExpandedSubBlockStart.gif    {
InBlock.gif        GridView1.PageIndex = e.NewPageIndex;
InBlock.gif        GridViewBind();
ExpandedSubBlockEnd.gif    }

InBlock.gif
InBlock.gif    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
ExpandedSubBlockStart.gif    {
InBlock.gif
InBlock.gif        GridView2Bind();
InBlock.gif        
InBlock.gif        
InBlock.gif     //   Response.Write(GridView1.Rows.Count.ToString());
InBlock.gif        
InBlock.gif        
//加入鼠標滑過的高亮效果
InBlock.gif
        if (e.Row.RowType == DataControlRowType.DataRow)//判定當前的行是否屬於datarow類型的行
ExpandedSubBlockStart.gif
        {
InBlock.gif            //當鼠標放上去的時候 先保存當前行的背景顏色 並給附一顏色
InBlock.gif
            e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='yellow',this.style.fontWeight='';");
InBlock.gif            //當鼠標離開的時候 將背景顏色還原的以前的顏色
InBlock.gif
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor,this.style.fontWeight='';");
ExpandedSubBlockEnd.gif        }

InBlock.gif        //單擊行改變行背景顏色
InBlock.gif
        if (e.Row.RowType == DataControlRowType.DataRow)
ExpandedSubBlockStart.gif        {
ExpandedSubBlockStart.gif            /*GridView oGridView = (GridView)e.Row.FindControl("GridView2");
InBlock.gif            DataSet ds = new DataSet();
InBlock.gif            string sql = "select * from sortinfo where left(sortid,2)='" + GridView1.DataKeys[e.Row.RowIndex].Value + "' and len(sortid)=4";
InBlock.gif            ds = SqlHelper.ExecuteDataset(ConStr, CommandType.Text, sql);
InBlock.gif            oGridView.DataSource = ds.Tables[0].DefaultView;
ExpandedSubBlockEnd.gif            oGridView.DataBind();
*/

InBlock.gif            //GridView2Bind(GridView1.DataKeys[e.Row.RowIndex].Value.ToString());
InBlock.gif
            e.Row.Attributes.Add("onclick", "this.style.backgroundColor='#99cc00'; this.style.color='buttontext';this.style.cursor='default';");
ExpandedSubBlockEnd.gif        }

InBlock.gif
InBlock.gif      
ExpandedSubBlockEnd.gif    }

InBlock.gif
InBlock.gif  
InBlock.gif    //gridview2
InBlock.gif
    protected void GridView2_RowEditing(object sender, GridViewEditEventArgs e)
ExpandedSubBlockStart.gif    {
InBlock.gif        GridView a = (GridView)sender;
InBlock.gif        a.EditIndex = e.NewEditIndex;
InBlock.gif        //當前編輯行背景色高亮
InBlock.gif        
//this.GridView1.EditRowStyle.BackColor = Color.FromName("#F7CE90");
InBlock.gif

InBlock.gif         GridView2Bind();
ExpandedSubBlockEnd.gif    }

InBlock.gif    protected void GridView2_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
ExpandedSubBlockStart.gif    {
InBlock.gif        GridView a = (GridView)sender;
InBlock.gif        a.EditIndex = -1;
InBlock.gif        GridView2Bind();
ExpandedSubBlockEnd.gif    }

InBlock.gif    protected void GridView2_RowDeleting(object sender, GridViewDeleteEventArgs e)
ExpandedSubBlockStart.gif    {
InBlock.gif        GridView a = (GridView)sender;
InBlock.gif
InBlock.gif        //得到單位編號
InBlock.gif
        string id = a.DataKeys[e.RowIndex].Values[0].ToString();
InBlock.gif        //轉換爲整數
InBlock.gif        
//int ID=Convert.ToInt32(rowToDelete);
InBlock.gif        
//從數據庫中刪除
InBlock.gif        
// Response.Write(id)
InBlock.gif
        string str = "DELETE FROM sortinfo where sortid='" + id + "'";
InBlock.gif
InBlock.gif        try
ExpandedSubBlockStart.gif        {
InBlock.gif            SqlHelper.ExecuteNonQuery(ConStr, CommandType.Text, str);
InBlock.gif            //重新綁定數據
InBlock.gif
            GridView2Bind();
ExpandedSubBlockEnd.gif        }

InBlock.gif        catch (Exception ex)
ExpandedSubBlockStart.gif        {
InBlock.gif            Response.Write("數據庫錯誤,錯誤原因:" + ex.Message);
InBlock.gif            Response.End();
ExpandedSubBlockEnd.gif        }

InBlock.gif
ExpandedSubBlockEnd.gif    }

InBlock.gif    protected void GridView2_RowUpdating(object sender, GridViewUpdateEventArgs e)
ExpandedSubBlockStart.gif    {
InBlock.gif        GridView a = (GridView)sender;
InBlock.gif        string ID = a.DataKeys[e.RowIndex].Values[0].ToString();
InBlock.gif        //  string password = getmd5(((TextBox)GridView1.Rows[e.RowIndex].FindControl("textbox1")).Text);
InBlock.gif

InBlock.gif        string str1 = ((TextBox)a.Rows[e.RowIndex].FindControl("TextBox1")).Text;
InBlock.gif        string str2 = ((TextBox)a.Rows[e.RowIndex].FindControl("TextBox2")).Text;
InBlock.gif        //判斷表單項是否有空並給出提示信息
InBlock.gif

InBlock.gif        try
ExpandedSubBlockStart.gif        {
InBlock.gif            string str = "update sortinfo set sortname='" + str1 + "' ,sorturl='" + str2 + "' where sortid='" + ID + "'";
InBlock.gif            // Response.Write(str);
InBlock.gif
            SqlHelper.ExecuteNonQuery(ConStr, CommandType.Text, str);
ExpandedSubBlockEnd.gif        }

InBlock.gif        catch (SqlException err)
ExpandedSubBlockStart.gif        {
InBlock.gif
ExpandedSubBlockEnd.gif        }

InBlock.gif
InBlock.gif        Response.Write("<script language='javascript'>alert('數據已被保存!');</script>");
InBlock.gif        //返回瀏覽狀態
InBlock.gif
       a.EditIndex = -1;
InBlock.gif        GridView2Bind();
ExpandedSubBlockEnd.gif    }

InBlock.gif    protected void GridView2_PageIndexChanging(object sender, GridViewPageEventArgs e)
ExpandedSubBlockStart.gif    {
InBlock.gif        GridView a = (GridView)sender;
InBlock.gif        a.PageIndex = e.NewPageIndex;
InBlock.gif      //  GridView1.PageIndex = e.NewPageIndex;
InBlock.gif
        GridView2Bind();
ExpandedSubBlockEnd.gif    }

InBlock.gif    public void GridView2Bind()
ExpandedSubBlockStart.gif    {
InBlock.gif      
InBlock.gif     
InBlock.gif        GridView oGridView;
InBlock.gif   //     this.TextBox4.Text = this.DropDownList1.Items[1].Value.ToString();
InBlock.gif
       
InBlock.gif        for (int i = 0; i <= GridView1.Rows.Count - 1; i++)
ExpandedSubBlockStart.gif        {
InBlock.gif            oGridView = (GridView)GridView1.Rows[i].FindControl("GridView2");
InBlock.gif
InBlock.gif            string str1 = GridView1.Rows[i].Cells[0].Text;
InBlock.gif       //     Response.Write(str1);
InBlock.gif
            if (oGridView != null)
ExpandedSubBlockStart.gif            {
InBlock.gif
InBlock.gif                DataSet ds1 = new DataSet();
InBlock.gif                string sql = "select * from sortinfo where left(sortid,2)= '"+str1+"' and len(sortid)=4";
InBlock.gif                
InBlock.gif                try
ExpandedSubBlockStart.gif                {
InBlock.gif                    ds1 = SqlHelper.ExecuteDataset(ConStr, CommandType.Text, sql);
InBlock.gif                    if (ds1 != null)
ExpandedSubBlockStart.gif                    {
InBlock.gif                        oGridView.DataSource = ds1.Tables[0].DefaultView;
InBlock.gif                        oGridView.DataBind();
ExpandedSubBlockEnd.gif                    }

InBlock.gif                    else
ExpandedSubBlockStart.gif                    {
InBlock.gif                        Response.Write("<script language='javascript'>alert('數據庫爲空!');</script>");
ExpandedSubBlockEnd.gif                    }

ExpandedSubBlockEnd.gif                }

InBlock.gif                catch (Exception ee)
ExpandedSubBlockStart.gif                {
InBlock.gif                    Response.Write(ee.ToString());
InBlock.gif                    //Response.Write("<script language='javascript'>alert('數據出錯!');</script>");
ExpandedSubBlockEnd.gif
                }

InBlock.gif
ExpandedSubBlockEnd.gif            }

ExpandedSubBlockEnd.gif        }
       
ExpandedSubBlockEnd.gif    }

InBlock.gif
InBlock.gif   
InBlock.gif    //xml
InBlock.gif
    public void up_sortinfo()
ExpandedSubBlockStart.gif    {
InBlock.gif
ExpandedSubBlockEnd.gif    }

InBlock.gif
InBlock.gif   
ExpandedBlockEnd.gif}

None.gif


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章