?? stationform.aspx
字號:
?<%--文件名:StationForm.aspx--%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="StationForm.aspx.cs" Inherits="CommunityManage_StationForm" 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="TextBox1" runat="server" Width="292px">%%</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:TextBox ID="TextBox2" runat="server" BackColor="#E0E0E0" ReadOnly="True"
Width="35px"></asp:TextBox>
車位編號:<asp:TextBox ID="TextBox3" runat="server" Width="75px">HMCW1-</asp:TextBox>
車位面積(m2):<asp:TextBox ID="TextBox4" runat="server" Width="28px">0</asp:TextBox>
樓棟名稱:<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1"
DataTextField="樓棟名稱" DataValueField="樓棟名稱" Width="79px">
</asp:DropDownList><br />
業主姓名:<asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="SqlDataSource2"
DataTextField="業主姓名" DataValueField="業主編號" Width="75px">
</asp:DropDownList>
啟用日期:<asp:TextBox ID="TextBox5" runat="server" Width="60px">2005-8-1</asp:TextBox>
停用日期:<asp:TextBox ID="TextBox6" runat="server" Width="75px">2005-12-31</asp:TextBox>
費用金額:<asp:TextBox ID="TextBox7" runat="server" Width="34px">0</asp:TextBox><br />
管理人員:<asp:TextBox ID="TextBox8" runat="server" Width="53px">X</asp:TextBox>
補充說明:<asp:TextBox ID="TextBox9" runat="server" Width="104px">暫無</asp:TextBox>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="新增" Width="70px" />
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="修改" Width="70px" />
<asp:Button ID="Button4" runat="server" OnClick="Button4_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 * FROM [樓棟信息]"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MyCommunityDBConnectionString %>"
SelectCommand="SELECT * FROM [業主信息] WHERE ([樓棟名稱] = @樓棟名稱)">
<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 '%' + @車位編號 + '%')" UpdateCommand="UPDATE [車位使用] SET [車位編號] = @車位編號, [車位面積] = @車位面積, [樓棟名稱] = @樓棟名稱, [業主編號] = @業主編號, [業主姓名] = @業主姓名, [啟用日期] = @啟用日期, [停用日期] = @停用日期, [費用金額] = @費用金額, [管理人員] = @管理人員, [補充說明] = @補充說明 WHERE [自動編號] = @自動編號">
<DeleteParameters>
<asp:Parameter Name="自動編號" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:ControlParameter ControlID="TextBox3" Name="車位編號" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox4" Name="車位面積" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="DropDownList1" Name="樓棟名稱" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="DropDownList2" Name="業主編號" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="DropDownList2" Name="業主姓名" PropertyName="SelectedItem.Text"
Type="String" />
<asp:ControlParameter ControlID="TextBox5" Name="啟用日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="TextBox6" Name="停用日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="TextBox7" Name="費用金額" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox8" Name="管理人員" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox9" Name="補充說明" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox2" Name="自動編號" PropertyName="Text" Type="Int32" />
</UpdateParameters>
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" Name="車位編號" PropertyName="Text" Type="String" />
</SelectParameters>
<InsertParameters>
<asp:ControlParameter ControlID="TextBox3" Name="車位編號" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox4" Name="車位面積" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="DropDownList1" Name="樓棟名稱" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="DropDownList2" Name="業主編號" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="DropDownList2" Name="業主姓名" PropertyName="SelectedItem.Text"
Type="String" />
<asp:ControlParameter ControlID="TextBox5" Name="啟用日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="TextBox6" Name="停用日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="TextBox7" Name="費用金額" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox8" Name="管理人員" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox9" 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" OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
Width="1000px">
<FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
<Columns>
<asp:CommandField ButtonType="Button" HeaderText="選擇" ShowSelectButton="True" />
<asp:TemplateField HeaderText="刪除" ShowHeader="False">
<ItemTemplate>
<asp:Button ID="Button1" runat="server" CausesValidation="False" CommandName="Delete"
Text="刪除" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="自動編號" HeaderText="自動編號" InsertVisible="False" ReadOnly="True"
SortExpression="自動編號" />
<asp:BoundField DataField="車位編號" HeaderText="車位編號" SortExpression="車位編號" />
<asp:BoundField DataField="車位面積" HeaderText="車位面積" SortExpression="車位面積" />
<asp:BoundField DataField="樓棟名稱" HeaderText="樓棟名稱" SortExpression="樓棟名稱" />
<asp:BoundField DataField="業主編號" HeaderText="業主編號" SortExpression="業主編號" />
<asp:BoundField DataField="業主姓名" HeaderText="業主姓名" SortExpression="業主姓名" />
<asp:BoundField DataField="啟用日期" HeaderText="啟用日期" 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 + -