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


    
    
    <script src="../javascript/taborder/jquery.tablednd.js"></script>
 
    <style>
        .tDnD_whileDrag {
         background-color:#f8ee8c;  color:red;
        }
    </style>


    <div style="margin:4px;  text-align:center; background-color:#f5f5f5; padding:5px; font-size:12px;">
    
   
             &nbsp;&nbsp;    
        
          <a id="btnSave"  href="javascript:void(0);" class="btn btn-sm btn-primary"  onclick="save_order('uidCss');"
               >保存顺序</a> <br />
         (鼠标按住行上下移动行，然后点击保存)   


     
     
    </div>




     
 
     
      


  
 <div class="thelist"   id="thetable">

    
  
    <asp:ListView ID="ListView1" runat="server" DataKeyNames="id"    >
            

           <LayoutTemplate>
              
                <table id="tbl_userlists"   class="table  " >
                           
                       
                    <tr id="itemPlaceholder" runat="server">
                        </tr>
            
                           
             </table>
                     
            
         </LayoutTemplate>


         <ItemTemplate>
             <tr>
         
               <td>
                   <asp:Label runat="server" ID="lbl_uid" style="display:none" CssClass="uidCss" Text=<%# Eval("id") %>></asp:Label>
             </td>


                   <td>
 <%#Eval("catname") %> 
                 
                 </td>
       
              
               
           </tr>
         </ItemTemplate>
      
          
     </asp:ListView>
   

    
  </div>
  
    
     
     
  
  
  
  
  
  
  
  
  

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


















    

         <script>

             
             $("#tbl_userlists").tableDnD();

             

             function save_order(tabcss) {
                

                 var uids = '-1';
              
                 $("." + tabcss).each(
                    function () {
                        uids += ',' + $(this).html();
                   });
                
                   $.ajax({
                       url: "Ajax/Orders.aspx",
                       async:false,
                       cache: false, 
                       data: { "cmd": "Order", "uids": uids },
                       success: function (msg) {
                              layer.alert('操作成功', 12);  
                       }

                   });

                  
            

             }


            

         </script>



     







    <script src="../javascript/last.js"></script>






</asp:Content>
