Пример #1
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (!String.IsNullOrEmpty(txtkey.Text) && !String.IsNullOrEmpty(txtnum.Text))
     {
         SearchModel s = new SearchModel();
         s.keyword = txtkey.Text;
         s.num     = BasePage.GetRequestId(txtnum.Text);
         s.px      = BasePage.GetRequestId(txtpx.Text);
         s.id      = id;
         bool b = new SearchBll().Update(s);
         if (b)
         {
             BasePage.JscriptPrint(Page, "修改成功!", "searchkey.aspx");
         }
     }
 }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ac = Request.QueryString["ac"];
     id = BasePage.GetRequestId(Request.QueryString["id"]);
     if (!Page.IsPostBack)
     {
         ((Literal)Master.FindControl("breadcrumbs")).Text = "<a href=\"searchkey.aspx\" class=\"home\">搜索关键词</a>";
         string checklogin = new AdminBll().CheckLogin("no");
         if (checklogin != "true")
         {
             BasePage.Alertback(checklogin);
             Response.End();
         }
         if (id != 0)
         {
             SearchModel s = new SearchBll().GetModel(id);
             txtkey.Text = s.keyword;
             txtnum.Text = s.num.ToString();
             txtpx.Text  = s.px.ToString();
         }
         else
         {
             int    PageSize  = 30;
             int    PageIndex = BasePage.GetRequestId(Request.QueryString["Page"]);
             string strwhere  = "";
             int    all       = new CommonBll().GetRecordCount(datatable, strwhere);
             if (all > 0)
             {
                 Repeater1.DataSource = new CommonBll().GetListPage("", datatable, strwhere, "px desc,num desc", PageSize, PageIndex);
                 Repeater1.DataBind();
                 if (all > PageSize)
                 {
                     fy.InnerHtml = GetPage.GetAspxPager(all, PageSize, PageIndex);
                 }
             }
         }
     }
 }
Пример #3
0
        public IList <UserDto> Searchdto(string tag, int uid)
        {
            SearchBll searchBll = new SearchBll();

            return(searchBll.SearchUser(tag, uid));
        }
Пример #4
0
        public IList <GetTweetDto> SearchTweet(string tag)
        {
            SearchBll searchBll = new SearchBll();

            return(searchBll.SearchTweet(tag));
        }