stationform.aspx

来自「小区物业管理系统源代码,密码:123456,」· ASPX 代码 · 共 124 行

ASPX
124
字号
<%--文件名: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">
                &nbsp;请输入需要查询的车位编号:<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">
                &nbsp;自动编号:<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 />
                &nbsp;业主姓名:<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 />
                &nbsp;管理人员:<asp:TextBox ID="TextBox8" runat="server" Width="53px">X</asp:TextBox>
                补充说明:<asp:TextBox ID="TextBox9" runat="server" Width="104px">暂无</asp:TextBox>
                &nbsp;<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 + =
减小字号Ctrl + -
显示快捷键?