<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master" AutoEventWireup="true" CodeBehind="course_my.aspx.cs" Inherits="Math.admin.course_my" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


    

    


    <!-- add check item -->
    

      
                             <div class="layui-form-item">
                                   <div class="layui-inline">
                                 <label class="layui-form-label req">课程名称</label>
                                 <div class="layui-input-inline">
                                     <asp:TextBox class="layui-input" 
                                          ValidationGroup="add"  
                                          
                                         ID="txt_catname"   runat="server"></asp:TextBox>
                                     <asp:RequiredFieldValidator 
                                         ForeColor="Red"
                                        ValidationGroup="add" ID="RequiredFieldValidator1" runat="server" ErrorMessage="必须填写名称" ControlToValidate="txt_catname" Display="Dynamic"></asp:RequiredFieldValidator>

                                  </div>
                                 </div>
                              
                                  
                             

                         <div class="layui-inline"  >
    
                             <div class="layui-input-inline">
                                     <asp:Button runat="server"  class="layui-btn" ID="btn_save" ValidationGroup="add"  Text="添加" OnClick="btn_save_Click"/>
                                    
                                 </div>
                  </div>

        </div>
                     

  
     <!-- /add check item -->






    
 

   
 

               <asp:ListView runat="server" 
                         ID="lv_lists" 
                          DataKeyNames="id" 
                          OnItemEditing="lv_lists_ItemEditing"
                          OnPagePropertiesChanging="lv_lists_PagePropertiesChanging1" OnItemCanceling="lv_lists_ItemCanceling" OnItemUpdating="lv_lists_ItemUpdating" OnItemDeleting="lv_lists_ItemDeleting">

                           <LayoutTemplate>
                            
                                         <table    class="layui-table"  >
                                              <thead>
                                              <tr>
                                                
                                                <th width="80px">ID</th>  
                                                 <th width="500px">课程名称</th> 
                                                  
                                                  <td width="120"> 查看课程题目</td> 
                                                 <th width="150">操作</th>
                                             </tr>
                                                  </thead>
                                            
                                             
                                              <tbody>  
                                                 <tr id="itemPlaceholder" runat="server">
                                                 </tr>
                                            </tbody>
                                         </table>
                                     
                                         
                                   
                         </LayoutTemplate>
                       


                          <ItemTemplate>
                             <tr  > 
                                 
                                <td>
                                      <%#Eval("id") %>
                                </td>

                              

                                   <td>

                                <%#Eval("coursename") %>

                                 </td>

                                

    <td>
            <a  class=" layui-btn layui-btn-sm layui-btn-normal" 
                href="course_my_ques_list.aspx?cid=<%#Eval("id") %>" 
                       >查看课程题目</a>
    </td>


                                 <td>
                                      

                                     
                                 




                                     <asp:Button runat="server" ID="btn_edit"
                                          class="layui-btn  layui-btn-sm" 
                                          Text="编辑"
                                          CommandName="edit"
                                          />


                                         <asp:Button runat="server" ID="DeleteButton" 
                                             
                                              OnClientClick="return confirm('确定删除吗？')"
                                              CommandName="Delete"
                                        class="layui-btn layui-btn-danger layui-btn-sm"
                                      Text="删除"  ></asp:Button>



                                          </div>
                                      
                                     
                                 </td>
                             </tr>
                         </ItemTemplate>
                        
                         
                         <EditItemTemplate>
                             <tr style="">
                                
                                <td> </td>
                                   
                                 <td> 
                                     <asp:TextBox ID="txt_coursename" CssClass="layui-input  " runat="server" Text='<%# Bind("coursename") %>' />
                                 </td>

 
                                 <td></td>
 
                               
                                 <td>
                                     <asp:LinkButton ID="UpdateButton" 
                                          class="layui-btn layui-btn-xs layui-btn-normal"

                                         runat="server" CommandName="Update" Text="更新" />
 

                                     <asp:LinkButton 
                                         
                                           class="layui-btn layui-btn-xs layui-btn-warm"
                                         ID="CancelButton" runat="server" CommandName="Cancel" Text="取消" />
                                 </td>
                             </tr>
                         </EditItemTemplate>
                         
                         


                     </asp:ListView>
                      


    
     
    

 <div  class="paging"  >

 <asp:DataPager ID="DataPager1" 
      class="layui-box layui-laypage layui-laypage-default"  
       
     PagedControlID="lv_lists" runat="server" PageSize=10>
 <Fields>
            
        <asp:NextPreviousPagerField 
                PreviousPageText="上一页" 
                FirstPageText="|<" 
                ShowPreviousPageButton="true"
                ShowFirstPageButton="false" 
                ShowNextPageButton="false" 
                ShowLastPageButton="false"
                ButtonCssClass="btn btn-default" 
                RenderNonBreakingSpacesBetweenControls="false" 
                RenderDisabledButtonsAsLabels="false" />


           <asp:NumericPagerField  
                ButtonType="Link" 
                CurrentPageLabelCssClass="currentpage"  
                RenderNonBreakingSpacesBetweenControls="false" 
              
                ButtonCount="10" 
                NextPageText="..." 
               />

     

     <asp:NextPreviousPagerField  
               NextPageText="下一页" 
               LastPageText=">|" 
               ShowNextPageButton="true"
               ShowLastPageButton="false" 
               ShowPreviousPageButton="false" 
               ShowFirstPageButton="false"
              
               RenderNonBreakingSpacesBetweenControls="false" 
               RenderDisabledButtonsAsLabels="false"/>
      

  </Fields> 
</asp:DataPager>
</div>

  
     
 
 
    <input type="hidden" name="hf_ids" id="hf_ids" />





</asp:Content>
 