<%@ Page Language="C#" Debug="true"  MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="True" Inherits="Kesion.NET.WebSite.Course.Admin_Course_KS_CsNotice" Codebehind="KS.CsNotice.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" class="menu_top_fixed"> 
       <ul>          
           <li id='p1'><asp:LinkButton ID="addclassbutton" runat="server" OnClick="addclassbutton_Click"><b></b>添加公告</asp:LinkButton></li>      
           <li id='p2'><asp:LinkButton ID="editclassbutton" runat="server" OnClick="editclassbutton_Click"><b></b>编辑公告</asp:LinkButton></li>
           <li id='p3'><asp:LinkButton ID="delclassbutton" runat="server" OnClick="delclassbutton_Click"><b></b>删除公告</asp:LinkButton></li>
           </ul>
        </div>
<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="message">
        </div>
        <div class="message">
         <span style="float:right;padding-right:10px">
           <strong>发布者：</strong>
            <asp:TextBox ID="TextBox2" CssClass="textbox" runat="server"></asp:TextBox>
         <strong>公告标题：</strong>
            <asp:TextBox ID="TextBox1" CssClass="textbox" runat="server"></asp:TextBox>
            <asp:Button ID="Button2" runat="server" Text=" 搜索 " CssClass="button" onclick="Button2_Click" />
        </span>
        
        当前位置：<asp:Label ID="LabNav" runat="server"></asp:Label>
        </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="&lt;input type='checkbox' name='chkall' id='chkall' onClick='CheckAll(this.form);'/&gt;">
                <itemstyle horizontalalign="Center" Height="30px" width="30px" />
                <itemtemplate>
                <input type="checkbox"  name="ids" id="ids" value="<%#Eval("ID") %>" />
                </itemtemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="ID号" DataField="ID" Visible="false">
                <itemstyle horizontalalign="Center" />
            </asp:BoundField>
             
              <asp:TemplateField HeaderText="状态">
                <itemstyle Width="30px" horizontalalign="Center" />
                <itemtemplate>
                  <a href="?action=verify&id=<%#Eval("id")%>" <%# Convert.ToString(Eval("state"))=="0"?"class='no' title='未审核'":"class='ok' title='已审核'" %>></a>
                </itemtemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="发布者">
               <itemstyle verticalalign="Middle"   horizontalalign="Center"/>
                <itemtemplate>
                <%# Utils.CutStr(Convert.ToString(Eval("publisher")), 30)%>
                </itemtemplate>
            </asp:TemplateField>

           <asp:TemplateField HeaderText="公告标题">
            <itemstyle  verticalalign="Middle" horizontalalign="Center" />
                <itemtemplate>
                   <%# Utils.CutStr(Convert.ToString(Eval("title")), 255)%>
                  
                </itemtemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="公告内容">
            <itemstyle  verticalalign="Middle" horizontalalign="Center" />
                <itemtemplate>
                   <%# Utils.CutStr(Convert.ToString(Eval("content")), 255)%>
                  
                </itemtemplate>
            </asp:TemplateField>

              <asp:BoundField HeaderText="添加时间" DataField="adddate">
                <itemstyle verticalalign="Middle"  horizontalalign="Center"/>
            </asp:BoundField>
             
             <asp:TemplateField HeaderText="编辑">
              <itemstyle width="30px" horizontalalign="Center"/>
              <itemtemplate>
                <asp:LinkButton  ToolTip="编辑" CssClass="edit"  runat="server" id="modify" commandargument=<%#Eval("ID") %> commandname="modify">编辑</asp:LinkButton>           
             </itemtemplate>
            </asp:TemplateField>

             <asp:TemplateField HeaderText="删除">
              <itemstyle width="30px" horizontalalign="Center"/>
              <itemtemplate>
               <asp:LinkButton  ToolTip="删除" CssClass="delete"  runat="server" id="delete" commandargument=<%#Eval("ID") %> 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%" align="center" border="0" cellpadding="1" cellspacing="1" class="CTable"> 
      <tr>
     <td class="lefttd" height="30" align="right" ><b>公告标题：</b></td>
      <td class="righttd">
      <asp:TextBox ID="TxtName" CssClass="textbox" runat="server" Width="300px"></asp:TextBox>
      </td>          
     </tr>
   
     <tr>
        <td align="right" class="lefttd" height="30" ><strong>公告内容：</strong></td>
         <td class="righttd">
         <asp:TextBox ID="TxtIntro" TextMode="MultiLine" runat="server" style="width:80%;height:200px;"></asp:TextBox>
                  <%Kesion.APPCode.EditorAPI.EchoHead(); %>
                  <% Kesion.APPCode.EditorAPI.EchoEditor("editor", TxtIntro.ClientID, "Basic", 0, false, true, true, false);%>
        </td>
     </tr>
        
  </table>
      <KS:Foot ID="Foot1" runat="server" OnSubmit="Foot1_Submit" />
       
   
     </asp:Panel>

</asp:Content>
