<%@ page language="C#" autoeventwireup="true" inherits="Admin_IntentionsProjectList, App_Web_qxuvifui" %>



<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>项目列表</title>
    <link href="../CSS/All.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/pager.css" rel="stylesheet" type="text/css" />
    <script src="../JS/xzOper.js" type="text/javascript"></script>
    <script src="../JS/jquery.min.js" type="text/javascript"></script>
    <script src="../JS/jquery.autocomplete.pack.js" type="text/javascript"></script>
    <link href="../CSS/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
    <script src="../JS/Popup.js" type="text/javascript"></script>

    <link href="../CSS/MenuCss.css" rel="stylesheet" type="text/css" />
    <style>
    .popupPanel{
        z-index: 101;
        left: 200px;  width: 500px; 
        position: absolute;
        top: 190px; 
        height: 63px; 
        display:none;
        background-color: whitesmoke; 
        border-right: #5d7b9d 10px solid;
        border-top: #5d7b9d 10px solid; 
        border-left: #5d7b9d 10px solid; 
        border-bottom: #5d7b9d 10px solid;
    }
     .close{
        border-right: medium none;
        border-top: medium none; float: right; border-left: medium none; border-bottom: medium none;
        background-color: darkgray
    }


    </style>
</head>
<body>
    <form id="Myform" runat="server">
        <div class="title" >
            意向项目列表</div>
        <div >
            <asp:Literal ID="litNew" runat="server"></asp:Literal>
            <fieldset>
            <legend>查询</legend>
            <label>
                【项目名：】</label><asp:TextBox ID="txtQuery"  CssClass="ac_input" runat="server" Width="300px"></asp:TextBox>&nbsp;
            <asp:Button ID="btnQuery" runat="server" Text="查询" OnClick="btnQuery_Click" CssClass="btn" />
                <asp:Button ID="btnShowAll" runat="server" Text="全部显示" OnClick="btnShowAll_Click" CssClass="btn" />
                </fieldset>
        </div>    
        <fieldset>
        <legend>内容区域</legend>
        <div  id="view">
        <asp:GridView
            ID="TableView" runat="server" AutoGenerateColumns="False"
             EmptyDataText="没有可显示的数据记录。" Width="100%" BorderStyle="Solid" DataKeyNames="CID" OnRowDataBound="TableView_RowDataBound">
             <Columns>
                 <asp:TemplateField HeaderText="选择"> 
                     <ItemTemplate>
                         <asp:CheckBox ID="CBSelect" runat="server" />
                     </ItemTemplate>
                     <HeaderStyle Height="30px"  Wrap="False"/>
                     <ItemStyle Height="30px"  Wrap="False" />
                 </asp:TemplateField>
                 <asp:TemplateField HeaderText="操作" SortExpression="EID">
                     <ItemTemplate>
                         <asp:Literal ID="litEdit" runat="server"></asp:Literal>
         
                 
                     </ItemTemplate>
                     <HeaderStyle Height="30px"  Wrap="False"/>
                     <ItemStyle Height="30px"  Wrap="False" />
                 </asp:TemplateField>
                  <asp:TemplateField HeaderText="回访提示" SortExpression="EID">
                     <ItemTemplate>
                         <asp:Literal ID="litHF" runat="server"></asp:Literal>
                          <asp:Literal ID="litHFEdit" runat="server"></asp:Literal>
                  
                     </ItemTemplate>
                     <HeaderStyle Height="30px"  Wrap="False"/>
                     <ItemStyle Height="30px"  Wrap="False" />
                 </asp:TemplateField>
               <%--  <asp:TemplateField HeaderText="功能">
                     <ItemTemplate>
                         <a href="javascript:void(0)" onclick="showFunPanel('<%#Eval("CID") %>')">列表</a>
                         <a href="javascript:void(0)" onclick="newFunction('<%#Eval("CID") %>')" >新增</a>
                     </ItemTemplate>
                       <HeaderStyle Height="30px"  Wrap="False"/>
                     <ItemStyle Height="30px"  Wrap="False" />
                 </asp:TemplateField>--%>
                <asp:BoundField DataField="PName" HeaderText="项目名" SortExpression="PName" />
                <asp:BoundField DataField="ICustID" HeaderText="所属客户" SortExpression="ICustID" />
                <asp:BoundField DataField="PClass" HeaderText="项目类型" SortExpression="PClass" />
                <asp:BoundField DataField="budgetAmount" HeaderText="预算金额" SortExpression="budgetAmount" />
                <asp:BoundField DataField="LinkMan" HeaderText="联系人" SortExpression="LinkMan" />
                <asp:BoundField DataField="LinkPost" HeaderText="联系人职务" SortExpression="LinkPost" />
                <asp:BoundField DataField="Others" HeaderText="其他联系人" SortExpression="Others" />
                <asp:BoundField DataField="SalesLeads" HeaderText="销售机会" SortExpression="SalesLeads" />
                </Columns>
                  <FooterStyle CssClass="GridViewFooterStyle" />
                 <RowStyle CssClass="GridViewRowStyle" />   
                 <SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
                 <PagerStyle CssClass="GridViewPagerStyle" />
                 <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                 <HeaderStyle CssClass="GridViewHeaderStyle" />
        </asp:GridView>
        </div>
        <div style="border-top:ridge 1px #F6F6F6; margin-top:10px" >
        
            <input id="Button12" class="btn" onclick="Opposite('view')" type="button" value="反选" />
            <asp:Button ID="btnPTestAll" runat="server" CssClass="btn" OnClick="btnPTestAll_Click"
                OnClientClick="if(confirm('确定删除所有选中吗？')){return isSelect('view')}else{return false;}"
                Text="删除选中" />&nbsp;
      
        </div>  
      </fieldset>
    <webdiyer:aspnetpager id="PagerButtom" runat="server" alwaysshow="True" cssclass="paginator"
                currentpagebuttonclass="cpb" custominfohtml="当前第%CurrentPageIndex%/%PageCount%页 共%RecordCount%条记录 每页%PageSize%条 "
                firstpagetext="首页" lastpagetext="尾页" layouttype="Table" nextpagetext="下一页" numericbuttoncount="5"
                onpagechanged="Pager_PageChanged" pagesize="25" prevpagetext="上一页" showcustominfosection="Left"
                showpageindexbox="Always">
   </webdiyer:aspnetpager>
      
    </form>
</body>
<script>
$(function(){

function findValue(li)
{ 
    if (li == null) return alert("No match!");
    if (!!li.extra)
    var sValue =unescape(li.extra[0]);
     
}
function selectItem(li)
{
    findValue(li);
}
    

    $("#txtQuery").autocomplete("autocomplete/IntentionProjectName.ashx",
      {
        delay: 500,
        max: 15,
        minChars: 2,
        matchSubset: 1,
        cacheLength: 1,
        onItemSelect: selectItem,
        onFindValue: findValue,
        autoFill: true,
        maxItemsToShow: 20
    });

 });
function locationUrl(url,cid){
    location.href=url+'?cid='+cid+'&where=<%=Server.UrlEncode(ViewState["PName"].ToString()) %>&pageindex=<%= PagerButtom.CurrentPageIndex %>';
 }

 </script>
</html>