<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="eduStat.aspx.cs" Inherits="Web.User.eduStat" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
     <script type="text/javascript" src="WebCalendar.js"></script>
      <script src="Init.js" type="text/javascript"></script>
      <script type="text/javascript" src="../../Css/Common.js"></script>
     <link href="../../Css/Admin.CSS" rel="stylesheet" type="text/css">
     <script type="text/javascript">
         function showdiv() {
             OnInit();
         }

     </script>
    <style type="text/css">
        #table1
        {
            width: 818px;
        }
    </style>
</head>
<body onload="showdiv()">
    <form id="form1" runat="server">
<div>    
        <table id="table1" cellspacing="1" border="0" align="center" bgcolor="#EDF1FA">
            <tr>
            <td>时间范围&nbsp;<asp:TextBox ID="txtStartDate" runat="server" 
                    Width="70px" onclick="new Calendar().show(this);" Height="20"></asp:TextBox>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtStartDate"
                                ErrorMessage="起始日期格式不正确！" ValidationExpression="^((\d{2}(([02468][048])|([13579][26]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|([1-2][0-9])))))|(\d{2}(([02468][1235679])|([13579][01345789]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\s(((0?[1-9])|(1[0-2]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([AM|PM|am|pm]{2,2})))?$">*</asp:RegularExpressionValidator> 到<asp:TextBox ID="txtEndDate" runat="server" Width="70" Height="20"
                    onclick="new Calendar().show(this);"></asp:TextBox>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtEndDate"
                                ErrorMessage="截止日期格式不正确！" ValidationExpression="^((\d{2}(([02468][048])|([13579][26]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|([1-2][0-9])))))|(\d{2}(([02468][1235679])|([13579][01345789]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\s(((0?[1-9])|(1[0-2]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([AM|PM|am|pm]{2,2})))?$">*</asp:RegularExpressionValidator>
                 <div style="display:inline;">单位类别：&nbsp;<select ID="DLunittype" runat="server" onchange="onSelectSource()" >
                            <option Value="0" selected="selected">请选择</option>
                        </select>
                        &nbsp;单位名称：&nbsp;<select ID="DLarticlesource" runat="server" onchange="Onselect()">
                            <option Value="0" >全部</option>
                        </select>
                        <div style="display:none;">
                            <asp:TextBox ID="txttype" runat="server" Width="26px" Text=""></asp:TextBox>
                            <asp:TextBox ID="txtsource" runat="server" Width="30px" Text=""></asp:TextBox>
                            </div> </div>&nbsp;<asp:Button ID="btn_Search" runat="server" 
                    Text="查询" Width="54px" onclick="Search_Click" />&nbsp;&nbsp;
                 <asp:Button ID="btn_one" runat="server" Text="导出" onclick="btn_one_Click" />
                </td>
            </tr>            
            <tr>
                <td valign="top">
                <table id="tab_one" runat=server width="812px">
                <tr>
                <td height="25" align="center" class="table_title"><font size="4">回民区教育局新闻统计</font></td>
                </tr>
                <tr>
                <td>
                    <asp:DataGrid runat="server" AutoGenerateColumns="False" id="dg" 
                        CellPadding="1" Width="812px" BackColor="#EDF1FA" BorderStyle="Solid" BorderWidth="1px" BorderColor="Gray">
                    <Columns>
                         <asp:TemplateColumn HeaderText="编号"> 
                         <ItemTemplate> 
                          <%# dg.Items.Count + 1%> 
                         </ItemTemplate> 
                             <ItemStyle  HorizontalAlign="Center" Height="25" Width="50" />
                         </asp:TemplateColumn> 
                         <asp:TemplateColumn HeaderText="单位名称">
                          <ItemTemplate>
                          <%# GetUnitName(DataBinder.Eval(Container, "DataItem.UnitId").ToString())%>
                         </ItemTemplate> 
                             <ItemStyle HorizontalAlign="Center" />
                         </asp:TemplateColumn>
                       <asp:BoundColumn HeaderText="文章数量" DataField="articlenum">
                           <ItemStyle HorizontalAlign="Center" />
                       </asp:BoundColumn>
                        <asp:BoundColumn HeaderText="视频数量" DataField="medianum">
<ItemStyle HorizontalAlign="Center" Height="25px" Width="130px"></ItemStyle>
                         </asp:BoundColumn>
                         <asp:BoundColumn DataField="num" HeaderText="总数">
                         <ItemStyle HorizontalAlign="Center" />
                         </asp:BoundColumn>
                         <asp:BoundColumn DataField="score" HeaderText="总分">
                             <ItemStyle HorizontalAlign="Center" />
                         </asp:BoundColumn>
                    </Columns>
                    <HeaderStyle HorizontalAlign="Center" 
                        VerticalAlign="Middle" Height="25" />
                    </asp:DataGrid>
                    
                    <asp:Label ID="Showmessage" runat="server" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                    </table>
                 </td>
            </tr>
            
            <tr>
                <td height="30">总计：单位数：<asp:Label ID="unit_count" runat="server" 
                        ForeColor="#FF3300"></asp:Label>
                &nbsp;总共文章数量：<asp:Label ID="news_count" runat="server" 
                    ForeColor="#FF3300"></asp:Label>
                    &nbsp;总共视频数量：<asp:Label ID="passed_count" runat="server" ForeColor="Red"></asp:Label>
                    &nbsp;所有数量：<asp:Label ID="all_count" runat="server" ForeColor="Red"></asp:Label>
                </td>
           </tr>
        </table>
  
    </div>
    </form>
</body>
</html>
