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

<!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/css.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../css/popcalendar.js"></script>
    </head>
<body>
    <form id="fom" runat="server">
        <div id ="main-c-03-right" >
            <table cellpadding="0"; cellspacing ="0"; style =" width :100%;background-image: url('../../css/images/right_top.png'); background-repeat :repeat-x" >
                <tr>
               <td class  ="main-c-03-right02-top">
                	   <!--这里添加页面标题 -->
                      	设备借用查询
                      	</td>
                </tr>
            </table>
            <div id="main-c-03-right02-main">
            
<!--栏目开始 -->

            <!--这里添加内容 -->
                 <div id="divsearch" runat ="server" >
                <div style ="margin-bottom :10px;"> <asp:LinkButton ID="lbnCha" runat="server" OnClick="lbnCha_Click">按借出日期查询</asp:LinkButton> </div>
                <div runat ="server" id="div_cha" visible ="false" >借出日期：  
                    <asp:TextBox ID="tbLendtime_Star" runat="server" Width="80px" onclick="popUpCalendar(this,this,'yyyy-mm-dd')"></asp:TextBox>
                &nbsp;-
                    <asp:TextBox ID="tbLendtime_End" runat="server" Width="80px" onclick="popUpCalendar(this,this,'yyyy-mm-dd')"></asp:TextBox>   &nbsp;<asp:Button ID="tbSub" runat="server" Text="提交查询" onclick="tbSub_Click" 
                        ValidationGroup="sub" />  </div>


                        <asp:GridView ID="GridView1" runat="server" 
                    onrowdatabound="GridView1_RowDataBound" Width="100%" 
                BorderWidth="1px" CssClass="gv" AutoGenerateColumns="False" OnRowCommand="GridView1_RowCommand" >
            <RowStyle BorderWidth="1px" CssClass="gvrow" />
            <Columns>
                    <asp:BoundField DataField="id" HeaderText="借用序号" ReadOnly="True" />
                    <asp:BoundField DataField="devicenumber" HeaderText="设备编号" ReadOnly="True" />
                    <asp:BoundField DataField="categories" HeaderText="类别" ReadOnly="True" />
                    <asp:BoundField DataField="devicename" HeaderText="设备名称" ReadOnly="True" />
                    <asp:BoundField DataField="type" HeaderText="型号" ReadOnly="True" />
                    <asp:TemplateField HeaderText="配置">
                        <EditItemTemplate>
                            <asp:Label ID="configuration_e" runat="server" Text='<%# Eval("configuration") %>'></asp:Label>&nbsp;
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="configuration_v" runat="server"></asp:Label>
                            <asp:Label ID="configuration_notv" runat="server" Text='<%# Bind("configuration") %>'  Visible ="false" ></asp:Label>&nbsp;
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="借用数量">
                        <EditItemTemplate>
                            <asp:Label ID="lendnumber_e" runat="server" Text='<%# Eval("lendnumber") %>'></asp:Label>
                            <asp:Label ID="lendnumberunit_e" runat="server" Text='<%# Bind("unit") %>'></asp:Label>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lendnumber_v" runat="server" Text='<%# Bind("lendnumber") %>'></asp:Label>
                            <asp:Label ID="lendnumberunit_v" runat="server" Text='<%# Bind("unit") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="已还数量">
                        <EditItemTemplate>
                            <asp:Label ID="returnnumber_e" runat="server" 
                                Text='<%# Eval("returnnumber") %>'></asp:Label>
                            <asp:Label ID="returnnumberunit_e" runat="server" Text='<%# Bind("unit") %>'></asp:Label>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="returnnumber_v" runat="server" 
                                Text='<%# Bind("returnnumber") %>'></asp:Label>
                            <asp:Label ID="returnnumberunit_v" runat="server" Text='<%# Bind("unit") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:BoundField DataField="lenddate" HeaderText="借用时间" ReadOnly="True" />
                    <asp:BoundField DataField="devicestate" HeaderText="状态" ReadOnly="True" />
                     <asp:TemplateField HeaderText="借用说明">
                         <EditItemTemplate>
                             <asp:Label ID="lendnote_e" runat="server" Text='<%# Eval("lendnote") %>'></asp:Label>&nbsp;
                         </EditItemTemplate>
                         <ItemTemplate>
                             <asp:Label ID="lendnote_v" runat="server"></asp:Label>
                             <asp:Label ID="lendnote_notv" runat="server" Text='<%# Eval("lendnote") %>' Visible ="false" ></asp:Label>&nbsp;
                         </ItemTemplate>
                    </asp:TemplateField>

                <asp:BoundField DataField="plansreturndate" HeaderText="计划归还时间" ReadOnly="True" />
                     <asp:BoundField DataField="iouid" HeaderText="借用凭证" ReadOnly="True" />
                     <asp:TemplateField HeaderText="延期" ShowHeader="False">
                         <ItemTemplate>
                             <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="yanqi" Text="延期" CommandArgument ='<%# Eval("id") %>'></asp:LinkButton>
                         </ItemTemplate>
                    </asp:TemplateField>
                       <asp:TemplateField HeaderText="报损" ShowHeader="False">
                         <ItemTemplate>
                             <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="baosun" Text="报损"  CommandArgument ='<%# Eval("id") %>'></asp:LinkButton>
                         </ItemTemplate>
                    </asp:TemplateField>
                   
                </Columns>
            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
        </asp:GridView>
          <div>
              说明：<br />
              简易查询模式：查询所有未还的借用记录和近一年内已经完成归还的借用记录。<br />
              按借用日期查询模式：查询指定日期内的借用记录，包含已还和未还。

          </div>    
     </div>
<!--栏目结束 -->
<asp:Panel ID="Panel3" runat="server">
      <div class =" lanmubiaoti ">设备报损</div>
                                   <div>     <asp:Label ID="lbId" runat="server" Visible="False"></asp:Label>
                                        设备编号:<asp:Label ID="lbDevicenumber" runat="server"></asp:Label>
                                        &nbsp;设备名称:<asp:Label ID="lbDevicename" runat="server"></asp:Label>
                                        &nbsp;设备类别:<asp:Label ID="lbCategories" runat="server"></asp:Label>
                                        &nbsp;型号:<asp:Label ID="lbType" runat="server"></asp:Label>  </div>
    <div>详细配置:<asp:Label ID="lbconfiguration" runat="server"></asp:Label> </div>
    <div>
                                       借用数量：<asp:Label ID="lbNumber" runat="server"></asp:Label>
                                        <asp:Label ID="lbUnit1" runat="server"></asp:Label>
      &nbsp;已还数量：<asp:Label ID="lbReturnNumber" runat="server"></asp:Label>
                                        <asp:Label ID="lbUnit2" runat="server"></asp:Label>
        </div> 
            <table border = "0" cellpadding ="0" cellspacing ="0" style ="width :100%">
                <tr>
                    <td class=" td_rightnoborder  " style="width :60px">
                        报损数量:</td>
                    <td class=" td_leftnoborder  ">
                        <asp:TextBox ID="tbLossnumber" runat="server" Width="50px">1</asp:TextBox>
                        &nbsp;<asp:Label ID="lbUnit" runat="server"></asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                            ControlToValidate="tbLossnumber" Display="Dynamic" ErrorMessage="数量不能为空！" 
                            ValidationGroup="tijiao" ForeColor="Red"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator13" 
                            runat="server" ControlToValidate="tbLossnumber" Display="Dynamic" 
                            ErrorMessage="请输入大于0的整数。" ValidationExpression="^\+?[1-9][0-9]*$" 
                            ValidationGroup="tijiao" ForeColor="Red"></asp:RegularExpressionValidator>
                      </td>
                </tr>
            <tr>
                <td class =" td_rightnoborder  " >
                                        报损原因:</td>
                <td class =" td_leftnoborder  ">
                                           <asp:DropDownList ID="ddlLosscause" runat="server">
                                           </asp:DropDownList>
                                           &nbsp;
</td>
            </tr>
            <tr>
                <td class =" td_rightnoborder  " >
                    报损说明:</td>
                <td class =" td_leftnoborder  ">
                    <asp:TextBox ID="tbLossnote" runat="server" Width="240px"></asp:TextBox>
                                            </td>
            </tr>
            <tr>
                <td class =" td_leftnoborder  " colspan="2">
                    <asp:Button ID="btTijiao" runat="server" Text="提交报损" onclick="btTijiao_Click" 
                        ValidationGroup="tijiao" />
                    &nbsp;
                    <asp:Button ID="btback" runat="server" Text="返回" OnClick="btback_Click" />
                </td>
            </tr>
            </table>
</asp:Panel>

                </div>
            </div>
        </form>
    </body>
</html>