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

asp.net综合类B2B市场的设计与实现 第13页
   </asp:TableRow>
        </asp:Table>
        </asp:Panel>
        <asp:Button ID="Button1" runat="server" Text="会话" />
        <asp:Button ID="Button2" runat="server" Text="关注" />
        <asp:Button ID="Button3" runat="server" Text="返回" />
    </div>
    </form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default7.aspx.cs" Inherits="Default7" %>
<!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 runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Panel ID="Panel1" runat="server" Height="500px" Width="125px">
            <asp:Table ID="Table2" runat="server" Height="">
            <asp:TableRow>
            <asp:TableCell>
            <asp:Table ID="Table1" runat="server" Height="">
            <asp:TableRow>
            <asp:TableCell>
                <asp:Label runat="server" Text="尊敬的123您好"></asp:Label></asp:TableCell>                               
            </asp:TableRow>
            <asp:TableRow>
            <asp:TableCell>
                <asp:Label ID="Label1" runat="server" Text="您可以在本页管理您的信息或发布新的信息"></asp:Label></asp:TableCell>
            </asp:TableRow>
            <asp:TableRow>
            <asp:TableCell>
                <asp:Button ID="Button2" runat="server" Text="新信息" />
                <asp:Button ID="Button1" runat="server" Text="退出" /></asp:TableCell>
            </asp:TableRow>
            </asp:Table>
            </asp:TableCell>
            <asp:TableCell>
                <asp:Panel ID="Panel2" runat="server" Height="" Width="50px">
                </asp:Panel>
            </asp:TableCell>
            <asp:TableCell>
            <asp:Panel ID="Panel5" runat="server" Height="" Width="500px">
                <asp:Table ID="Table3" runat="server" Height="" Width="500px">
                <asp:TableRow>
                <asp:TableCell>
                    <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatLayout="Flow" RepeatColumns="2"
                     OnSelectedIndexChanged="RadioButtonList1_SelectedChanged" AutoPostBack="true">
                    <asp:ListItem Value="sellnews">出售信息</asp:ListItem>
                    <asp:ListItem Value="buynews">收购信息</asp:ListItem>
                    </asp:RadioButtonList>
                </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                <asp:TableCell>
                <asp:DataGrid ID="myDataGrid" runat="server" ItemStyle-Font-Size="x-small" HeaderStyle-Font-Bold="True" HeaderStyle-Font-Size="x-small" AlternatingItemStyle-BackColor="#EFEFEF" Cellpadding="4" BorderWidth="1" AutoGenerateColumns="False" BorderStyle="Solid" GridLines="Horizontal" BorderColor="#404040" Font-Names="Verdana,Arial,sans-serif" Font-Size="11px">
<AlternatingItemStyle BackColor="#E0E0E0"> </AlternatingItemStyle>
<ItemStyle Font-Size="X-Small"></ItemStyle>
<HeaderStyle Font-Size="X-Small" Font-Bold="True" ForeColor="White" BackColor="silver"></HeaderStyle>
<Columns>
<asp:TemplateColumn>
<HeaderTemplate>
<b>信息列表</b>
</HeaderTemplate>
<ItemTemplate>
<table border="0" cellpadding="4" cellspacing="0" width="300px" style="FONT-SIZE: 11px; FONT-FAMILY: Verdana, Arial, sans-serif">
<tr>
</tr>
<tr>
<td width="60px" valign="top"><b>联系电话:</b></td>
<td width="100px" valign="top" nowrap="nowrap">
<%# DataBinder.Eval( Container.DataItem, "comID" ) %>
</td>
</tr>
<tr>
<td width="60px" valign="top"><b>标题:</b></td>
<td width="100px" valign="top">
<%# DataBinder.Eval( Container.DataItem, "comID" ) %>
</tr>
<tr>
<td width="60px" valign="top"><b>公司地址:</b></td>
<td width="100px" valign="top" colspan="3">
<%# DataBinder.Eval( Container.DataItem, "comID" ) %>
<br />
<%# DataBinder.Eval( Container.DataItem, "comID" ) %>
<%# DataBinder.Eval( Container.DataItem, "comID" ) %>
<%# DataBinder.Eval( Container.DataItem, "comID" ) %>
<br />
<%# DataBinder.Eval( Container.DataItem, "comID" ) %>
</td>
<td>
    <asp:Button ID="Button3" runat="server" Text="修改" />
</td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
                </asp:TableCell>
               
                </asp:TableRow>
                </asp:Table>
                </asp:Panel>
            </asp:TableCell>   
             </asp:TableRow>  
        </asp:Table>
        </asp:Panel>
    </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;
www.751com.cn DataSet ds = new DataSet();
    string comEmail;
    protected System.Data.SqlClient.SqlDataReader dr;
    int comID;
    public void Page_Load(object sender, EventArgs e)
    {
        string myConnString = "server=.\\SQLEXPRESS;database=151;user id=sa;password=tmdjsj"; //连接sql数据库
        SqlConnection myConn = new SqlConnection(myConnString);
        myConn.Open();
        string strSelS = "select * from sell";
        string strSelB = "select * from buy";
        SqlDataAdapter myAdapter1 = new SqlDataAdapter(strSelS, myConn);
        myAdapter1.Fill(ds, "sell");
        SqlDataAdapter myAdapter2 = new SqlDataAdapter(strSelB, myConn);
        myAdapter2.Fill(ds, "buy");
        //string str = Session["comName"].ToString();
        string strSelU = "select * from companylist where comName='" + 123 + "'";
        SqlCommand cmd = new SqlCommand(strSelU, myConn);
        dr = cmd.ExecuteReader();
        if (dr.Read())
        {
            comID = int.Parse(dr["comID"].ToString());
            string comName = dr["comName"].ToString();
            comEmail = dr["comEmail"].ToString();
            //Session["comID"] = comID.ToString();
        }
        dr.Close();
        TableRow tr1 = new TableRow();
        TableRow tr2 = new TableRow();
        TableRow tr3 = new TableRow();
        TableCell tc11 = new TableCell();
        TableCell tc21 = new TableCell();
        TableCell tc31 = new TableCell();
        //tc11.Text = "尊敬的" + str + "你好";
        tc21.Text = "你的邮箱是:";
        tc31.Text = comEmail;
        tr1.Cells.Add(tc11);
        tr2.Cells.Add(tc21);
        tr3.Cells.Add(tc31);
        //userinfo.Rows.Add(tr1);
        //userinfo.Rows.Add(tr2);
        //userinfo.Rows.Add(tr3);
        if (Page.IsPostBack)
        {
            DataBind();
        }

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

Copyright © 2007-2012 www.chuibin.com 六维论文网 版权所有