毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

asp.net综合类B2B市场的设计与实现 第11页

更新时间:2009-9-18:  来源:毕业论文
asp.net综合类B2B市场的设计与实现 第11页
 Session.Remove("comName");
        Session["comName"] = TextBox1.Text;
        Response.Redirect("Default2.aspx");
    }
    public void Button2_Click(object sender, EventArgs e)
    {
        Response.Redirect("Default2.aspx");
    }
    public void btn_Click(object sender,EventArgs e)
    {
        string str = TextBox5.Text;
        TextBox1.Text =TextBox5.Text;
        string strUp = "Update companylist set comInformation='"+str+"' where comID='"+comID+"'";
        SqlCommand cmd = new SqlCommand(strUp,myConn);
        cmd.ExecuteNonQuery();
    }
}
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Table ID="Table1" runat="server">
        <asp:TableRow>
        <asp:TableCell>
            <asp:Label ID="Label1" runat="server" Text="标题:  "></asp:Label>
            <asp:TextBox ID="TextBox2" runat="server" Width="460px"></asp:TextBox></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
        <asp:TableCell>
            <asp:Label ID="Label2" runat="server" Text="电话:  "></asp:Label>
            <asp:TextBox ID="TextBox3" runat="server" Width="460px"></asp:TextBox></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
        <asp:TableCell>
            <asp:Label ID="Label3" runat="server" Text="地址:  "></asp:Label>
            <asp:DropDownList ID="DropDownList1" runat="server" OnSelectedIndexChanged="drl1_SelectedChange"
             AutoPostBack="true">
            <asp:ListItem Value="0">--省/直辖市--</asp:ListItem>
            <asp:ListItem Value="bj">北京市</asp:ListItem>
            <asp:ListItem Value="tj">天津市</asp:ListItem>
            <asp:ListItem Value="yn">云南省</asp:ListItem>
            </asp:DropDownList>
            <asp:DropDownList ID="DropDownList2" runat="server">
            <asp:ListItem Value="0">--所属城市--</asp:ListItem>
            </asp:DropDownList>
            <asp:TextBox ID="TextBox4" runat="server" Width="266px"></asp:TextBox></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
        <asp:TableCell>
            <asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine"
             Width="500px" Height="300px" Text="详细信息:"></asp:TextBox></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
        <asp:TableCell>
            <asp:DropDownList ID="DropDownList3" runat="server">
            <asp:ListItem>出售信息</asp:ListItem>
            <asp:ListItem>收购信息</asp:ListItem>
            </asp:DropDownList>
            <asp:Button ID="Button1" runat="server" Text="提交" OnClick="Button1_Click" />
            <asp:Button ID="Button2" runat="server" Text="返回" OnClick="Button2_Click" /></asp:TableCell>
        </asp:TableRow>
        </asp:Table>
    </div>
    </form>
</body>
</html>
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class Default4 : System.Web.UI.Page
{
    SqlConnection myConn;
    public void Page_Load(object sender, EventArgs e)
    {
        string myConnString = "server=.\\SQLEXPRESS;database=151;user id=sa;password=tmdjsj"; //连接sql数据库
        myConn = new SqlConnection(myConnString);
        myConn.Open();
        if (Page.IsPostBack)
        {
            DataBind();
        }
       
    }
    public void drl1_SelectedChange(object sender, EventArgs e)
    {
        DropDownList2.Items.Clear();
        switch (DropDownList1.SelectedIndex)
        {
            case 1:
                DropDownList2.Items.Add(new ListItem("--请选择--", "0"));
                DropDownList2.Items.Add(new ListItem("宣武区", "yggh"));
                DropDownList2.Items.Add(new ListItem("海淀区", "ygxm"));
                DropDownList2.Items.Add(new ListItem("部门编号", "bmbh"));
                DropDownList2.Items.Add(new ListItem("部门名称", "bmmc"));
                break;
            case 2:
                DropDownList2.Items.Add(new ListItem("--请选择--","0"));
                DropDownList2.Items.Add(new ListItem("河西区", "0"));
                DropDownList2.Items.Add(new ListItem("河东区", "0"));
                break;
            case 3:
                DropDownList2.Items.Add(new ListItem("--请选择--", "0"));
                DropDownList2.Items.Add(new ListItem("盘龙区", "0"));
                DropDownList2.Items.Add(new ListItem("官渡区", "0"));
                break;
        }
    }
    public void Button1_Click(object sender, EventArgs e)
    {
        int comID = int.Parse(Session["comID"].ToString());
        string comName = Session["comName"].ToString();
        string buyIndex = TextBox2.Text;
        string buyParticular = TextBox1.Text;
        SqlCommand cmd = new SqlCommand();
        cmd.Connection = myConn;
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "InsertBuy";
        cmd.Parameters.Add("@comID", SqlDbType.Int).Value = comID;
        cmd.Parameters.Add("@buycomName", SqlDbType.NVarChar).Value = comName;
        cmd.Parameters.Add("@buyIndex", SqlDbType.NVarChar).Value = buyIndex;
        cmd.Parameters.Add("@buyParticular", SqlDbType.NVarChar).Value = buyParticular;
        cmd.ExecuteNonQuery();
        myConn.Close();
        Response.Redirect("Default2.aspx");
    }
    public void Button2_Click(object sender, EventArgs e)
    {
        Response.Redirect("Default2.aspx");
    }
}
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Table ID="Table1" runat="server">
        <asp:TableRow>
        <asp:TableCell>
            <asp:Label ID="Label1" runat="server" Text="标题:  "></asp:Label>
            <asp:TextBox ID="TextBox2" runat="server" Width="460px"></asp:TextBox></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
        <asp:TableCell>
            <asp:Label ID="Label2" runat="server" Text="电话:  "></asp:Label>
            <asp:TextBox ID="TextBox3" runat="server" Width="460px"></asp:TextBox></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
        <asp:TableCell>
            <asp:Label ID="Label3" runat="server" Text="地址:  "></asp:Label>
            <asp:DropDownList ID="DropDownList1" runat="server" OnSelectedIndexChanged="drl1_SelectedChange"
             AutoPostBack="true">
            <asp:ListItem Value="0">--省/直辖市--</asp:ListItem>
            <asp:ListItem Value="bj">北京市</asp:ListItem>

 << 上一页  [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]  ... 下一页  >> 

asp.net综合类B2B市场的设计与实现 第11页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。