class.aspx
资源名称:web.rar [点击查看]
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:4k
源码类别:
OA系统
开发平台:
ASP/ASPX
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="class.aspx.cs" Inherits="web_class" %>
- <!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>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <asp:Label ID="Label1" runat="server" Width="4.7cm"></asp:Label> <br/>
- <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
- <Columns>
- <asp:BoundField DataField="type" HeaderText="班别" SortExpression="type">
- <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
- <HeaderStyle BackColor="Teal" />
- </asp:BoundField>
- <asp:BoundField DataField="bengin_time" HeaderText="开始时间" SortExpression="bengin_time">
- <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
- <HeaderStyle BackColor="Teal" />
- </asp:BoundField>
- <asp:BoundField DataField="end_time" HeaderText="结束时间" SortExpression="end_time">
- <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
- <HeaderStyle BackColor="Teal" />
- </asp:BoundField>
- </Columns>
- <RowStyle BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px" />
- </asp:GridView>
- <asp:Label ID="Label2" runat="server" Text="选择排班月份:" Width="3cm" BackColor="Teal"></asp:Label>
- <asp:DropDownList ID="dr_year" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource2" DataTextField="the_year" DataValueField="the_year" Height="6px">
- </asp:DropDownList>
- <asp:Label ID="Label3" runat="server" Style="vertical-align: middle; text-align: center"
- Text="年" Width="1cm" Height="19px" BackColor="Teal"></asp:Label>
- <asp:DropDownList ID="dr_month" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource3" DataTextField="the_month" DataValueField="the_month">
- </asp:DropDownList>
- <asp:Label ID="Label4" runat="server" Style="vertical-align: middle; text-align: center"
- Text="月" Width="1cm" BackColor="Teal"></asp:Label>
- <asp:Table ID="shift_table" runat="server" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px" CaptionAlign="Bottom" GridLines="Both">
- </asp:Table>
- <asp:Button ID="Button1" runat="server" BackColor="Teal" OnClick="Button1_Click"
- Text="确定" Width="1.5cm" />
- </div>
- <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:oa1ConnectionString %>"
- SelectCommand="SELECT [type], [bengin_time], [end_time] FROM [oa_pos_type] WHERE ([department] = @department)">
- <SelectParameters>
- <asp:ControlParameter ControlID="Label1" Name="department" PropertyName="Text" Type="String" />
- </SelectParameters>
- </asp:SqlDataSource>
- <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:oa1ConnectionString %>"
- SelectCommand="SELECT DISTINCT the_year FROM time_demo order by the_year"></asp:SqlDataSource>
- <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
- SelectCommand="SELECT distinct [the_month] FROM [time_demo] WHERE ([the_year] = @the_year) order by the_month">
- <SelectParameters>
- <asp:ControlParameter ControlID="dr_year" Name="the_year" PropertyName="SelectedValue"
- Type="Int16" />
- </SelectParameters>
- </asp:SqlDataSource>
- </form>
- </body>
- </html>