温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:Asp.net房产中介管理系统源码及常用文档
当前文件路径:HouseManage/ContractManage/AdvertisementForm.aspx

1<%--文件名:AdvertisementForm.aspx--%> 2
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="AdvertisementForm.aspx.cs" Inherits="ContractManage_AdvertisementForm" Title="当前位置:成交管理->广告发布管理"%> 3
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> 4
<table style="width: 556px; height: 161px"> 5
<tr> 6
<td align="left" style="font-size: 0.8em; width: 2232px; font-family: 宋体; height: 16px; 7
background-color: darkturquoise"> 8
请输入需要查询发布广告的资料类型:<asp:TextBox ID="TextBox1" runat="server" Width="121px">%%</asp:TextBox> 9
资料编号:<asp:TextBox ID="TextBox2" runat="server" Width="113px">%%</asp:TextBox><br /> 10
经办人员:<asp:TextBox ID="TextBox3" runat="server" Width="139px">%%</asp:TextBox> 11
<asp:Button ID="Button1" runat="server" Text="查询" Width="100px" /> 12
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="新增" Width="100px" /> 13
<asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="修改" Width="100px" /> 14
</td> 15
</tr> 16
<tr> 17
<td align="left" style="font-size: 0.8em; width: 2232px; font-family: 宋体; height: 141px; 18
background-color: palegoldenrod" valign="top"> 19
经办人员:<asp:DropDownList ID="DropDownList1" runat="server" Width="62px"> 20
</asp:DropDownList> 21
资料类型:<asp:DropDownList ID="DropDownList2" runat="server" Width="73px"> 22
<asp:ListItem>出售房源</asp:ListItem> 23
<asp:ListItem>出租房源</asp:ListItem> 24
<asp:ListItem>求购客源</asp:ListItem> 25
<asp:ListItem>求租客源</asp:ListItem> 26
</asp:DropDownList> 27
资料编号:<asp:TextBox ID="TextBox6" runat="server" Width="61px"></asp:TextBox> 28
媒体名称:<asp:TextBox ID="TextBox7" runat="server" Width="52px"></asp:TextBox><br /> 29
发布期号:<asp:TextBox ID="TextBox8" runat="server" Width="54px"></asp:TextBox> 30
发布日期:<asp:TextBox ID="TextBox9" runat="server" Width="62px">2007-4-10</asp:TextBox> 31
截止日期:<asp:TextBox ID="TextBox10" runat="server" Width="59px">2007-4-17</asp:TextBox> 32
广告价格(元):<asp:TextBox ID="TextBox11" runat="server" Width="35px"></asp:TextBox><br /> 33
广告描述:<asp:TextBox ID="TextBox12" runat="server" Height="61px" TextMode="MultiLine" 34
Width="470px">暂无</asp:TextBox><br /> 35
补充说明:<asp:TextBox ID="TextBox13" runat="server" Width="366px">暂无</asp:TextBox> 36
自编号:<asp:TextBox ID="TextBox4" runat="server" Width="38px" BackColor="#E0E0E0" ReadOnly="True"></asp:TextBox></td> 37
</tr> 38
<tr> 39
<td style="width: 2232px; height: 50px; background-color: gainsboro"> 40
<asp:Panel ID="Panel1" runat="server" Height="150px" ScrollBars="Auto" Width="553px"> 41
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyHouseDBConnectionString %>" 42
DeleteCommand="DELETE FROM [广告发布] WHERE [自编号] = @自编号" InsertCommand="INSERT INTO [广告发布] ([经办人员], [资料类型], [资料编号], [发布媒体], [媒体期号], [发布日期], [截止日期], [广告价格], [广告描述], [补充说明]) VALUES (@经办人员, @资料类型, @资料编号, @发布媒体, @媒体期号, @发布日期, @截止日期, @广告价格, @广告描述, @补充说明)" 43
SelectCommand="SELECT * FROM [广告发布] WHERE (([资料类型] LIKE '%' + @资料类型 + '%') AND ([资料编号] LIKE '%' + @资料编号 + '%') AND ([经办人员] LIKE '%' + @经办人员 + '%'))" 44
UpdateCommand="UPDATE [广告发布] SET [经办人员] = @经办人员, [资料类型] = @资料类型, [资料编号] = @资料编号, [发布媒体] = @发布媒体, [媒体期号] = @媒体期号, [发布日期] = @发布日期, [截止日期] = @截止日期, [广告价格] = @广告价格, [广告描述] = @广告描述, [补充说明] = @补充说明 WHERE [自编号] = @自编号"> 45
<DeleteParameters> 46
<asp:Parameter Name="自编号" Type="Int32" /> 47
</DeleteParameters> 48
<UpdateParameters> 49
<asp:ControlParameter ControlID="DropDownList1" Name="经办人员" PropertyName="SelectedValue" 50
Type="String" /> 51
<asp:ControlParameter ControlID="DropDownList2" Name="资料类型" PropertyName="SelectedValue" 52
Type="String" /> 53
<asp:ControlParameter ControlID="TextBox6" Name="资料编号" PropertyName="Text" Type="String" /> 54
<asp:ControlParameter ControlID="TextBox7" Name="发布媒体" PropertyName="Text" Type="String" /> 55
<asp:ControlParameter ControlID="TextBox8" Name="媒体期号" PropertyName="Text" Type="String" /> 56
<asp:ControlParameter ControlID="TextBox9" Name="发布日期" PropertyName="Text" Type="DateTime" /> 57
<asp:ControlParameter ControlID="TextBox10" Name="截止日期" PropertyName="Text" Type="DateTime" /> 58
<asp:ControlParameter ControlID="TextBox11" Name="广告价格" PropertyName="Text" Type="Double" /> 59
<asp:ControlParameter ControlID="TextBox12" Name="广告描述" PropertyName="Text" Type="String" /> 60
<asp:ControlParameter ControlID="TextBox13" Name="补充说明" PropertyName="Text" Type="String" /> 61
<asp:ControlParameter ControlID="TextBox4" Name="自编号" PropertyName="Text" Type="Int32" /> 62
</UpdateParameters> 63
<SelectParameters> 64
<asp:ControlParameter ControlID="TextBox1" Name="资料类型" PropertyName="Text" Type="String" /> 65
<asp:ControlParameter ControlID="TextBox2" Name="资料编号" PropertyName="Text" Type="String" /> 66
<asp:ControlParameter ControlID="TextBox3" Name="经办人员" PropertyName="Text" Type="String" /> 67
</SelectParameters> 68
<InsertParameters> 69
<asp:ControlParameter ControlID="DropDownList1" Name="经办人员" PropertyName="SelectedValue" 70
Type="String" /> 71
<asp:ControlParameter ControlID="DropDownList2" Name="资料类型" PropertyName="SelectedValue" 72
Type="String" /> 73
<asp:ControlParameter ControlID="TextBox6" Name="资料编号" PropertyName="Text" Type="String" /> 74
<asp:ControlParameter ControlID="TextBox7" Name="发布媒体" PropertyName="Text" Type="String" /> 75
<asp:ControlParameter ControlID="TextBox8" Name="媒体期号" PropertyName="Text" Type="String" /> 76
<asp:ControlParameter ControlID="TextBox9" Name="发布日期" PropertyName="Text" Type="DateTime" /> 77
<asp:ControlParameter ControlID="TextBox10" Name="截止日期" PropertyName="Text" Type="DateTime" /> 78
<asp:ControlParameter ControlID="TextBox11" Name="广告价格" PropertyName="Text" Type="Double" /> 79
<asp:ControlParameter ControlID="TextBox12" Name="广告描述" PropertyName="Text" Type="String" /> 80
<asp:ControlParameter ControlID="TextBox13" Name="补充说明" PropertyName="Text" Type="String" /> 81
</InsertParameters> 82
</asp:SqlDataSource> 83
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White" 84
BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="自编号" 85
DataSourceID="SqlDataSource1" Font-Names="宋体" Font-Size="Small" GridLines="Vertical" 86
OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" 87
Width="1500px"> 88
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" /> 89
<Columns> 90
<asp:CommandField ButtonType="Button" HeaderText="选择" ShowSelectButton="True" /> 91
<asp:TemplateField HeaderText="删除" ShowHeader="False"> 92
<ItemTemplate> 93
<asp:Button ID="Button1" runat="server" CausesValidation="False" CommandName="Delete" 94
Text="删除" /> 95
</ItemTemplate> 96
</asp:TemplateField> 97
<asp:BoundField DataField="自编号" HeaderText="自编号" InsertVisible="False" ReadOnly="True" 98
SortExpression="自编号" /> 99
<asp:BoundField DataField="经办人员" HeaderText="经办人员" SortExpression="经办人员" /> 100
<asp:BoundField DataField="资料类型" HeaderText="资料类型" SortExpression="资料类型" /> 101
<asp:BoundField DataField="资料编号" HeaderText="资料编号" SortExpression="资料编号" /> 102
<asp:BoundField DataField="发布媒体" HeaderText="发布媒体" SortExpression="发布媒体" /> 103
<asp:BoundField DataField="媒体期号" HeaderText="媒体期号" SortExpression="媒体期号" /> 104
<asp:BoundField DataField="发布日期" HeaderText="发布日期" SortExpression="发布日期" /> 105
<asp:BoundField DataField="截止日期" HeaderText="截止日期" SortExpression="截止日期" /> 106
<asp:BoundField DataField="广告价格" HeaderText="广告价格" SortExpression="广告价格" /> 107
<asp:BoundField DataField="广告描述" HeaderText="广告描述" SortExpression="广告描述" /> 108
<asp:BoundField DataField="补充说明" HeaderText="补充说明" SortExpression="补充说明" /> 109
</Columns> 110
<RowStyle BackColor="#EEEEEE" ForeColor="Black" /> 111
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /> 112
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /> 113
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" /> 114
<AlternatingRowStyle BackColor="#DCDCDC" /> 115
</asp:GridView> 116
</asp:Panel> 117
</td> 118
</tr> 119
</table> 120
</asp:Content> 121
122




