<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ImportControlPanel.aspx.cs" Inherits="MTCUN.Admin.ImportControlPanel"
    Title="数据导入控制-系统" %>

<%@ Import Namespace="MTCUN" %>
<!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 id="linkStyle" runat="server" href="../Themes/Blue/css.css" rel="stylesheet"
        type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
        <div class="divpanel">
            <table class="table" cellspacing="0">
                <tr>
                    <th colspan="2">EXCEL导入数据
                    </th>
                </tr>
                <tr>
                    <td style="width: 162px">导入潜在学员信息：
                    </td>
                    <td>
                        <div class="lab_button_sub" id="divEI2" runat="server">
                            <a id="aEI2" runat="server" onclick="javascript:parent.onClickLink2(this, '__mt_import2','../Admin/ExcelImport2.aspx');" href="#">[导入]</a>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td style="width: 162px">导入正式学员信息：
                    </td>
                    <td>
                        <div class="lab_button_sub" id="divEI" runat="server">
                            <a id="aEI" runat="server" onclick="javascript:parent.onClickLink2(this, '__mt_import','../Admin/ExcelImport.aspx');" href="#">[导入]</a>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <div class="divpanel">
            <table class="table" cellspacing="0">
                <tr>
                    <th>EXCEL导入日志
                    </th>
                </tr>
                <tr>
                    <td>
                        <asp:GridView ID="GridView1" CssClass="smallgridview" runat="server" AutoGenerateColumns="False"
                            Width="100%" OnRowDeleting="GridView1_RowDeleting" DataKeyNames="ImportBatchID" OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound">
                            <Columns>
                                <asp:TemplateField HeaderText="类型">
                                    <ItemTemplate>
                                        <%#(int)Eval("DataType") == 0 ? "潜在学员信息" : "正式学员信息" %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="FileName" HeaderText="文件名" />
                                <asp:BoundField DataField="DateAndTime" HeaderText="日期" />
                                <asp:TemplateField HeaderText="大小">
                                    <ItemTemplate>
                                        <%#swq.Tools.GetFileSize((int)Eval("FileSize")) %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="行数">
                                    <ItemTemplate>
                                        <%#Eval("Rows") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="TrueName" HeaderText="导入人" />
                                <asp:TemplateField HeaderText="撤回">
                                    <ItemTemplate>
                                        <div class="lab_button_sub" id="divRestore" runat="server">
                                            <asp:LinkButton ID="lbnRestore" runat="server" Text="撤回" CommandName="restore" CommandArgument='<%#Eval("ImportBatchID") %>'
                                                OnClientClick='<%# string.Format(@"return confirm(""你确定将导入的数据{0}条删除吗？注意：一旦执行将无法恢复。"");",Eval("Rows"))%>'></asp:LinkButton>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="删除">
                                    <ItemTemplate>
                                        <div class="lab_button_sub" id="divDelete" runat="server">
                                            <asp:LinkButton ID="lbnDelete" runat="server" Text="删除" CommandName="delete" OnClientClick='<%# string.Format(@"return confirm(""你确定删除这条日志？"");")%>'></asp:LinkButton>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
