<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeBehind="KS.TcProfessionCertificate.aspx.cs" Inherits="Kesion.NET.WebSite.Course.Admin.Course.KS_TcProfessionCertificate" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.BLL" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="Kesion.Course" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" runat="server">
   <script>
       $(function () {
           top.initialPrettyPhoto();
       });
       function SetDate() {
           var today = new Date();
           if ($("#showdate").is(":hidden")) {
               $("#showdate").show();
               $('#<%=TxtBeginDate.ClientID%>').val(today.getFullYear() + '-' + (today.getMonth() + 1) + '-01');
               $('#<%=TxtEndDate.ClientID%>').val(today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate());
           }
           else {
               $("#showdate").hide();
               $('#<%=TxtBeginDate.ClientID%>').val('');
 		    $('#<%=TxtEndDate.ClientID%>').val('');
           }
       }
       function keyWordFocus() {
           if (jQuery("#<%=this.KeyWord.ClientID %>").val() == '请输入关键字！') {
             jQuery("#<%=this.KeyWord.ClientID %>").val('');
         }
     }
     function keyWordBlur() {
         if (jQuery("#<%=this.KeyWord.ClientID %>").val() == '') {
          jQuery("#<%=this.KeyWord.ClientID %>").val('请输入关键字！');
      }
  }
  function show() {
      var key = jQuery("#<%=this.RbVerify.ClientID%> :radio[checked]").val();
           if (key == 2) {
               $("#pingtai").show();

           } else {
               $("#pingtai").hide();

           }
       }
       $(document).ready(function () {
           show();


       });
   </script>
    <div class="listedit">
        <ul>
            <%if(tcid!=0){ %>
            <a href="KS.CsTeacher.aspx" class="button">返回名师</a>
            <%} %>
            <asp:LinkButton ID="delclassbutton" runat="server" OnClientClick="return(GetIDS('del'));" OnClick="delclassbutton_Click" CssClass="button">删除</asp:LinkButton>       
        </ul>
    </div> 
    <%if(tcid!=0){ %>
    <div class="courseInfoTop teacherInfoTop">
        <asp:PlaceHolder ID="PlaceHolder1"  runat="server"></asp:PlaceHolder> 
    </div>
    <div class="clear blank20"></div>
    <div class="content-area">   
        <div class="myTitle">
            <div class="tabButton">
                <a href="KS.TcCourse.aspx?teacherid=<%=tcid %>&from=<%=from %>">课程</a>
                <a href="KS.TcZan.aspx?teacherid=<%=tcid %>&from=<%=from %>">点赞</a>
                <a href="KS.TcCollect.aspx?teacherid=<%=tcid %>&from=<%=from %>">收藏</a>
                <a href="KS.TcMessage.aspx?teacherid=<%=tcid %>&from=<%=from %>">留言</a>
                <a href="KS.TcAchieve.aspx?teacherid=<%=tcid %>&from=<%=from %>">评价</a>
                <a href="KS.TcDegreeCertificate.aspx?teacherid=<%=tcid%>&from=<%=from %>">学历证书</a>
                <a href="KS.TcProfessionCertificate.aspx?teacherid=<%=tcid%>&from=<%=from %>" class="on">职业资格证书</a>
            </div>
            名师学历证书
        </div>
        <div class="quickSearch clearfix">
            <div class="quickSelect">
                <asp:DropDownList ID="Condition" runat="server" style="margin-right:8px;">
                    <asp:ListItem Value="1">标题</asp:ListItem>
                    <asp:ListItem Value="2">教师名</asp:ListItem>
                </asp:DropDownList>
                <asp:TextBox onfocus="keyWordFocus();" onblur="keyWordBlur();" Style="color: #ccc" Text="请输入关键字！" CssClass="textbox" ID="KeyWord" runat="server" Width="180px"></asp:TextBox>
                <span class="link-color" onclick="SetDate()" style="cursor: pointer">日期范围？</span>
                <span id="showdate" <%if (this.TxtBeginDate.Text == "")
                                      { %> style="display: none" <%} %>>
                    <asp:TextBox ID="TxtBeginDate" placeholder="格式：YYYY-MM-DD" Width="150px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox>至
                   <asp:TextBox ID="TxtEndDate" placeholder="格式：YYYY-MM-DD" Width="150px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox>
                </span>
                <asp:Button ID="Button1" runat="server" Text="搜索"  CssClass="button"  onclick="Button1_Click" />
            </div>
            <div class="property">
                <div class="name button">筛选</div>
                <div class="propertyBox">
                	<ul class="clearfix">
                        <span class="screen fl">审核状态：</span>
                        <li <%=KSCMS.S("Type")==""?" class='active'":string.Empty %>><a href="KS.TcProfessionCertificate.Aspx?teacherid=<%=tcid%>"><span>所有列表</span></a></li>
                        <li <%=KSCMS.S("Type")=="1"?" class='active'":string.Empty %>><a href="KS.TcProfessionCertificate.Aspx?Type=1&teacherid=<%=tcid%>"><span>未审核</span></a></li>
                        <li <%=KSCMS.S("Type")=="2"?" class='active'":string.Empty %>><a href="KS.TcProfessionCertificate.Aspx?Type=2&teacherid=<%=tcid%>"><span>已审核</span></a></li>
                        <li <%=KSCMS.S("Type")=="3"?" class='active'":string.Empty %>><a href="KS.TcProfessionCertificate.Aspx?Type=3&teacherid=<%=tcid%>"><span>审核不通过</span></a></li>
                    </ul>
                </div>
            </div>
        </div>
    	<%} %>
        <asp:Panel ID="ListPanel" runat="server" Width="100%"> 
        <!--<div class="tabs_header">
            <ul class="tabs">
                
            </ul>
        </div>-->
      <KS:ksgv id="List" runat="server" AutoGenerateColumns="False" EmptyDataText="没有名师的职业资格证书!" PagerType="CustomNumeric" Width="99%"  CssClass="CTable" GridLines="None" OnRowDataBound="List_RowDataBound"  >
        <Columns>
            <asp:TemplateField HeaderText="&lt;input type='checkbox' name='chkall' id='chkall' onClick='CheckAll(this.form);'/&gt;">
                <itemstyle horizontalalign="Center" width="30px" />
                <itemtemplate>
                <input type="checkbox"  name="ids" id="ids" value="<%#Eval("ID") %>" />
                </itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="状态">
                <ItemStyle Width="50px" HorizontalAlign="Center" />
                <ItemTemplate>
                      <%# Utils.StrToInt(Eval("verify"))==1?"已审核":Utils.StrToInt(Eval("verify"))==2?"审核不通过":"<font color='red'>未审核</font>"%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="用户">
                <itemstyle width="200" HorizontalAlign="Center" />
                <itemtemplate>
                <%#GetUserName(Utils.StrToInt(Eval("userid").ToString ())) %>
                </itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="教师名称">
                <itemstyle  horizontalalign="Center" width="200px" />
                <itemtemplate> 
                <%# gettname(Utils.StrToInt(Eval("tcid"))) %>
                </itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="证书图片">
                <itemstyle  horizontalalign="Center" width="200px" />
                <itemtemplate> 
                <a href="<%#Eval("PhotoUrl")%>"  rel='prettyPhoto'>
                <img src='<%# Eval("PhotoUrl")%>' style="border: 1px solid #f1f1f1; padding: 1px" align="left" width="45" height="45" onerror="this.src='/sysimg/nopic.gif';$(this).parent().attr('rel','');$(this).parent().attr('href','javascript:;');" align="absmiddle" /></a>
                </itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="职业资格证书编号">
                <itemstyle  horizontalalign="Center" width="200px" />
                <itemtemplate> 
                <%#Eval("CertificateNumber") %>
                </itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="身份证">
                <itemstyle  horizontalalign="Center" width="200px" />
                <itemtemplate> 
                <%# Eval("IdCard") %>
                </itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="提交日期">
                <itemstyle  horizontalalign="Center" width="200px" />
                <itemtemplate> 
                <%# Eval("adddate") %>
                </itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="审核日期">
                <itemstyle  horizontalalign="Center" width="200px" />
                <itemtemplate> 
                    <%# Utils.StrToInt(Eval("verify"))==0?"未审":Eval("VerifyTime")%>
                </itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="操作">
                <itemstyle horizontalalign="Center" Width="100"/>
                <itemtemplate>
                     <a href="KS.TcProfessionCertificate.aspx?action=modify&id=<%# Eval("ID") %>&teacherid=<%#tcid%>" >编辑</a>
                    <a href="KS.TcProfessionCertificate.aspx?action=del&id=<%# Eval("ID") %>&teacherid=<%#tcid%>"  onclick="return(confirm('您确定要删除该学历证书吗?'));List_RowCommand">删除</a>
                </itemtemplate>
            </asp:TemplateField>
        </Columns>
        <HeaderStyle CssClass="CTitle" />
        <EmptyDataRowStyle CssClass="emptycss" />
    </KS:ksgv>  
    <KS:Page ID="Page1" runat="server" /> 
   	<asp:Panel ID="Panel1" runat="server" Height="30px" Width="100%">
    <script type="text/javascript">
        showtips('<span class="state"><strong>操作说明：</strong><br /></span>这里的日期查询是指提交日期。<br /> ');
   	</script>

   </asp:Panel>           
</asp:Panel>
<asp:Panel runat="server" ID="showPannel" Visible="false">
    <KS:TopNav ID="top1" Text="查看职业资格证书详情"  runat ="server" />
		 <table width="99%" border="0" cellpadding="1" cellspacing="1" class="CTable"> 
		  
             <tr>
                 <td align="right" class="lefttd" style="width: 109px; height: 30px"><strong>职业资格证书名称：</strong></td>
                 <td class="righttd" style="height: 30px;">
				 <%=dr["Title"].ToString() %>
				
                 </td>
             </tr>
                <tr>
                 <td align="right" class="lefttd" style="width: 109px; height: 30px"><strong>职业资格证书编号：</strong></td>
                 <td class="righttd" style="height: 30px;">
				 <%=dr["CertificateNumber"].ToString() %>
				
                 </td>
             </tr>
                <tr>
                 <td align="right" class="lefttd" style="width: 109px; height: 30px"><strong>身份证：</strong></td>
                 <td class="righttd" style="height: 30px;">
				 <%=dr["IdCard"].ToString() %>
				
                 </td>
             </tr>
             <tr>
                 <td align="right" class="lefttd" style="width: 109px; height: 30px"><strong>提交时间：</strong></td>
                 <td class="righttd" style="height: 30px;">
                     <%=dr["adddate"].ToString() %>
                 </td>
             </tr>
		    <tr>
                 <td align="right" class="lefttd" style="width: 109px; height: 30px"><strong>用户名：</strong></td>
                 <td class="righttd" style="height: 30px;">
                     <%=GetUserName(Utils.StrToInt(dr["userid"].ToString ())) %>
                 </td>
             </tr>

            <tr>
                 <td align="right" class="lefttd" style="width: 109px; height: 30px"><strong>教师名称：</strong></td>
                 <td class="righttd" style="height: 30px;">
                     <%=gettname(Utils.StrToInt(dr["tcid"].ToString()))%>
                 </td>
             </tr>
		
            
       
		    <tr>
                <td align="right" class="lefttd" style="width: 109px; height: 30px"><strong>状态:</strong></td>
				 
                 <td class="righttd"  style="height: 30px;">
                     <asp:RadioButtonList ID="RbVerify" runat="server" onclick="show()" RepeatDirection="Horizontal">
                         <asp:ListItem Value="0">未审核</asp:ListItem>
                         <asp:ListItem Value="1">已审核</asp:ListItem>
                         <asp:ListItem Value="2">审核不通过</asp:ListItem>
                     </asp:RadioButtonList>
                 </td>
             </tr>
    
             
                <tr id="pingtai" style="display:none">
                    <td align="right" class="lefttd" height="30"><strong>备注：</strong></td>
                    <td class="righttd">
                        <asp:TextBox ID="TxtRemark" TextMode="MultiLine" Width="100%" Height="200px" runat="server"></asp:TextBox>

                        <% Kesion.APPCode.EditorAPI.EchoEditor("editor", this.TxtRemark.ClientID, "Basic");%>

                    </td>
                </tr>


		 </table>

         <div style="margin-top:20px;text-align:center">
    <KS:Foot ID="Foot1" runat="server" OnSubmit="Foot1_Submit" />
		  
		  </div>
		</asp:Panel>
 </div>
</asp:Content>
