<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login_applicationsearch.aspx.cs" Inherits="Web.ys.admin.login_applicationsearch" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>OA标题页</title>
    <link href="../../css/admincss/skin.css" rel="stylesheet" type="text/css" />
            <script type="text/javascript" src="../../css/popcalendar.js"></script>
</head>
<body>
    <form id="form1" runat="server" defaultfocus ="tbStaff">
<div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class ="top_bg_left "></td>
    <td  class ="top_bg_center " >
    <table style ="width :100%; height :31"  border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
      
<!--这里写页标题 -->
        <td style ="height :31px"><div class="titlebt">
文印查询
           </div></td>
      </tr>
    </table>
    </td> 
    <td class ="top_bg_right "></td>
  </tr>
  
  <tr>
    <td style ="background :url(../../css/admincss/images/mail_leftbg.gif); vertical-align :middle" >&nbsp;</td>
    <td style ="background-color :#F7F8F9; vertical-align :top " >
                 <asp:Panel ID="Panelview" runat ="server" >
<!--  一组内容模块开始   --> 
    <table class ="tablezong"  border="0"  cellpadding="0" cellspacing="0">
      <tr>
        <td style ="height :40px" >
        <table  class="tablebiaoti" border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td><div class ="biaotileft ">文印申请明细查询</div>
            <div class ="biaotiright ">
                &nbsp;</div> 
                                        </td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td>
        <div>        <asp:RadioButtonList ID="rbl1" runat="server" 
                    RepeatDirection="Horizontal" ValidationGroup="checked" 
                  AutoPostBack="True" onselectedindexchanged="btnQuery_Click">
            <asp:ListItem Selected="True"  >已申请</asp:ListItem>
            <asp:ListItem >审核通过</asp:ListItem>
            <asp:ListItem >印刷完成</asp:ListItem>
            <asp:ListItem >完成</asp:ListItem>
            <asp:ListItem >退回</asp:ListItem>
            </asp:RadioButtonList></div>
                  <div> 
     部门：<asp:DropDownList ID="ddlDepartment" runat="server" 
                 AutoPostBack="True" onselectedindexchanged="btnQuery_Click">
             </asp:DropDownList>&nbsp;   
                      类别：<asp:DropDownList ID="ddlCategories" runat="server" AutoPostBack="True" 
                          onselectedindexchanged="btnQuery_Click">
                      </asp:DropDownList>
             &nbsp;人员编号/姓名：<asp:TextBox ID="tbStaff" runat="server"></asp:TextBox>
             &nbsp;日期：<asp:textbox id="date1" runat="server" Width="72px"  onclick="popUpCalendar(this,this,'yyyy-mm-dd')"></asp:textbox>
        &nbsp;至 <asp:textbox id="date2" runat="server" Width="72px"   onclick="popUpCalendar(this,this,'yyyy-mm-dd')"> </asp:textbox>
       &nbsp;<asp:Button ID="btQuery1" runat="server" onclick="btnQuery_Click" Text="查询" ValidationGroup="Inquires" />
             &nbsp;&nbsp;
            <asp:Label ID="lbRowscountview" runat="server" ForeColor="Red"></asp:Label>
               <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" 
            ControlToValidate="tbStaff" Display="Dynamic" ErrorMessage="输入的人员编号或姓名不正确！" 
            ValidationExpression="^[^%&gt;&lt;'&amp;*=!&quot;?]{0,25}$" 
                 ValidationGroup="Inquires" ForeColor="Red"></asp:RegularExpressionValidator>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" 
                  runat="server" ControlToValidate="date1" Display="Dynamic" 
                  ErrorMessage="起始日期必填！" ValidationGroup="Inquires" ForeColor="Red"></asp:RequiredFieldValidator>
              <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                  ControlToValidate="date2" Display="Dynamic" ErrorMessage="终止日期必填！" 
                 ValidationGroup="Inquires" ForeColor="Red"></asp:RequiredFieldValidator>
              <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" 
                  ControlToValidate="date1" Display="Dynamic" ErrorMessage="请填正确日期格式：如2001-01-01" 
                  ValidationExpression="\d{4}-\d{2}-\d{2}" ValidationGroup="Inquires" 
                 ForeColor="Red"></asp:RegularExpressionValidator>
              <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" 
                  ControlToValidate="date2" Display="Dynamic" ErrorMessage="请填正确日期格式：如2001-01-01" 
                  ValidationExpression="\d{4}-\d{2}-\d{2}" ValidationGroup="Inquires" 
                 ForeColor="Red"></asp:RegularExpressionValidator>
        <div style ="margin-bottom :6px; margin-top :6px">
        <asp:GridView ID="GridView1" runat="server" BorderWidth="1px" 
                onrowdatabound="GridView1_RowDataBound" Width="100%" CssClass="gv" 
                cellspacing="1" 
                AutoGenerateColumns="False" OnSelectedIndexChanging="GridView1_SelectedIndexChanging">
            <RowStyle HorizontalAlign="Center" VerticalAlign="Middle" BorderWidth="1px" 
                CssClass="gvrow" />
                   <Columns>
                                     <asp:TemplateField> 
               <HeaderTemplate>  <asp:CheckBox ID="CheckBox2" Text ="全选" runat="server" AutoPostBack="True" 
                OnCheckedChanged="CheckBox2_CheckedChanged"  />    </HeaderTemplate>        
               <ItemTemplate><asp:CheckBox ID="CheckBox1" runat="server" />&nbsp;</ItemTemplate>               
               </asp:TemplateField>
                  <asp:BoundField DataField="id" HeaderText="申请编号" ReadOnly="True" />
                  <asp:BoundField DataField="applicationtime" HeaderText="申请时间" ReadOnly="True" />
                   
                                         <asp:TemplateField HeaderText="项目名称" ShowHeader="False">
                   <ItemTemplate>
                       <asp:LinkButton ID="LinkButton_Trouble" runat="server" CausesValidation="False" 
                            CommandName="Select" Text='<%# Bind("name") %>'></asp:LinkButton>
                                   <asp:Label ID="lb_Trouble" runat="server" Text='<%# Bind("name") %>' Visible ="false" ></asp:Label>
                   </ItemTemplate>
                   </asp:TemplateField>
                       <asp:BoundField DataField="state" HeaderText="状态" ReadOnly="True" />
                      <asp:BoundField DataField="department" HeaderText="部门" ReadOnly="True" />
                      <asp:BoundField DataField="categories" HeaderText="类别" ReadOnly="True" />
                     
                      <asp:BoundField DataField="copyiesnumber" HeaderText="份数" ReadOnly="True" />
                       <asp:BoundField DataField="pagetype" HeaderText="规格" ReadOnly="True" />
                       <asp:BoundField DataField="pagedouble" HeaderText="双面" ReadOnly="True" />
                       <asp:BoundField DataField="pagenumber" HeaderText="用纸张数" ReadOnly="True" />
          <asp:BoundField DataField="staffname" HeaderText="申请人" ReadOnly="True" />
                      
                                

                </Columns>              
   <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
        </asp:GridView></div>
                        </div>
        </td>
      </tr>
      <tr><td  >
          <table cellpadding="0" cellspacing="0" style ="width :100%">
              <tr>
                  <td style =" padding-left :5px; text-align :left  ">
                      <asp:Panel ID="Panel1" runat="server" Visible="False">
                          <asp:Button ID="btDelAll" runat="server" onclick="btDelAll_Click"   OnClientClick="if(confirm('你确定要删除这些记录吗?')){return true;}else{return false;}"
                              Text="批量删除"  />
                      </asp:Panel>
                  </td>
                  <td  id ="allowpage" runat ="server" style ="text-align :right ;  padding-right  :5px">
                      &nbsp;</td>
              </tr>
          </table>
<asp:Panel ID="plOutput" runat="server" Visible ="false" >
            <div class =" td_rightnoborder  ">      
                <asp:Button ID="btPrintView" runat="server" Text="打印预览" 
                  onclick="btPrintView_Click"  />
                <asp:Button ID="btExcel" runat="server" onclick="btExcel_Click" 
                    Text="导出到EXCEL" />
            </div>
              </asp:Panel>
          
          </td></tr>
    </table>
<!-- 一组内容模块结束 -->
                     </asp:Panel> 
                   <asp:Panel ID ="PanelEdit" runat ="server" Visible ="false" >
                    <div style =" background-color :#cccccc; padding :10px;">
                    <div  class ="gv2row ">申请编号：<asp:Label ID="lbId" runat="server" ></asp:Label>&nbsp;状态：<asp:Label ID="lbState" runat="server"></asp:Label>
                        </div>
                    <div class ="gv2row ">名称：<asp:Label ID="lbName" runat="server" ></asp:Label> </div>
                    <div class ="gv2row ">
                      点击下面链接下载文件：  <asp:BulletedList ID="BulletedList1" runat="server" DisplayMode="LinkButton" OnClick="BulletedList1_Click" Font-Bold="True" Font-Size="Large" ForeColor="Red">
                        </asp:BulletedList></div>
                    <div class ="gv2row ">纸张规格：<asp:Label ID="lbPagetype" runat="server"></asp:Label>
                        双面：<asp:Label ID="lbPagedouble" runat="server"></asp:Label>
                        每份张数：<asp:Label ID="lbEachnumber" runat="server"></asp:Label>
                        份数：<asp:Label ID="lbCopyiesnumber" runat="server"></asp:Label>
                        &nbsp;合计用纸<asp:Label ID="lbPagenumber" runat="server"></asp:Label>张</div> </div> 
           <div style =" margin   :10px;"> 
               <div class ="gv2row ">申请处理进程：</div>
               <asp:DataList ID="DataList1" runat="server" Width="100%">
                <AlternatingItemStyle CssClass="gv2row_AlternatingItemStyle" />
              <ItemTemplate>
              <div  class ="gv2row ">
                <div> 
                    <asp:Label ID="lbDate" runat="server" Text='<%# Bind("operationtime") %>'></asp:Label>&nbsp;
                    <asp:Label ID="Label11" runat="server" Text='<%# Bind("staffname") %>'></asp:Label>：
                    <asp:Label ID="Label13" runat="server" Text='<%# Bind("operation") %>'></asp:Label>&nbsp;
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("remarks") %>'></asp:Label>

                </div> 
                </ItemTemplate>
          </asp:DataList></div> 
                 <div style =" padding-top :10px; padding-bottom :10px; text-align :center ">
                     <asp:Button ID="btBack" runat="server" CausesValidation="False" onclick="btBack_Click" Text="返回" />
                     <div style =" padding-top :5px; padding-bottom :5px; text-align :center "></div> 
            </div>

                </asp:Panel>
    </td>
    <td  style =" background-image:url(../../css/admincss/images/mail_rightbg.gif )" >
    </td>
  </tr>
  <tr>
    <td  class ="buttom_bg_left "></td>
    <td class ="buttom_bg_center " >&nbsp;</td>
    <td  class ="buttom_bg_right " ></td>
  </tr>
</table>
    </div>
    </form>
</body>
</html>