<%@ Page Language="C#" EnableEventValidation = "false" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin_ZGCardItem" Title="准考证管理" Codebehind="KS.ZGCardItem.Aspx.cs" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.Publics" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
    <asp:Panel ID="listPanel" runat="server" Width="100%">
      <div id="manage_top">
        
       &nbsp;&nbsp;<a href="KS.ZGCard.aspx"><strong>返 回</strong></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;查看[<span style="color:Red"><asp:Label ID="LabCardName"
           runat="server" Text="Label"></asp:Label></span>]下的准考证列表        
      </div>    
        <div class="menu_top_fixed_height"></div> 
<div class="content-area">             

    <div>

        <KS:KSGV ID="ProListView" runat="server" AutoGenerateColumns="False" DataKeyNames="FieldID" GridLines="None"
            OnRowDataBound="FieldListView_RowDataBound" PagerType="CustomNumeric" Width="99%" EnableTheming="True" OnRowCommand="FieldListView_RowCommand" HorizontalAlign="Center" EmptyDataText="此项目下没有准考证!">
            <Columns>
              <asp:TemplateField HeaderText="选择">
                <itemstyle horizontalalign="Center" width="50px" />
                <itemtemplate>
                    <input type="checkbox"  name="ids" id="ids" value="<%#Eval("ID") %>" />
                </itemtemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="头像">
                 <itemstyle width="55px" horizontalalign="Center" />
                <itemtemplate>
                  <img style="border:1px solid #ccc;padding:1px;" onerror="this.src='<%=MyCache.GetCacheConfig(5)+MyCache.GetCacheConfig(0) %>SysImg/face/<%# Convert.ToString(Eval("Sex"))=="男"?"boy.jpg":"girl.jpg"%>';" src="<%# Convert.ToString(Eval("userface")).ToLower().IndexOf("http")==-1?MyCache.GetCacheConfig(5)+ "/UploadFiles/avatar/" + Eval("userid") + ".jpg":Convert.ToString(Eval("userface")) %>" width="40" height="45" />
                </itemtemplate>
              </asp:TemplateField>

          
              <asp:TemplateField HeaderText="准考证号">
              <itemstyle horizontalalign="left" Height="50px"/>
                <itemtemplate>
                   <span style="font-family:@微软雅黑;font-size:16px;font-weight:bold"><%#Eval("CardNum") %></span>
                </itemtemplate>
              </asp:TemplateField>

              <asp:BoundField DataField="username"  HeaderText="用户名">
                <itemstyle width="70px" horizontalalign="Center" />
                </asp:BoundField>
            
              <asp:BoundField DataField="realname"  HeaderText="姓名">
              <itemstyle HorizontalAlign="Center"/>
                </asp:BoundField>
            
              <asp:BoundField DataField="sex"  HeaderText="性别">
                 <itemstyle HorizontalAlign="Center"/>
                </asp:BoundField>
            
              <asp:BoundField DataField="idcard"  HeaderText="身份证">
                </asp:BoundField>
                <asp:BoundField DataField="company"  HeaderText="公司">
                </asp:BoundField>
            
              <asp:TemplateField HeaderText="状态">
               <itemstyle width="50px" horizontalalign="Center" />
                <itemtemplate>
                 <%# Convert.ToInt16(Eval("status"))==1?"<span style='color:green'>正常</span>":"<span style='color:red'>锁定</span>" %>
                </itemtemplate>
              </asp:TemplateField>
             

                <asp:TemplateField HeaderText="管理操作">
                <itemtemplate>
                <a href="javascript:;" onclick='parent.openWin("修改准考证","exam/KS.ZGCardItemModify.aspx?itemId=<%#Eval("ID") %>",true,600,360);return false'>修改</a>
                
                     <asp:LinkButton runat="server" id="delete" commandargument=<%#Eval("ID") %> commandname="del">删除</asp:LinkButton>
                
               </itemtemplate>
                <itemstyle horizontalalign="Center" width="100px" />
                </asp:TemplateField>
            </Columns>
            <HeaderStyle CssClass="CTitle" />
            <EmptyDataRowStyle CssClass="emptycss" />
        </KS:KSGV>
        <br />
        <asp:Panel ID="Panel1" runat="server" Height="30px" Width="739px">
        
        &nbsp;&nbsp;<input type="checkbox" name="chkall" id="chkall" onclick="CheckAll(this.form);"/><label for="chkall">全部选中</label>
           &nbsp; <input type="button" value="批量删除" onmouseover="this.className='button_on';" onmouseout="this.className='button';" class="button" onclick="if (GetIDS('del')){this.form.action='?ItemID=<%=ItemID %>&action=del';this.form.submit()}" />
           
           <input class="button" type="button" value=" 打印准考证 " onclick="window.open('KS.ZGPrintCard.aspx?itemid=<%=ItemID %>');">
           
           <input class="button" type="button" value=" 批量生成 " onclick="location.href='KS.ZGCardCreate.aspx?itemid=<%=ItemID %>';">
           <input class="button" type="button" value=" 添加一张准考证 " onclick='parent.openWin("添加一张准考证","exam/KS.ZGCardItemModify.aspx?action=add&itemId=<%=ItemID %>",true,600,360);'/>
         <asp:Button ID="BtnExportExcel" Text="导出Excel" runat="server" CssClass="button" onclick="BtnExportExcel_Click" />
         </asp:Panel>
        </div>
        
        <KS:Page ID="Page1" runat="server" />
        
          <br />
        <script type="text/javascript">
		showtips('<span class="state"><strong>说明：</strong><br /></span>管理准考证，可以在些添加、修改、删除及打印准考证!');
		</script>
     </asp:Panel>
    
</div>

</asp:Content>