📄 buildingform.aspx
字号:
<%--文件名:BuildingForm.aspx--%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="BuildingForm.aspx.cs" Inherits="BaseManage_BuildingForm" 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: palegoldenrod">
楼栋名称:<asp:TextBox ID="TextBox1" runat="server" Width="75px">1号楼</asp:TextBox>
所处位置:<asp:TextBox ID="TextBox2" runat="server" Width="89px">小区南区</asp:TextBox>
单元信息:<asp:TextBox ID="TextBox3" runat="server" Width="150px">1单元、2单元</asp:TextBox> <br />
楼层信息:<asp:TextBox ID="TextBox4" runat="server" Width="53px">共9楼</asp:TextBox>
总人口数:<asp:TextBox ID="TextBox5" runat="server" Width="34px">150</asp:TextBox>
总户数:<asp:TextBox ID="TextBox6" runat="server" Width="30px">36</asp:TextBox>
入住户数:<asp:TextBox ID="TextBox7" runat="server" Width="25px">25</asp:TextBox>
空置户数:<asp:TextBox ID="TextBox8" runat="server" BackColor="#E0E0E0" ReadOnly="True"
Width="29px"></asp:TextBox><br />
住宅户数:<asp:TextBox ID="TextBox9" runat="server" Width="24px">30</asp:TextBox>
商用户数:<asp:TextBox ID="TextBox10" runat="server" BackColor="#E0E0E0" ReadOnly="True"
Width="29px"></asp:TextBox>
管理楼长:<asp:TextBox ID="TextBox11" runat="server" Width="68px">罗兴文</asp:TextBox>
联系电话:<asp:TextBox ID="TextBox12" runat="server" Width="116px">023-40405690</asp:TextBox><br />
补充说明:<asp:TextBox ID="TextBox13" runat="server" Width="242px">暂无</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="Button3" runat="server" OnClick="Button3_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 %>"
DeleteCommand="DELETE FROM [楼栋信息] WHERE [楼栋名称] = @楼栋名称"
InsertCommand="INSERT INTO [楼栋信息] ([楼栋名称], [所处位置], [单元信息], [楼层信息], [总人口数], [总户数], [入住户数], [住宅户数],[管理楼长], [联系电话], [补充说明]) VALUES (@楼栋名称, @所处位置, @单元信息, @楼层信息, @总人口数, @总户数, @入住户数, @住宅户数,@管理楼长, @联系电话, @补充说明)"
SelectCommand="SELECT * FROM [楼栋信息]"
UpdateCommand="UPDATE [楼栋信息] SET [所处位置] = @所处位置, [单元信息] = @单元信息, [楼层信息] = @楼层信息, [总人口数] = @总人口数, [总户数] = @总户数, [入住户数] = @入住户数, [住宅户数] = @住宅户数,[管理楼长] = @管理楼长, [联系电话] = @联系电话, [补充说明] = @补充说明 WHERE [楼栋名称] = @楼栋名称">
<DeleteParameters>
<asp:Parameter Name="楼栋名称" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:ControlParameter ControlID="TextBox2" Name="所处位置" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox3" Name="单元信息" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox4" Name="楼层信息" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox5" Name="总人口数" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox6" Name="总户数" PropertyName="Text" Type="Int32" />
<asp:ControlParameter ControlID="TextBox7" Name="入住户数" PropertyName="Text" Type="Int32" />
<asp:Parameter Name="空置户数" Type="Int32" />
<asp:ControlParameter ControlID="TextBox9" Name="住宅户数" PropertyName="Text" Type="Int32" />
<asp:Parameter Name="商用户数" Type="Int32" />
<asp:ControlParameter ControlID="TextBox11" Name="管理楼长" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox12" Name="联系电话" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox13" Name="补充说明" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox1" Name="楼栋名称" PropertyName="Text" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:ControlParameter ControlID="TextBox1" Name="楼栋名称" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox2" Name="所处位置" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox3" Name="单元信息" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox4" Name="楼层信息" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox5" Name="总人口数" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox6" Name="总户数" PropertyName="Text" Type="Int32" />
<asp:ControlParameter ControlID="TextBox7" Name="入住户数" PropertyName="Text" Type="Int32" />
<asp:Parameter Name="空置户数" Type="Int32" />
<asp:ControlParameter ControlID="TextBox9" Name="住宅户数" PropertyName="Text" Type="Int32" />
<asp:Parameter Name="商用户数" Type="Int32" />
<asp:ControlParameter ControlID="TextBox11" Name="管理楼长" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox12" Name="联系电话" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox13" Name="补充说明" PropertyName="Text" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White"
BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="楼栋名称"
DataSourceID="SqlDataSource1" Font-Names="宋体" Font-Size="Small" GridLines="Vertical"
OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
Width="1200px">
<FooterStyle BackColor="#CCCCCC" 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="楼栋名称" 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="管理楼长" />
<asp:BoundField DataField="联系电话" HeaderText="联系电话" SortExpression="联系电话" />
<asp:BoundField DataField="补充说明" HeaderText="补充说明" SortExpression="补充说明" />
</Columns>
<RowStyle BackColor="#EEEEEE" ForeColor="Black" />
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
<AlternatingRowStyle BackColor="Gainsboro" />
</asp:GridView>
</asp:Panel>
</td>
</tr>
</table>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -