<%@ Page Title="" Language="C#" MasterPageFile="~/helpdesk/Dashboard.master" AutoEventWireup="true" CodeBehind="Dashboard_myfav.aspx.cs" Inherits="helpdesk.helpdesk.Dashboard_myfav" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1"  UpdateMode="Conditional" runat="server">
        <ContentTemplate>

       

    <asp:ListView ID="lv_lists" runat="server"  DataSourceid="sds"
     ItemContainerID="layoutTableTemplate"  
      DataKeyNames="id"  
               
 >
 
 
    <LayoutTemplate>
    <table  class="table table-hover">
	
   <tr  >
     	<th  width="60px" >收藏ID</th> 
        
		<th   >主题</th>
        <th  width="100px"  >提交人</th>
		 
        <th  width="180px" >收藏时间</th> 
		<th    width="10px">
	    	删除收藏
		</th>
	</tr>
        
        
     <asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder> 
        </table>
 
        
 
    </LayoutTemplate>

        
    
    <ItemTemplate>
    
 <tr   >

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

  

<td  align="left"   >
 
 <a href='ticket_view.aspx?id=<%#Eval("tid")%>' target="_blank"  ><%#Eval("favtitle")%></a> 
</td>


 <td>
<%#Eval("subname")%> 
</td> 


 
 

<td class="f11">
 <%#Helpdesk.BLL.HelpdeskHelper.FormatDate(Eval("fcreatedate"))%> 
 
</td>
 
  
 
 
 
 <td  align="center" >
     <asp:Button runat="server" ID="btnDel"  CommandName="delete" CssClass="btn btn-danger btn-flat btn-xs" Text="删除收藏"/>
 </td>     
		  
 
</tr>  
  </ItemTemplate>

</asp:ListView>     

 

   
<div  >
    <asp:DataPager ID="Pager1"   class="btn-group btn-group-sm"  
       PagedControlID="lv_lists" runat="server" PageSize="20">
 <Fields>
           
     
            <asp:NextPreviousPagerField 
                PreviousPageText="<" 
                FirstPageText="|<" 
                ShowPreviousPageButton="true"
                ShowFirstPageButton="true" 
                ShowNextPageButton="false" 
                ShowLastPageButton="false"
                ButtonCssClass="btn btn-default" 
                RenderNonBreakingSpacesBetweenControls="false" 
                RenderDisabledButtonsAsLabels="false" />

            <asp:NumericPagerField 
                ButtonType="Link" 
                CurrentPageLabelCssClass="btn btn-primary disabled"  
                RenderNonBreakingSpacesBetweenControls="false"
                NumericButtonCssClass="btn btn-default" 
                ButtonCount="10" 
                NextPageText="..." 
                NextPreviousButtonCssClass="btn btn-default" />
            
           <asp:NextPreviousPagerField 
               NextPageText=">" 
               LastPageText=">|" 
               ShowNextPageButton="true"
               ShowLastPageButton="true" 
               ShowPreviousPageButton="false" 
               ShowFirstPageButton="false"
               ButtonCssClass="btn btn-default" 
               RenderNonBreakingSpacesBetweenControls="false" 
               RenderDisabledButtonsAsLabels="false"/>
      

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

 
  <asp:SqlDataSource runat="server" ID="sds"
   SelectCommand="select * from helpdesk_favourite where   uid=@uid order by  id desc" 
   DeleteCommand=" delete from helpdesk_favourite where id=@id"
   ConnectionString='<%$ConnectionStrings:connectionstring %>' OnSelecting="sds_Selecting">

      <SelectParameters>
          <asp:Parameter Name="uid" DefaultValue="0" />
      </SelectParameters>

  </asp:SqlDataSource>
  
	
             </ContentTemplate>

    </asp:UpdatePanel>
    
     
</asp:Content>
