flight_place.aspx
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:5k
源码类别:

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="flight_place.aspx.cs" Inherits="web_system_common_flight_place" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" >
  4. <head runat="server">
  5.     <title>无标题页</title>
  6.     <link href="../../../css/style.css" rel="stylesheet" type="text/css" />
  7. </head>
  8. <body>
  9.     <form id="form1" runat="server">
  10.     <div>
  11.     <center>
  12.         &nbsp;</center>
  13.         <center>
  14.             <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Medium" Style="position: relative"
  15.                 Text="差假航班地點管理"></asp:Label>&nbsp;</center>
  16.         <center>
  17.             <br />
  18.             <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White"
  19.                 BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="id"
  20.                 DataSourceID="SqlDataSource1" GridLines="Vertical" Style="position: relative"
  21.                 Width="500px" OnRowDataBound="GridView1_RowDataBound">
  22.                 <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
  23.                 <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
  24.                 <Columns>
  25.                     <asp:BoundField DataField="name" HeaderText="地點" SortExpression="name" />
  26.                     <asp:CommandField ShowEditButton="True" />
  27.                     <asp:CommandField ShowDeleteButton="True" />
  28.                 </Columns>
  29.                 <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
  30.                 <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
  31.                 <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
  32.                 <AlternatingRowStyle BackColor="#DCDCDC" />
  33.             </asp:GridView>
  34.             <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues"
  35.                 ConnectionString="<%$ ConnectionStrings:oaConnection %>" DeleteCommand="DELETE FROM [OA_FLIGHT_PLACE] WHERE [id] = @original_id AND [name] = @original_name"
  36.                 InsertCommand="INSERT INTO [OA_FLIGHT_PLACE] ([id], [name]) VALUES (@id, @name)"
  37.                 OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT [id], [name] FROM [OA_FLIGHT_PLACE] WHERE ([id] <> @id)"
  38.                 UpdateCommand="UPDATE [OA_FLIGHT_PLACE] SET [name] = @name WHERE [id] = @original_id AND [name] = @original_name">
  39.                 <SelectParameters>
  40.                     <asp:Parameter DefaultValue="0" Name="id" Type="Int32" />
  41.                 </SelectParameters>
  42.                 <DeleteParameters>
  43.                     <asp:Parameter Name="original_id" Type="Int32" />
  44.                     <asp:Parameter Name="original_name" Type="String" />
  45.                 </DeleteParameters>
  46.                 <UpdateParameters>
  47.                     <asp:Parameter Name="name" Type="String" />
  48.                     <asp:Parameter Name="original_id" Type="Int32" />
  49.                     <asp:Parameter Name="original_name" Type="String" />
  50.                 </UpdateParameters>
  51.                 <InsertParameters>
  52.                     <asp:Parameter Name="id" Type="Int32" />
  53.                     <asp:Parameter Name="name" Type="String" />
  54.                 </InsertParameters>
  55.             </asp:SqlDataSource>
  56.         </center>
  57.         <center>
  58.             &nbsp;</center>
  59.         <center>
  60.             <asp:Button ID="BtnAdd" runat="server" Style="position: relative" Text="添加" OnClick="BtnAdd_Click" />
  61.         </center>
  62.         <center>
  63.             &nbsp;</center>
  64.         <center>
  65.             <asp:Panel ID="Panel1" runat="server" Style="position: relative" Visible="false">
  66.                 <asp:Table ID="Table1" runat="server" Style="position: relative" Width="500px">
  67.                     <asp:TableHeaderRow BackColor="lightgray" HorizontalAlign="Left" BorderWidth="1px">
  68.                         <asp:TableHeaderCell ColumnSpan="2">添加差假航班地點</asp:TableHeaderCell>
  69.                     </asp:TableHeaderRow>
  70.                     <asp:TableRow>
  71.                         <asp:TableCell BorderWidth="1px" Width="180px">
  72.                             <asp:Label ID="Label2" runat="server" Text="地點" BorderStyle="None"></asp:Label></asp:TableCell>
  73.                         <asp:TableCell BorderWidth="1px" HorizontalAlign="Left">
  74.                             <asp:TextBox ID="TxtName" runat="server"></asp:TextBox>
  75.                             <asp:RequiredFieldValidator ID="RequiredFieldValidator1" 
  76.                                 runat="server" ErrorMessage="地點不能為空" ControlToValidate="TxtName"></asp:RequiredFieldValidator></asp:TableCell>
  77.                     </asp:TableRow> 
  78.                     <asp:TableRow>
  79.                         <asp:TableCell ColumnSpan="2" BorderWidth="1px">
  80.                             <asp:Button ID="BtnOk" runat="server" Text="儲存" OnClick="BtnOk_Click" />
  81.                             <asp:Button ID="BtnCancel" runat="server" Text="取消" OnClick="BtnCancel_Click" />
  82.                         </asp:TableCell>
  83.                     </asp:TableRow>
  84.                 </asp:Table>
  85.             </asp:Panel>
  86.         </center>
  87.     </div>
  88.     </form>
  89. </body>
  90. </html>