using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.IO;
using TopWinCMS.BLL;
using TopWinCMS.Common;
namespace TopWinCMS.WebUI.Admin.Window
{
    public partial class GetTag : System.Web.UI.Page
    {  
        SQLModel s_model = new SQLModel();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindList();
            }
        }

        public void BindList()
        {
            GV_List.EmptyDataTemplate = TopWinCMS.WebFactory.PageBase.GetTemplate(this);

            s_model.WHERE = " ModelID="+Request["ModelID"];

            if (TB_KeyWord.Text.Length > 0)
            {
                s_model.WHERE += string.Format(" and TagName like '%{0}%'", MyString.SQL_ESC(TB_KeyWord.Text));
            }
            s_model.PageSize = 10;

            new TopWinCMS.BLL.TagsManage().BindList(GV_List, PageNavigation1, s_model);
        }

        
        protected void PageNavigation1_PageChanging(object src, TopWinCMS.WebControls.PageChangingEventArgs e)
        {
            s_model.PageNo = e.NewPageIndex;
            BindList();
        }

        protected void BT_Search_Click(object sender, EventArgs e)
        {
            BindList();

        }

        

  
    }
}