?? gasregisterform.aspx
字號:
?<%--文件名:GasRegisterForm.aspx--%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="GasRegisterForm.aspx.cs" Inherits="ChargeManage_GasRegisterForm" Title="當前位置:費用管理->水電氣費登記" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table style="width: 556px; height: 161px">
<tr>
<td align="left" style="font-size: 0.8em; width: 2232px; font-family: 宋體; height: 16px;
background-color: mediumturquoise">
登記年份:<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem>2006</asp:ListItem>
<asp:ListItem>2007</asp:ListItem>
<asp:ListItem>2008</asp:ListItem>
<asp:ListItem>2009</asp:ListItem>
<asp:ListItem>2010</asp:ListItem>
<asp:ListItem>2011</asp:ListItem>
<asp:ListItem>2012</asp:ListItem>
<asp:ListItem>2013</asp:ListItem>
<asp:ListItem>2014</asp:ListItem>
<asp:ListItem>2015</asp:ListItem>
<asp:ListItem>2016</asp:ListItem>
<asp:ListItem>2017</asp:ListItem>
<asp:ListItem>2018</asp:ListItem>
<asp:ListItem>2019</asp:ListItem>
<asp:ListItem>2020</asp:ListItem>
</asp:DropDownList>
登記月份:<asp:DropDownList ID="DropDownList2" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
<asp:ListItem>5</asp:ListItem>
<asp:ListItem>6</asp:ListItem>
<asp:ListItem>7</asp:ListItem>
<asp:ListItem>8</asp:ListItem>
<asp:ListItem>9</asp:ListItem>
<asp:ListItem>10</asp:ListItem>
<asp:ListItem>11</asp:ListItem>
<asp:ListItem>12</asp:ListItem>
</asp:DropDownList>
費用類型:<asp:DropDownList ID="DropDownList3" runat="server" Width="78px">
<asp:ListItem>水費</asp:ListItem>
<asp:ListItem>電費</asp:ListItem>
<asp:ListItem>氣費</asp:ListItem>
</asp:DropDownList>
樓棟名稱:<asp:DropDownList ID="DropDownList4" runat="server" DataSourceID="SqlDataSource1"
DataTextField="樓棟名稱" DataValueField="樓棟名稱" Width="81px">
</asp:DropDownList><br />
<asp:Button ID="Button3" runat="server" Text="查詢"
Width="83px" /> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
Text="新增" Width="83px" />
<asp:Button ID="Button2" runat="server" Text="登記" Width="83px" OnClick="Button2_Click" />
</td>
</tr>
<tr>
<td style="width: 2232px; height: 100px; background-color: gainsboro">
<asp:Panel ID="Panel1" runat="server" Height="320px" ScrollBars="Auto" Width="553px">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyCommunityDBConnectionString %>"
SelectCommand="SELECT DISTINCT * FROM [樓棟信息]"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MyCommunityDBConnectionString %>"
DeleteCommand="DELETE FROM [水電氣費] WHERE [自動編號] = @自動編號" InsertCommand="INSERT INTO [水電氣費] ([業主姓名], [表編號], [表底數], [表止數], [計費單價], [費用類型], [計費年份], [計費月份], [業主編號], [樓棟名稱], [自動編號]) VALUES (@業主姓名, @表編號, @表底數, @表止數, @計費單價, @費用類型, @計費年份, @計費月份, @業主編號, @樓棟名稱, @自動編號)"
SelectCommand="SELECT [業主姓名], [表編號], [表底數], [表止數], [計費單價],[費用類型], [計費年份], [計費月份], [業主編號], [樓棟名稱], [自動編號] FROM [水電氣費] WHERE (([計費年份] = @計費年份) AND ([計費月份] = @計費月份) AND ([費用類型] = @費用類型) AND ([樓棟名稱] = @樓棟名稱)) AND (登記標志='正在登記')"
UpdateCommand="UPDATE [水電氣費] SET [表編號] = @表編號, [表底數] = @表底數, [表止數] = @表止數, [計費單價] = @計費單價 WHERE [自動編號] = @自動編號">
<DeleteParameters>
<asp:Parameter Name="自動編號" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="表編號" Type="String" />
<asp:Parameter Name="表底數" Type="Double" />
<asp:Parameter Name="表止數" Type="Double" />
<asp:Parameter Name="計費單價" Type="Double" />
<asp:Parameter Name="自動編號" Type="Int32" />
</UpdateParameters>
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="計費年份" PropertyName="SelectedValue"
Type="Int32" />
<asp:ControlParameter ControlID="DropDownList2" Name="計費月份" PropertyName="SelectedValue"
Type="Int32" />
<asp:ControlParameter ControlID="DropDownList3" Name="費用類型" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="DropDownList4" Name="樓棟名稱" PropertyName="SelectedValue"
Type="String" />
</SelectParameters>
<InsertParameters>
<asp:Parameter Name="業主姓名" Type="String" />
<asp:Parameter Name="表編號" Type="String" />
<asp:Parameter Name="表底數" Type="Double" />
<asp:Parameter Name="表止數" Type="Double" />
<asp:Parameter Name="計費單價" Type="Double" />
<asp:Parameter Name="費用類型" Type="String" />
<asp:Parameter Name="計費年份" Type="Int32" />
<asp:Parameter Name="計費月份" Type="Int32" />
<asp:Parameter Name="業主編號" Type="String" />
<asp:Parameter Name="樓棟名稱" Type="String" />
<asp:Parameter Name="自動編號" Type="Int32" />
</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="SqlDataSource2" Font-Names="宋體" Font-Size="Small"
GridLines="None" Width="1100px">
<FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
<Columns>
<asp:CommandField ButtonType="Button" HeaderText="編輯" ShowEditButton="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="業主姓名" 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="費用類型" ReadOnly="True" SortExpression="費用類型" />
<asp:BoundField DataField="計費年份" HeaderText="計費年份" ReadOnly="True" SortExpression="計費年份" />
<asp:BoundField DataField="計費月份" HeaderText="計費月份" ReadOnly="True" SortExpression="計費月份" />
<asp:BoundField DataField="業主編號" HeaderText="業主編號" ReadOnly="True" SortExpression="業主編號" />
<asp:BoundField DataField="樓棟名稱" HeaderText="樓棟名稱" ReadOnly="True" SortExpression="樓棟名稱" />
<asp:BoundField DataField="自動編號" HeaderText="自動編號" ReadOnly="True" 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 + -