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

<!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>
    <style type="text/css">
        .style1
        {
            height: 29px;
        }
    </style>
</head>
<body>
 <form id="form1" runat="server" >
<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 style ="height :40px" >
        <table class="tablebiaoti"  border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td><table  class="tablebiaoti" border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td><div class ="biaotileft ">合同查询</div></td>
          </tr>
        </table> </td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td>
        <asp:Label ID="lbMessage" runat="server" ForeColor="Red"></asp:Label>
        <div style ="margin-top:15px"><asp:RadioButtonList ID="rblState" 
                runat="server" RepeatDirection="Horizontal">
            <asp:ListItem>有效</asp:ListItem>
            <asp:ListItem>失效</asp:ListItem>
            <asp:ListItem Selected="True">所有</asp:ListItem>
                </asp:RadioButtonList></div> 
        <div style ="margin-top:15px">
            <asp:Panel ID="plAdd" runat="server">  人员编号/姓名：  
                <asp:TextBox ID="tbStaff" 
                    runat="server" Width="140px"></asp:TextBox>
                                            
                                                &nbsp;合同编号：<asp:TextBox ID="tbContractid" 
                    runat="server" Width ="140px"></asp:TextBox>  &nbsp;合同名称：<asp:TextBox 
                    ID="tbContractname" runat="server" Width ="140px"></asp:TextBox>
                
            </asp:Panel>
              
                </div>
                        <div style ="margin-top:15px">
            <asp:Panel ID="Panel2" runat="server">  生效时间：从 
                    <asp:TextBox ID="tbStar1" runat="server" Width="80px" onclick="popUpCalendar(this,this,'yyyy-mm-dd')"></asp:TextBox> 
                    到 
                    <asp:TextBox ID="tbStar2" runat="server" Width="80px" onclick="popUpCalendar(this,this,'yyyy-mm-dd')"></asp:TextBox> 
                                            
                                                &nbsp;失效时间：从 
                <asp:TextBox ID="tbEnd1" runat="server" 
                    onclick="popUpCalendar(this,this,'yyyy-mm-dd')" Width="80px"></asp:TextBox>
                到 
                <asp:TextBox ID="tbEnd2" runat="server" 
                    onclick="popUpCalendar(this,this,'yyyy-mm-dd')" Width="80px"></asp:TextBox>
                &nbsp;<asp:Button ID="btSelect" runat="server" Text="查询" onclick="btSelect_Click" />   
                
 
            </asp:Panel>
              
                </div>
                <div runat ="server" visible ="false" id="div2">

                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                        BorderWidth="1px" cellspacing="1" CssClass="gv" 
                        onrowdatabound="GridView1_RowDataBound" Width="100%" 
                        onrowcreated="GridView1_RowCreated">
                        <RowStyle BorderWidth="1px" CssClass="gvrow" />
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <asp:CheckBox ID="CheckBox2" runat="server" AutoPostBack="True" 
                                        OnCheckedChanged="CheckBox2_CheckedChanged" Text="全选" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="CheckBox1" runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="id" HeaderText="序号" ReadOnly="True">
                            <ControlStyle CssClass="hidden" />
                            <FooterStyle CssClass="hidden" />
                            <HeaderStyle CssClass="hidden" />
                            <ItemStyle CssClass="hidden" />
                            </asp:BoundField>

                <asp:BoundField DataField="staffid" HeaderText="人员编号" ReadOnly="True" />
                <asp:BoundField DataField="staffname" HeaderText="姓名" ReadOnly="True" />
                <asp:BoundField DataField="contractname" HeaderText="合同名称" ReadOnly="True" />
                <asp:BoundField DataField="contractid" HeaderText="合同编号" ReadOnly="True" />
                <asp:BoundField DataField="stardate" HeaderText="生效时间" ReadOnly="True" />
                <asp:BoundField DataField="enddate" HeaderText="终止时间" ReadOnly="True" />
                <asp:BoundField DataField="note" HeaderText="备注" ReadOnly="True" />

                                     <asp:TemplateField HeaderText="查看图片">

                                        <ItemTemplate>
   



                            <asp:BulletedList 
                            ID="BulletedList1" runat="server" DisplayMode="LinkButton" BulletStyle="Numbered"
                            onclick="BulletedList1_Click">
                        </asp:BulletedList>
                         <asp:Label ID="notv" runat="server" Text='<%# Bind("picurl") %>'  Visible ="false" ></asp:Label>
                                        </ItemTemplate>

                                    </asp:TemplateField>



                     

                        </Columns>
                        <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
                    </asp:GridView>

            <asp:Button ID="btDelAll" runat="server" onclick="btDelAll_Click" Text="批量删除" />
                                </div> 
        </td>
      </tr>
                  <tr>
                        <td  id ="allowpage" runat ="server" style ="text-align :right ;  padding-right  :5px">
                      &nbsp;
                    </td>
      </tr>
      <tr><td>  
            <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>
      </td></tr>
    </table>
<!-- 一组内容模块结束 -->

<!--  一组内容模块开始   --> 
    <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><table  class="tablebiaoti" border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td><div class ="biaotileft ">录入合同</div></td>
          </tr>
        </table> </td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td>

        <div style ="margin-top:15px">
          人员编号/姓名：  
                <asp:TextBox ID="tbAddStaff" 
                    runat="server" Width="140px"></asp:TextBox>
                                            
                                                &nbsp;<asp:Button ID="btChaStaff" 
                runat="server" Text="查询" onclick="btChaStaff_Click" />   
                </div>
                <div>

                    <asp:RadioButtonList ID="rblStaff" runat="server">
                    </asp:RadioButtonList>
                                </div> 

                                <div style ="text-align :left ">
            <table  style =" width :700px" border = "1" class ="table " cellpadding ="0" cellspacing ="0">
                <tr>
                    <td class ="tabletd_right " style ="width :70px ">
                        合同名称</td>
                    <td class ="tabletd_left ">
        <asp:TextBox ID="tbAddContractname" runat="server" Width="330px" MaxLength="25"></asp:TextBox>
                        <asp:RequiredFieldValidator 
                        ID="RequiredFieldValidator11" runat="server" 
                        ControlToValidate="tbAddContractname" Display="Dynamic" ErrorMessage="名称不能为空。" 
                        ValidationGroup="Add" ForeColor="Red"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" 
                        ControlToValidate="tbAddContractname" Display="Dynamic" ErrorMessage="请输入少于25个字符。" 
                        ValidationExpression="^[^%&gt;&lt;'&amp;*=!&quot;?]{1,25}$" 
                        ValidationGroup="Add" ForeColor="Red"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class ="tabletd_right ">
                        生效日期</td>
                    <td class ="tabletd_left ">
                    <asp:TextBox ID="tbAddstar" runat="server" Width="80px" 
                    onclick="popUpCalendar(this,this,'yyyy-mm-dd')"></asp:TextBox> 
                        <asp:RequiredFieldValidator 
                        ID="RequiredFieldValidator12" runat="server" 
                        ControlToValidate="tbAddstar" Display="Dynamic" ErrorMessage="生效日期不能为空。" 
                        ValidationGroup="Add" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class ="tabletd_right ">
                        终止日期</td>
                    <td class ="tabletd_left ">
                    <asp:TextBox ID="tbAddEnd" runat="server" Width="80px" 
                    onclick="popUpCalendar(this,this,'yyyy-mm-dd')"></asp:TextBox> 
                        <asp:RequiredFieldValidator 
                        ID="RequiredFieldValidator13" runat="server" 
                        ControlToValidate="tbAddEnd" Display="Dynamic" ErrorMessage="终止日期不能为空。" 
                        ValidationGroup="Add" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class ="tabletd_right ">
                        备注</td>
                    <td class ="tabletd_left ">
                        <asp:TextBox ID="strAddNote" runat="server" MaxLength="20" Width="500px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class ="tabletd_right ">
                        合同编号</td>
                    <td class ="tabletd_left">
                        <asp:TextBox ID="tbAddContractid" runat="server" MaxLength="20" Width="130px"></asp:TextBox>
                        <asp:RequiredFieldValidator 
                        ID="RequiredFieldValidator14" runat="server" 
                        ControlToValidate="tbAddContractid" Display="Dynamic" ErrorMessage="编号不能为空。" 
                        ValidationGroup="Add" ForeColor="Red"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" 
                        ControlToValidate="tbAddContractid" Display="Dynamic" ErrorMessage="请输入少于25个字符。" 
                        ValidationExpression="^[^%&gt;&lt;'&amp;*=!&quot;?]{1,25}$" 
                        ValidationGroup="Add" ForeColor="Red"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class ="tabletd_right ">
                        上传图片</td>
                    <td class ="tabletd_left">
                        <div style="margin-top :10px;  margin-bottom :10px">
                            <asp:FileUpload ID="AddupPic" runat="server" />
                            &nbsp; &nbsp;<asp:Button ID="btUpPic" runat="server" onclick="btUpPic_Click" 
                                Text="上传" />
                            <asp:RadioButtonList ID="rblAddPic" runat="server">
                            </asp:RadioButtonList>
                            <asp:Button ID="btDelAddPic" runat="server" onclick="btDelAddPic_Click" 
                                Text="删除图片" Visible="False" />
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        </td>
                    <td class="style1">
                        <asp:Button ID="btAddContract" runat="server" onclick="btAddContract_Click" Text="提交" 
                            ValidationGroup="Add" />
                    </td>
                </tr>
            </table>
 </div>
        </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>
