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

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="class.aspx.cs" Inherits="web_class" %>
  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. </head>
  7. <body>
  8.     <form id="form1" runat="server">
  9.     <div>
  10.         <asp:Label ID="Label1" runat="server" Width="4.7cm"></asp:Label>&nbsp;<br/>
  11.         <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
  12.             <Columns>
  13.                 <asp:BoundField DataField="type" HeaderText="班别" SortExpression="type">
  14.                     <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
  15.                     <HeaderStyle BackColor="Teal" />
  16.                 </asp:BoundField>
  17.                 <asp:BoundField DataField="bengin_time" HeaderText="开始时间" SortExpression="bengin_time">
  18.                     <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
  19.                     <HeaderStyle BackColor="Teal" />
  20.                 </asp:BoundField>
  21.                 <asp:BoundField DataField="end_time" HeaderText="结束时间" SortExpression="end_time">
  22.                     <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
  23.                     <HeaderStyle BackColor="Teal" />
  24.                 </asp:BoundField>
  25.             </Columns>
  26.             <RowStyle BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px" />
  27.         </asp:GridView>
  28.         <asp:Label ID="Label2" runat="server" Text="选择排班月份:" Width="3cm" BackColor="Teal"></asp:Label>
  29.         <asp:DropDownList ID="dr_year" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource2" DataTextField="the_year" DataValueField="the_year" Height="6px">
  30.         </asp:DropDownList>&nbsp;
  31.         <asp:Label ID="Label3" runat="server" Style="vertical-align: middle; text-align: center"
  32.             Text="年" Width="1cm" Height="19px" BackColor="Teal"></asp:Label>
  33.         <asp:DropDownList ID="dr_month" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource3" DataTextField="the_month" DataValueField="the_month">
  34.         </asp:DropDownList>&nbsp;
  35.         <asp:Label ID="Label4" runat="server" Style="vertical-align: middle; text-align: center"
  36.             Text="月" Width="1cm" BackColor="Teal"></asp:Label>
  37.         <asp:Table ID="shift_table" runat="server" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px" CaptionAlign="Bottom" GridLines="Both">
  38.         </asp:Table>
  39.         <asp:Button ID="Button1" runat="server" BackColor="Teal" OnClick="Button1_Click"
  40.             Text="确定" Width="1.5cm" />
  41.     
  42.     </div>
  43.         <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:oa1ConnectionString %>"
  44.             SelectCommand="SELECT [type], [bengin_time], [end_time] FROM [oa_pos_type] WHERE ([department] = @department)">
  45.             <SelectParameters>
  46.                 <asp:ControlParameter ControlID="Label1" Name="department" PropertyName="Text" Type="String" />
  47.             </SelectParameters>
  48.         </asp:SqlDataSource>
  49.         <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:oa1ConnectionString %>"
  50.             SelectCommand="SELECT DISTINCT the_year FROM time_demo order by the_year"></asp:SqlDataSource>
  51.         <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
  52.             SelectCommand="SELECT distinct  [the_month] FROM [time_demo] WHERE ([the_year] = @the_year) order by the_month">
  53.             <SelectParameters>
  54.                 <asp:ControlParameter ControlID="dr_year" Name="the_year" PropertyName="SelectedValue"
  55.                     Type="Int16" />
  56.             </SelectParameters>
  57.         </asp:SqlDataSource>
  58.     </form>
  59. </body>
  60. </html>