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

<!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 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 ="tbDevicenumber" >
<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 " >


    <!--  一组内容模块开始   --> 



    <table class ="tablezong"   border="0"  cellpadding="0" cellspacing="0">
      <tr>
        <td >
     <asp:Label ID="lbMessage" runat="server" ForeColor="Red"></asp:Label>
      <table style ="width :100%"><tr>
<td style ="text-align :left ;">                            <asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True" 
                                 RepeatDirection="Horizontal" 
                                onselectedindexchanged="lbtViewlenddatechange_Click">
                                 <asp:ListItem>未审核</asp:ListItem>
                                 <asp:ListItem>同意</asp:ListItem>
                                 <asp:ListItem>未批准</asp:ListItem>
                                 <asp:ListItem Selected="True">所有</asp:ListItem>
                             </asp:RadioButtonList></td>
<td style =" text-align :right;">
    每页显示行数：<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True" 
        onselectedindexchanged="DropDownList2_SelectedIndexChanged">
        <asp:ListItem>10</asp:ListItem>
        <asp:ListItem Selected="True">20</asp:ListItem>
        <asp:ListItem>50</asp:ListItem>
        <asp:ListItem>100</asp:ListItem>
        <asp:ListItem>500</asp:ListItem>
    </asp:DropDownList>
    &nbsp;</td>
</tr></table>
      <div>                                     
                                 按申请时间查询：起始日期&nbsp;&nbsp; <asp:textbox id="date1" runat="server" Width="100px"  
              ToolTip="点击输入框右侧的日期图标选择日期" onclick="popUpCalendar(this,this,'yyyy-mm-dd')"></asp:textbox>
                                 
        终止日期&nbsp;&nbsp; <asp:textbox id="date2" runat="server" Width="100px"    
              ToolTip="点击输入框右侧的日期图标选择日期" onclick="popUpCalendar(this,this,'yyyy-mm-dd')"></asp:textbox>
                                                          
       <asp:Button ID="tijiao" runat="server" onclick="lbtViewlenddatechange_Click" Text="提交查询" 
                                     ValidationGroup="cha"/>
       &nbsp;&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" 
                  runat="server" ControlToValidate="date1" Display="Dynamic" 
                  ErrorMessage="起始日期必填！" ValidationGroup="cha" ForeColor="Red"></asp:RequiredFieldValidator>
              <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                  ControlToValidate="date2" Display="Dynamic" ErrorMessage="终止日期必填！" 
                          ValidationGroup="cha" ForeColor="Red"></asp:RequiredFieldValidator>
              <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                  ControlToValidate="date1" Display="Dynamic" ErrorMessage="请填正确日期格式：如2001-01-01" 
                  ValidationExpression="\d{4}-\d{2}-\d{2}" ValidationGroup="cha" ForeColor="Red"></asp:RegularExpressionValidator>
              <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                  ControlToValidate="date2" Display="Dynamic" ErrorMessage="请填正确日期格式：如2001-01-01" 
                  ValidationExpression="\d{4}-\d{2}-\d{2}" ValidationGroup="cha" ForeColor="Red"></asp:RegularExpressionValidator>
            </div> 
        </td>
      </tr>

      <tr>
        <td>        
        
            <asp:GridView ID="GridView2" runat="server" Width="100%" CssClass="gv" 
            cellspacing="1" BorderWidth="1px" 
                AutoGenerateColumns="False" onrowdatabound="GridView2_RowDataBound" 
                onrowcreated="GridView2_RowCreated" >
            <RowStyle  CssClass="gvrow" BorderWidth="1px" />
                <Columns>
                <asp:TemplateField> 
               <HeaderTemplate>  <asp:CheckBox ID="CheckBox2" Text ="全选" runat="server" AutoPostBack="True" 
                OnCheckedChanged="CheckBox2_CheckedChanged"  />    </HeaderTemplate>        
               <ItemTemplate><asp:CheckBox ID="CheckBox1" runat="server" /></ItemTemplate>               
               </asp:TemplateField>
                                  <asp:BoundField DataField="id" HeaderText="序号" ReadOnly="True" />
                                  <asp:BoundField DataField="lendid" HeaderText="借用序号" ReadOnly="True" />
                  <asp:BoundField DataField="claimdate" HeaderText="申请时间" ReadOnly="True" />
                  <asp:BoundField DataField="claimerid" HeaderText="申请人员编号" ReadOnly="True" />
                   <asp:BoundField DataField="claimer" HeaderText="申请人" ReadOnly="True" />
                    <asp:BoundField DataField="devicename" HeaderText="设备名称" ReadOnly="True" />
                    <asp:BoundField DataField="devicenumber" HeaderText="设备编号" ReadOnly="True" />
                    <asp:BoundField DataField="categories" HeaderText="类别" ReadOnly="True" />
                    <asp:BoundField DataField="type" HeaderText="型号" ReadOnly="True" />
                    <asp:TemplateField HeaderText="配置">
                        <EditItemTemplate>
                            <asp:Label ID="configuration_e0" runat="server" 
                                Text='<%# Eval("configuration") %>'></asp:Label>&nbsp;
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="configuration_v0" runat="server"></asp:Label>
                            <asp:Label ID="configuration_notv0" runat="server" 
                                Text='<%# Bind("configuration") %>'  Visible ="false" ></asp:Label>&nbsp;
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="借用数量">
                        <EditItemTemplate>
                            <asp:Label ID="lendnumber_e0" runat="server" Text='<%# Eval("lendnumber") %>'></asp:Label>
                            <asp:Label ID="lendnumberunit_e0" runat="server" Text='<%# Bind("unit") %>'></asp:Label>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lendnumber_v0" runat="server" Text='<%# Bind("lendnumber") %>'></asp:Label>
                            <asp:Label ID="lendnumberunit_v0" runat="server" Text='<%# Bind("unit") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="已还数量">
                        <EditItemTemplate>
                            <asp:Label ID="returnnumber_e0" runat="server" 
                                Text='<%# Eval("returnnumber") %>'></asp:Label>
                            <asp:Label ID="returnnumberunit_e0" runat="server" Text='<%# Bind("unit") %>'></asp:Label>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="returnnumber_v0" runat="server" 
                                Text='<%# Bind("returnnumber") %>'></asp:Label>
                            <asp:Label ID="returnnumberunit_v0" runat="server" Text='<%# Bind("unit") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                  
                   
                     <asp:TemplateField HeaderText="借用说明">
                         <EditItemTemplate>
                             <asp:Label ID="lendnote_e0" runat="server" Text='<%# Eval("lendnote") %>'></asp:Label>&nbsp;
                         </EditItemTemplate>
                         <ItemTemplate>
                             <asp:Label ID="lendnote_v0" runat="server"></asp:Label>
                             <asp:Label ID="lendnote_notv0" runat="server" Text='<%# Eval("lendnote") %>' 
                                 Visible ="false" ></asp:Label>&nbsp;
                         </ItemTemplate>
                    </asp:TemplateField>
 
                    <asp:BoundField DataField="lenddate" HeaderText="借用时间" ReadOnly="True" />
                    <asp:BoundField DataField="plansreturndate" HeaderText="原计划归还时间" ReadOnly="True" />
                    <asp:BoundField DataField="plansreturndate_new" HeaderText="新计划归还时间" ReadOnly="True" />

                    <asp:BoundField DataField="ratify" HeaderText="审批状态" ReadOnly="True" />
                    <asp:TemplateField HeaderText="审批人">
                        <EditItemTemplate>
                            <asp:Label ID="Label2" runat="server" Text='<%# Eval("manager") %>'></asp:Label>&nbsp;
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label2" runat="server" Text='<%# Bind("manager") %>'></asp:Label>&nbsp;
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="审批时间">
                        <EditItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("ratifydate").ToString()=="1900-1-1 0:00:00"?"":Eval("ratifydate") %>'></asp:Label>&nbsp;
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("ratifydate").ToString()=="1900-1-1 0:00:00"?"":Eval("ratifydate") %>'></asp:Label>&nbsp;
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            <HeaderStyle  CssClass="gvhead"  />
        </asp:GridView>
        
        
        </td>
      </tr>

      <tr><td>
          <asp:Panel ID="plOutput" runat="server" Visible ="false" >

      <div id="divratify" runat ="server" visible ="false" >
       审核意见：<asp:DropDownList ID="ddlRatify" runat="server">
              <asp:ListItem Selected="True">同意</asp:ListItem>
              <asp:ListItem>未批准</asp:ListItem>
              <asp:ListItem>删除</asp:ListItem>
          </asp:DropDownList>
          &nbsp;新计划归还时间：<asp:TextBox ID="date3" runat="server" 
              onclick="popUpCalendar(this,this,'yyyy-mm-dd')" ToolTip="点击输入框右侧的日期图标选择日期" 
              Width="100px"></asp:TextBox>
          （不改变员工申请的延期时间则留空） 
          <asp:Button ID="brRatify" runat="server" 
              Text="提交审核" ValidationGroup="Ratify" onclick="brRatify_Click" />
      
          <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
              ControlToValidate="date3" Display="Dynamic" ErrorMessage="请填正确日期格式：如2001-01-01" 
              ForeColor="Red" ValidationExpression="\d{4}-\d{2}-\d{2}" 
              ValidationGroup="Ratify"></asp:RegularExpressionValidator>
      </div>
      <div > <table  style =" width:100%;"><tr><td id ="allowpage" runat ="server"  style ="text-align :right ; padding-right :5px"> </td></tr></table></div>

                  <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>

<!-- 一组内容模块结束 -->
   
    </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 " ></td>
    <td  class ="buttom_bg_right " ></td>
  </tr>
</table>
    </div>
    </form>
</body>
</html>