?? commonrepairform.aspx
字號:
?<%--文件名:CommonRepairForm.aspx--%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="CommonRepairForm.aspx.cs" Inherits="CommunityManage_CommonRepairForm" 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="263px">%%</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" Width="137px">HMGGWX</asp:TextBox>
財產名稱:<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1"
DataTextField="財產名稱" DataValueField="財產編號" Width="122px">
</asp:DropDownList>
報修日期:<asp:TextBox ID="TextBox3" runat="server" Width="64px">2006-1-15</asp:TextBox><br />
報修人員:<asp:TextBox ID="TextBox4" runat="server" Width="75px">X</asp:TextBox>
故障現象:<asp:TextBox ID="TextBox5" runat="server" Width="320px">X</asp:TextBox><br />
受理人員:<asp:TextBox ID="TextBox6" runat="server" Width="75px">X</asp:TextBox>
處理意見:<asp:TextBox ID="TextBox7" runat="server" Width="320px">X</asp:TextBox><br />
修理日期:<asp:TextBox ID="TextBox8" runat="server" Width="75px">2006-1-16</asp:TextBox>
修理人員:<asp:TextBox ID="TextBox9" runat="server" Width="91px">X</asp:TextBox>
修理費用:<asp:TextBox ID="TextBox10" runat="server" Width="36px">0</asp:TextBox>
材料費用:<asp:TextBox ID="TextBox11" runat="server" Width="36px">0</asp:TextBox><br />
修理結果:<asp:TextBox ID="TextBox12" runat="server" Height="59px" TextMode="MultiLine"
Width="472px"></asp:TextBox><br />
補充說明:<asp:TextBox ID="TextBox13" runat="server" Width="241px">暫無</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 [公共財產] WHERE 當前狀態='正在使用'"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" 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="DropDownList1" Name="財產編號" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="DropDownList1" Name="財產名稱" PropertyName="SelectedItem.Text"
Type="String" />
<asp:ControlParameter ControlID="TextBox3" Name="報修日期" PropertyName="Text" Type="DateTime" />
<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="String" />
<asp:ControlParameter ControlID="TextBox7" Name="處理意見" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox8" Name="修理日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="TextBox9" Name="修理人員" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox10" Name="修理費用" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox11" Name="材料費用" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox12" Name="修理結果" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox13" Name="補充說明" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox2" Name="維修編號" PropertyName="Text" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:ControlParameter ControlID="TextBox2" Name="維修編號" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="DropDownList1" Name="財產編號" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="DropDownList1" Name="財產名稱" PropertyName="SelectedItem.Text"
Type="String" />
<asp:ControlParameter ControlID="TextBox3" Name="報修日期" PropertyName="Text" Type="DateTime" />
<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="String" />
<asp:ControlParameter ControlID="TextBox7" Name="處理意見" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox8" Name="修理日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="TextBox9" Name="修理人員" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox10" Name="修理費用" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox11" Name="材料費用" PropertyName="Text" Type="Double" />
<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="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1"
DataKeyNames="維修編號" DataSourceID="SqlDataSource2" Font-Names="宋體" Font-Size="Small"
GridLines="None" OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
Width="2500px">
<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="維修編號" 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="費用合計" />
<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 + -