<%@ Page Language="C#" Debug="true" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="True" Inherits="Kesion.NET.WebSite.Course.Admin_Course_KS_CsUserBj" Codebehind="KS.CsUserBj.aspx.cs" %>

<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Course" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
 <script>
     function look(id,type) {
         parent.openWin("学员笔记", "Course/KS.CsUserBj.aspx?Action=look&type="+type+"&id=" + id, true, 900, 450);
     }
     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('请输入关键字！');
            }
        }
  </script>
<asp:Panel ID="ListPanel" runat="server" Width="100%">
<style>
.categorynav{line-height:25px;width:97%;margin:0 auto;margin-bottom:10px;border:1px solid #DEEFFA;background-color:#F7FBFE;padding:5px 0px 5px 10px; height:100%; overflow:hidden;}
ul,li{padding:0px;margin:0px}
.categorynav li{width:160px;float:left;}
</style>  
     <div class="listedit"> 
       <ul>
           <label><input type="checkbox" name="chkall" id="chkall" onclick="CheckAll(this.form);"/>全选</label>
           <asp:LinkButton ID="delclassbutton" runat="server" OnClientClick="return(GetIDS('del'));" OnClick="delclassbutton_Click" CssClass="button">删除笔记</asp:LinkButton>         
       </ul>
     </div>
    
 <div class="content-area mt20">                 
        <div class="tabs_header">
            <ul class="tabs">
                <li <%=KSCMS.S("Type")==""?" class='active'":string.Empty %>><a href="KS.CsUserBj.Aspx"><span>点播课程笔记</span></a></li>
                <li <%=KSCMS.S("Type")=="1"?" class='active'":string.Empty %>><a href="KS.CsUserBj.Aspx?Type=1"><span>直播课程笔记</span></a></li>
            </ul>
        </div>
        <!--<div class="myTitle">
        学员笔记<asp:Label ID="LabNav" runat="server"></asp:Label>
        </div>-->
        <div class="quickSearch clearfix">
            <div class="SearchBox fl">
                <asp:DropDownList ID="Condition" runat="server" style="margin-right:8px;">
                    <asp:ListItem Value="1">创建者</asp:ListItem>
                    <asp:ListItem Value="2">课程名称</asp:ListItem>
                    <asp:ListItem Value="3">课时名称</asp:ListItem>
                	<%--<asp:ListItem Value="4">笔记标题</asp:ListItem>--%>
                    <asp:ListItem Value="5">笔记内容</asp:ListItem>
                </asp:DropDownList>
                <asp:TextBox onfocus="keyWordFocus();" onblur="keyWordBlur();" Style="color: #ccc" Text="请输入关键字！" CssClass="textbox" ID="KeyWord" runat="server" Width="180px"></asp:TextBox>
                <b onclick="SetDate()" class="link-color">日期范围？</b>
                <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="Button2" runat="server" Text="开始搜索" CssClass="button" onclick="Button2_Click" />
            </div>
        </div>
    
      <KS:ksgv id="list" runat="server" AutoGenerateColumns="False"  EmptyDataText="学员没有添加任何笔记!" PagerType="CustomNumeric" Width="99%" 
           CssClass="CTable" GridLines="None" OnRowCommand="List_RowCommand" 
            OnRowCreated="List_RowCreated" onrowdatabound="list_RowDataBound" >
        <Columns>
            <asp:TemplateField HeaderText="选择">
                <itemstyle horizontalalign="Center" Height="30px" width="30px" />
                <itemtemplate>
                <input type="checkbox"  name="ids" id="ids" value="<%#Eval("BJID") %>" />
                </itemtemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="ID号" DataField="BJID" Visible="false">
                <itemstyle horizontalalign="Center" />
            </asp:BoundField>
             
            <asp:TemplateField HeaderText="创建者">
               <itemstyle Width="40px" HorizontalAlign="Center"/>
                <itemtemplate>
                <%# Utils.CutStr(Convert.ToString(Eval("username")),30) %>
                </itemtemplate>
            </asp:TemplateField>

              <asp:TemplateField HeaderText="课程名称">
               <itemstyle HorizontalAlign="Center"/>
                <itemtemplate>
                <a href="<%#Eval("type").ToString()=="0"?Kesion.HtmlTags.BasicField.GetRewriteUrl("courseview", Utils.StrToInt(Eval("courseid").ToString())):Kesion.HtmlTags.BasicField.GetRewriteUrl("liveview", Utils.StrToInt(Eval("courseid").ToString()))%>" target="_blank"> <%# Utils.CutStr(Convert.ToString(Eval("name")),30) %></a>
                </itemtemplate>
            </asp:TemplateField>

             <asp:TemplateField HeaderText="课时名称">
               <itemstyle HorizontalAlign="Center"/>
                <itemtemplate>
                 <%# Utils.CutStr(Convert.ToString(Eval("PeriodName")), 30)%>
                </itemtemplate>
            </asp:TemplateField>
          
         

            <asp:TemplateField HeaderText="笔记内容" >
            <itemstyle  HorizontalAlign="Center" Width="390px"/>
                <itemtemplate>
                   <%# Utils.CutStr(Convert.ToString(Eval("bjcontent")), 50)%>
                  
                </itemtemplate>
            </asp:TemplateField>

              <asp:BoundField HeaderText="添加时间" DataField="adddate">
                <itemstyle verticalalign="Middle"  horizontalalign="Center"/>
            </asp:BoundField>
             
              <asp:TemplateField HeaderText="是否分享">
              <itemstyle width="70px" horizontalalign="Center"/>
              <itemtemplate>
                 <%#Eval("share").ToString()=="1"?"已分享":"仅自己可见" %>
             </itemtemplate>
            </asp:TemplateField>


             <asp:TemplateField HeaderText="查看">
              <itemstyle width="20px" horizontalalign="Center"/>
              <itemtemplate>
                   <a onclick="look('<%# Eval("BJID")%>','<%# Eval("type") %>')"  ><span class="plicon"></span></a>
             
             </itemtemplate>
            </asp:TemplateField>

             <asp:TemplateField HeaderText="删除">
              <itemstyle width="20px" horizontalalign="Center"/>
              <itemtemplate>
               <asp:LinkButton  ToolTip="删除" CssClass="delete"  runat="server" id="delete" commandargument=<%#Eval("BJID") %> commandname="del">删除</asp:LinkButton>
              </itemtemplate>
            </asp:TemplateField>
        </Columns>
        <HeaderStyle CssClass="CTitle" />
        <EmptyDataRowStyle CssClass="emptycss" />
    </KS:ksgv>    
    <KS:Page ID="Page1" runat="server" />

    </asp:Panel>

<asp:Panel ID="AddPanel" runat="server" Width="100%">  
   <KS:TopNav ID="TopNav1" runat="server" Text="查看笔记" />
		
     <table width="100%" border="0" cellpadding="0" cellspacing="0" class="CTable no-borderTable"> 
     
      <tr>
        <td align="right" class="lefttd" height="30" ><strong>是否分享：</strong></td>
         <td class="righttd">
        
             <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
        </td>
     </tr>
     <tr>
        <td align="right" class="lefttd" height="30" ><strong>填写时间：</strong></td>
         <td class="righttd">
        
             <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
        </td>
     </tr>
  <tr>
        <td align="right" class="lefttd" height="30" ><strong>添加者：</strong></td>
         <td class="righttd">
        
             <asp:Label ID="Label3" runat="server" Text="Label"></asp:Label>
        </td>
     </tr>
     <tr>
        <td align="right" class="lefttd" height="30" ><strong>笔记内容：</strong></td>
         <td class="righttd">
         <asp:TextBox ID="TxtIntro"  TextMode="MultiLine" Width="600px" Height="100px" runat="server"></asp:TextBox>
      
        </td>
     </tr>
        
  </table>
      <KS:Foot ID="Foot1" runat="server" OnSubmit="Foot1_Submit" />
       
   
     </asp:Panel>
  </div>
</asp:Content>