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

<!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 runat="server">
    <title>无标题页</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" >
<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><div class ="biaotileft ">  
                批量导入明细表</div> </td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td>
        
        <div >    
            <table style ="width :100%">
                <tr>
                    <td >
                    <div style =" padding-bottom :10px">  <table  border = "0"  cellpadding ="0" cellspacing ="0" style ="width :100%"><tr>
        <td class =" td_rightnoborder  " style ="width :80px; padding-left :0px"><div >
             <img src="../../css/admincss/images/dian.gif"  alt ="" 
                               style="width: 10px; height: 13px" /> 选择模块：
             </div> </td>
        <td class =" td_leftnoborder  ">                         
            <asp:RadioButtonList ID="rblProjectA" runat="server" 
                             RepeatDirection ="Horizontal" RepeatColumns ="8" 
                AutoPostBack="True" 
                onselectedindexchanged="ddlDepartment_SelectedIndexChanged" >
                         </asp:RadioButtonList>
  </td>
        </tr> </table> </div> 
                       <div style =" padding-bottom :10px">
                           <img src="../../css/admincss/images/dian.gif"  alt ="" 
                               style="width: 10px; height: 13px" /> 部门：<asp:DropDownList 
                               ID="ddlDepartment" runat="server" AutoPostBack="True" 
                               onselectedindexchanged="ddlDepartment_SelectedIndexChanged"> </asp:DropDownList>
                                                &nbsp; 日期：<asp:textbox id="date1" runat="server" Width="70px"  onclick="popUpCalendar(this,this,'yyyymmdd')"></asp:textbox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" 
                               runat="server" ControlToValidate="date1" Display="Dynamic" 
                               ErrorMessage="日期不能为空。" ForeColor="Red" ValidationGroup="Inquires"></asp:RequiredFieldValidator>
                           <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                               ControlToValidate="date1" Display="Dynamic" ErrorMessage="请输入8位数字格式的日期。" 
                               ForeColor="Red" ValidationExpression="^\d{8}$" ValidationGroup="Inquires"></asp:RegularExpressionValidator>
                                                </div> 
                                                <img src="../../css/admincss/images/dian.gif" style="width: 10px; height: 13px"  alt =""/> 
                        选择EXCEL文件：<asp:FileUpload ID="FileUpload1" runat="server"  />
                         <asp:Button ID="btLoad1" runat="server" onclick="btLoad1_Click" Text="导入预览" 
                            ValidationGroup="Inquires" />&nbsp;</td>
                    <td style ="text-align :right ; padding-right :10px ">
                              下载EXCEL样表
                              <asp:ImageButton ID="ImageButton1" runat="server" 
                                  ImageUrl="~/css/images/excel.jpg" onclick="ImageButton1_Click" />
                                            </td>
                </tr>
            </table>
           </div>
        </td>
      </tr>
    </table>
<!-- 一组内容模块结束 -->



<!--  一组内容模块开始   --> 
    <table class ="tablezong"   border="0"  cellpadding="0" cellspacing="0" id= "tableview"   runat ="server"  visible ="false" >
      <tr>
        <td style ="height :40px" >
        <table class="tablebiaoti"  border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td><div class ="biaotileft "><div>导入数据预览（如果数据多于10行，预览中只显示前10行）</div> </div> </td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td >
        <asp:Label ID="lbRowsNum1" runat="server" ForeColor="Red"></asp:Label>
      <div style ="margin-top :10px; margin-bottom :10px"  >
        <asp:GridView ID="GridView1" runat="server" BorderWidth="1px" 
                onrowdatabound="GridView1_RowDataBound" Width="100%" CssClass="gv" cellspacing="1">
            <RowStyle BorderWidth="1px" CssClass="gvrow" />
            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
        </asp:GridView></div>
        <div style ="margin-top :10px; margin-bottom :10px; padding-top :10px"  >
                  <asp:Label ID="lbNote" runat="server" ></asp:Label>
        <asp:GridView ID="GridView3" runat="server" BorderWidth="1px" 
                onrowdatabound="GridView1_RowDataBound" Width="100%" CssClass="gv" cellspacing="1">
            <RowStyle BorderWidth="1px" CssClass="gvrow" />
            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
        </asp:GridView></div>
        <table style ="width :100%" >
        <tr>
        <td style ="text-align :left ">
            &nbsp;</td>
        <td style ="text-align :right ">
            <asp:Button ID="btExcel" runat="server" CausesValidation="False" 
                onclick="btExcel_Click" Text="导出到EXCEL" Visible="False" />
            </td>
        </tr>
        </table>
        </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><div class ="biaotileft ">系统设定项目和EXCEL表项目对照</div> </td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td>
<table border="1" class ="table " cellpadding ="0" cellspacing ="0" style ="width :100%;"  >
                    <tr>
                        <td class ="tabletd_right " style ="width:110px">
                            系统设定项目：</td>
                                                <td class ="tabletd_left ">
                                                    <asp:Label ID="lbsql" runat="server"></asp:Label>
                                                &nbsp;</td>
                                            </tr>
                                            <tr>
                                                <td class ="tabletd_right ">
                                                    EXCEL表中项目：</td>
                                                <td class ="tabletd_left ">
                                                    <asp:Label ID="lbexcel" runat="server"></asp:Label>
                                                &nbsp;</td>
                                            </tr>
                                            </table>
                                            <div  style =" padding-bottom :15px; padding-top :15px;" id="divloadt" runat ="server" visible ="false" >
                           <img src="../../css/admincss/images/dian.gif"  alt ="" 
                               style="width: 10px; height: 13px" /> 项目相同。<asp:Button ID="btLoadt" runat="server" Text="确认导入" 
                                                    onclick="btLoadt_Click" /></div>
                                            <div id ="divloadf" runat ="server" visible ="false" >
                                            <div style =" padding-bottom :15px; padding-top :15px;">
                           <img src="../../css/admincss/images/dian.gif"  alt ="" style="width: 10px; height: 13px" /> 项目不同。以EXCEL表中项目为标准更新系统设定项目后导入。
                            <asp:Button ID="btLoadf1" runat="server"
                                                    Text="更新导入" onclick="btLoadf1_Click" /></div> 

                                                    <div  style =" padding-bottom :15px; padding-top :15px;">
                           <img src="../../css/admincss/images/dian.gif"  alt ="" style="width: 10px; height: 13px" /> 项目不同。手动选择EXCEL项目同系统设定项目对应后导入。
                           <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                                        BorderWidth="1px" CssClass="gv" cellspacing="1"
                                        onrowdatabound="GridView2_RowDataBound" Width="322px" 
                                        >
                                         <RowStyle BorderWidth="1px" CssClass="gvrow" />
                                        <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
                     <Columns>
                 <asp:TemplateField HeaderText="数据库中项目">
      <ItemTemplate>
          <asp:Label ID="Label1" runat="server" Text="<%#Container.DataItem%>"></asp:Label>
           
       </ItemTemplate>
</asp:TemplateField>
                <asp:TemplateField HeaderText="EXCEL中项目" ShowHeader="False">
                    <ItemTemplate>
                        <asp:DropDownList ID="ddl1" runat="server">
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
         </asp:GridView>
                                    
        <asp:Button ID="btLoadf2" runat="server" 
                                                            Text="手动选择后导入" onclick="btLoadf2_Click" />
                                                       
                                                </div>
                                                            </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>
