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

<!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 style =" margin-top :10px;">
<asp:CheckBoxList ID="cblCategories" runat="server" Enabled="False" 
                    RepeatDirection="Horizontal">
                </asp:CheckBoxList></div> 
    <table class ="tablezong"   border="0"  cellpadding="0" cellspacing="0">

      <tr>
        <td style ="padding-top :15px" >        
        人员编号/设备编号
            <asp:TextBox ID="tbNumber" runat="server" Width="250px"></asp:TextBox>
            <asp:Button ID="btSelect" runat="server" Text="提交" onclick="btSelect_Click" />
            <br /><br />
&nbsp;&nbsp;&nbsp;&nbsp; 
        
       
        
            <asp:RadioButtonList ID="rblStaff" runat="server" AutoPostBack="True" 
                onselectedindexchanged="rblStaff_SelectedIndexChanged">
            </asp:RadioButtonList>
        
        </td>
      </tr>
    </table>
<!-- 一组内容模块结束 -->

<!--栏目开始 -->
              <asp:Panel ID="Panel1" runat="server" Visible="False">
              <div class =" lanmubiaoti ">待还设备列表</div>
            
            <!--这里添加内容 -->
            <asp:GridView ID="GridView1" runat="server" Width="100%" 
                BorderWidth="1px" CssClass="gv" AutoGenerateColumns="False" 
                      onrowcancelingedit="GridView1_RowCancelingEdit" 
                      onrowdeleting="GridView1_RowDeleting" onrowediting="GridView1_RowEditing" 
                      onrowupdating="GridView1_RowUpdating" >
            <RowStyle BorderWidth="1px" CssClass="gvrow" />
                <Columns>
                                    <asp:BoundField DataField="lendid" HeaderText="借用序号" ReadOnly="True" />
                                    <asp:BoundField DataField="devicenumber" 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:BoundField DataField="unit" 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:TemplateField HeaderText="归还数量">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("returnnumber") %>' 
                                                Width="40px"></asp:TextBox>
                                            须还：<asp:Label ID="Label2" runat="server" Text='<%# Bind("sumreturnnumber") %>'></asp:Label>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                                ControlToValidate="TextBox1" Display="Dynamic" ErrorMessage="数量不能为空。"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                                ControlToValidate="TextBox1" Display="Dynamic" ErrorMessage="请输入大于0的整数。" 
                                                ValidationExpression="^\+?[1-9][0-9]*$"></asp:RegularExpressionValidator>
                                            <asp:RangeValidator ID="RangeValidator1" runat="server" 
                                                ControlToValidate="TextBox1" Display="Dynamic" ErrorMessage="请输入合适的数量" 
                                                MaximumValue='<%# Bind("sumreturnnumber") %>' MinimumValue="<%# 0 %>" 
                                                Type="Integer"></asp:RangeValidator>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("returnnumber") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="归还说明">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("returnnote") %>' 
                                                Width="200px"></asp:TextBox>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" 
                                                ControlToValidate="TextBox2" Display="Dynamic" ErrorMessage="不能超过100个字" 
                                                Font-Size="Small" ValidationExpression="^[^%&gt;&lt;&amp;=]{0,100}$"></asp:RegularExpressionValidator>
                                            &nbsp;
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label2" runat="server" Text='<%# Bind("returnnote") %>'></asp:Label>
                                            &nbsp;
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:CommandField EditText="修改" HeaderText="修改" ShowEditButton="True" />
                                    <asp:CommandField HeaderText="删除" ShowDeleteButton="True"  DeleteText ="删除"/>
                                </Columns>
  
            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
        </asp:GridView>
			        <div style="text-align :right; padding :8px ">
        
         <asp:Button ID="btReturn" runat="server" Text="完成归还并打印凭证" onclick="btReturn_Click" />
        </div> 
		</asp:Panel> 	

<!--栏目结束 -->
   
<!--栏目开始 -->
              <asp:Panel ID="Panel2" runat="server" Visible="False">
              <div class ="lanmubiaoti "> 借用设备列表</div>
            
            <!--这里添加内容 -->
            <asp:GridView ID="GridView2" runat="server" Width="100%" 
                BorderWidth="1px" CssClass="gv" AutoGenerateColumns="False" 
                      onrowcreated="GridView2_RowCreated" onrowdatabound="GridView2_RowDataBound" 
                      onselectedindexchanging="GridView2_SelectedIndexChanging" >
            <RowStyle 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" /></ItemTemplate>               
               </asp:TemplateField>
                    <asp:BoundField DataField="id" HeaderText="序号" ReadOnly="True" />
                    <asp:BoundField DataField="devicenumber" 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("surplus") %>'></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("surplus") %>'></asp:Label>
                            <asp:Label ID="lendnumberunit_v" runat="server" Text='<%# Bind("unit") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    

                    <asp:BoundField DataField="lenddate" 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:CommandField HeaderText="操作" SelectText="归还" ShowSelectButton="True" />
                  
                    
                </Columns>
  
            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
        </asp:GridView>
        <div style ="text-align :left ">    <asp:Button ID="Button1" runat="server" 
                Text="批量归还" onclick="Button1_Click" /></div>
		</asp:Panel> 	

<!--栏目结束 -->
                </div>
            </div>
        </form>
    </body>
</html>

