?? moveform.aspx
字號:
?<%--文件名:MoveForm.aspx--%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="MoveForm.aspx.cs" Inherits="BaseManage_MoveForm" Title="當前位置:基本管理->業主遷出管理" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table style="width: 558px; height: 1px">
<tr>
<td align="left" style="font-size: 0.8em; width: 584px; font-family: 宋體; height: 21px;
background-color: darkturquoise">
請輸入需要查詢的已經遷出的業主編號:<asp:TextBox ID="TextBox4" runat="server" Width="225px">%%</asp:TextBox>
<asp:Button ID="Button3" runat="server" Text="查詢" Width="70px" /></td>
</tr>
<tr>
<td align="left" style="font-size: 0.8em; width: 584px; font-family: 宋體; height: 21px;
background-color: palegoldenrod">
樓棟名稱:<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1"
DataTextField="樓棟名稱" DataValueField="樓棟名稱" Width="95px" AutoPostBack="True">
</asp:DropDownList>
業主姓名:<asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="SqlDataSource2"
DataTextField="業主姓名" DataValueField="業主編號"
Width="147px">
</asp:DropDownList>
遷出日期:<asp:TextBox ID="TextBox1" runat="server" Width="85px">2005-12-31</asp:TextBox><br />
遷出原因:<asp:TextBox ID="TextBox2" runat="server" Width="472px">售房</asp:TextBox><br />
補充說明:<asp:TextBox ID="TextBox3" runat="server" Width="392px">暫無</asp:TextBox>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="新增" Width="70px" />
</td>
</tr>
<tr>
<td style="overflow: auto; width: 584px; height: 103px; background-color: gainsboro">
<asp:Panel ID="Panel1" runat="server" Height="150px" ScrollBars="Auto" Width="555px">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyCommunityDBConnectionString %>"
SelectCommand="SELECT DISTINCT * FROM [樓棟信息]"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MyCommunityDBConnectionString %>"
SelectCommand="SELECT * FROM [業主信息] WHERE ([樓棟名稱] = @樓棟名稱) AND (業主編號 NOT IN (SELECT 業主編號 FROM dbo.遷出信息))">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="樓棟名稱" PropertyName="SelectedValue"
Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:MyCommunityDBConnectionString %>"
DeleteCommand="DELETE FROM [遷出信息] WHERE [業主編號] = @業主編號" InsertCommand="INSERT INTO [遷出信息] ([業主編號], [業主姓名], [遷出日期], [遷出原因], [補充說明]) VALUES (@業主編號, @業主姓名, @遷出日期, @遷出原因, @補充說明)"
SelectCommand="SELECT * FROM [遷出信息] WHERE ([業主編號] LIKE '%' + @業主編號 + '%')" >
<DeleteParameters>
<asp:Parameter Name="業主編號" Type="String" />
</DeleteParameters>
<SelectParameters>
<asp:ControlParameter ControlID="TextBox4" Name="業主編號" PropertyName="Text" Type="String" />
</SelectParameters>
<InsertParameters>
<asp:ControlParameter ControlID="DropDownList2" Name="業主編號" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="DropDownList2" Name="業主姓名" PropertyName="SelectedItem.Text"
Type="String" />
<asp:ControlParameter ControlID="TextBox1" Name="遷出日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="TextBox2" Name="遷出原因" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox3" Name="補充說明" PropertyName="Text" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White"
BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1"
DataKeyNames="業主編號" DataSourceID="SqlDataSource3" Font-Names="宋體" Font-Size="Small"
GridLines="None" Width="555px">
<FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
<Columns>
<asp:TemplateField HeaderText="刪除" ShowHeader="False">
<ItemTemplate>
<asp:Button ID="Button1" runat="server" CausesValidation="False" CommandName="Delete"
Text="刪除" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="業主編號" HeaderText="業主編號" ReadOnly="True" SortExpression="業主編號" />
<asp:BoundField DataField="業主姓名" HeaderText="業主姓名" SortExpression="業主姓名" />
<asp:BoundField DataField="遷出日期" HeaderText="遷出日期" SortExpression="遷出日期" />
<asp:BoundField DataField="遷出原因" HeaderText="遷出原因" SortExpression="遷出原因" />
<asp:BoundField DataField="補充說明" HeaderText="補充說明" SortExpression="補充說明" />
</Columns>
<RowStyle BackColor="#DEDFDE" ForeColor="Black" />
<SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
<HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" HorizontalAlign="Center" />
</asp:GridView>
</asp:Panel>
</td>
</tr>
</table>
</asp:Content>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -