flight_place.aspx
资源名称:web.rar [点击查看]
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:5k
源码类别:
OA系统
开发平台:
ASP/ASPX
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="flight_place.aspx.cs" Inherits="web_system_common_flight_place" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" >
- <head runat="server">
- <title>无标题页</title>
- <link href="../../../css/style.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <center>
- </center>
- <center>
- <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Medium" Style="position: relative"
- Text="差假航班地點管理"></asp:Label> </center>
- <center>
- <br />
- <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White"
- BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="id"
- DataSourceID="SqlDataSource1" GridLines="Vertical" Style="position: relative"
- Width="500px" OnRowDataBound="GridView1_RowDataBound">
- <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
- <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
- <Columns>
- <asp:BoundField DataField="name" HeaderText="地點" SortExpression="name" />
- <asp:CommandField ShowEditButton="True" />
- <asp:CommandField ShowDeleteButton="True" />
- </Columns>
- <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
- <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
- <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
- <AlternatingRowStyle BackColor="#DCDCDC" />
- </asp:GridView>
- <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues"
- ConnectionString="<%$ ConnectionStrings:oaConnection %>" DeleteCommand="DELETE FROM [OA_FLIGHT_PLACE] WHERE [id] = @original_id AND [name] = @original_name"
- InsertCommand="INSERT INTO [OA_FLIGHT_PLACE] ([id], [name]) VALUES (@id, @name)"
- OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT [id], [name] FROM [OA_FLIGHT_PLACE] WHERE ([id] <> @id)"
- UpdateCommand="UPDATE [OA_FLIGHT_PLACE] SET [name] = @name WHERE [id] = @original_id AND [name] = @original_name">
- <SelectParameters>
- <asp:Parameter DefaultValue="0" Name="id" Type="Int32" />
- </SelectParameters>
- <DeleteParameters>
- <asp:Parameter Name="original_id" Type="Int32" />
- <asp:Parameter Name="original_name" Type="String" />
- </DeleteParameters>
- <UpdateParameters>
- <asp:Parameter Name="name" Type="String" />
- <asp:Parameter Name="original_id" Type="Int32" />
- <asp:Parameter Name="original_name" Type="String" />
- </UpdateParameters>
- <InsertParameters>
- <asp:Parameter Name="id" Type="Int32" />
- <asp:Parameter Name="name" Type="String" />
- </InsertParameters>
- </asp:SqlDataSource>
- </center>
- <center>
- </center>
- <center>
- <asp:Button ID="BtnAdd" runat="server" Style="position: relative" Text="添加" OnClick="BtnAdd_Click" />
- </center>
- <center>
- </center>
- <center>
- <asp:Panel ID="Panel1" runat="server" Style="position: relative" Visible="false">
- <asp:Table ID="Table1" runat="server" Style="position: relative" Width="500px">
- <asp:TableHeaderRow BackColor="lightgray" HorizontalAlign="Left" BorderWidth="1px">
- <asp:TableHeaderCell ColumnSpan="2">添加差假航班地點</asp:TableHeaderCell>
- </asp:TableHeaderRow>
- <asp:TableRow>
- <asp:TableCell BorderWidth="1px" Width="180px">
- <asp:Label ID="Label2" runat="server" Text="地點" BorderStyle="None"></asp:Label></asp:TableCell>
- <asp:TableCell BorderWidth="1px" HorizontalAlign="Left">
- <asp:TextBox ID="TxtName" runat="server"></asp:TextBox>
- <asp:RequiredFieldValidator ID="RequiredFieldValidator1"
- runat="server" ErrorMessage="地點不能為空" ControlToValidate="TxtName"></asp:RequiredFieldValidator></asp:TableCell>
- </asp:TableRow>
- <asp:TableRow>
- <asp:TableCell ColumnSpan="2" BorderWidth="1px">
- <asp:Button ID="BtnOk" runat="server" Text="儲存" OnClick="BtnOk_Click" />
- <asp:Button ID="BtnCancel" runat="server" Text="取消" OnClick="BtnCancel_Click" />
- </asp:TableCell>
- </asp:TableRow>
- </asp:Table>
- </asp:Panel>
- </center>
- </div>
- </form>
- </body>
- </html>