<%@ page language="C#" masterpagefile="~/MasterPage/UserMasterPage.master" autoeventwireup="true" inherits="Rest_Gift_GiftManage, DoodiiShop" title="Untitled Page" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="divDemo" runat="server" style="color: red; font-size: 24px; margin: 0px;
        padding: 0px;">
        <strong>如果您需要申请试用或购买本模块请<a href='http://www.doulaiding.com/buy/' target="_blank">联系我们</a>！</strong><br />
    </div>
    <div id="divContent" runat="server">
        <div style="background-color: #f4f4f4; float: left; padding: 5px; width: 640px; margin-bottom: 2px;">
            餐馆搜索：<input id="txtRestName" type="text" onkeydown="txtRestName_onkeydown(event)"
                title="可以输入餐馆名称首拼或全拼。按 回车 搜索。" />
            <input id="btnSearch" type="button" value="搜索" onclick="GetList(1)" />&nbsp;&nbsp;可以输入餐馆名称首拼或全拼。按
            回车 搜索。
        </div>
        <input type="text" style="display: none;" />
        <div id="divList">
        </div>

        <script type="text/javascript">
//回车搜索
function txtRestName_onkeydown(evt)
{
    if(evt.keyCode==13) {     
      GetList(1);
    }    
}

function Loading()
{
    var divList = document.getElementById("divList");
    divList.innerHTML = "<img src='/images/System/loading.gif' alt='正在载入...'/>";
}
function GetList(pageNo)
{
    Loading();
   if (pageNo==null)
        pageNo = 1;
   var divList = document.getElementById("divList");   
   var restName = trimString(document.getElementById("txtRestName").value);   
   var url = "/Rest/Gift/GiftManageTemplate.aspx?";
   url += "&pageno="+pageNo;
   if (restName.length>0)
        url += "&restName="+encodeURIComponent(restName);    
   var html = $.ajax({ url: url, async: false,ifModified:true}).responseText
   document.getElementById("divList").innerHTML = html;     
}
function PageChange(obj,pageNo)
{
     GetList(pageNo);
}
function LoadPage()
{
    GetList(1);
}
LoadPage();
        </script>

    </div>
</asp:Content>
