示例#1
0
        protected void btnSelect_Click(object sender, EventArgs e)
        {
            string    keywords = txtKeywords.Value;
            DataTable dt2      = null;

            dt2 = KeyListBLL.SelectKeyListInfo(keywords);
            reKeylist.DataSource = dt2;
            reKeylist.DataBind();
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string qiyongid = Request.Form["qiyongid"];

            if (qiyongid != null)
            {
                if (KeyListBLL.UpdateinfoStart(int.Parse(qiyongid)))
                {
                    Response.Write("yes");
                    Response.End();
                }
                else
                {
                    Response.Write("no");
                    Response.End();
                }
            }


            string tingyongid = Request.Form["tingyongid"];

            if (tingyongid != null)
            {
                if (KeyListBLL.UpdateinfoStop(int.Parse(tingyongid)))
                {
                    Response.Write("yes");
                    Response.End();
                }
                else
                {
                    Response.Write("no");
                    Response.End();
                }
            }

            string deleteid = Request.Form["id"];

            if (deleteid != null)
            {
                if (KeyListBLL.DeleteKeyWordsInfo(int.Parse(deleteid)))
                {
                    Response.Write("yes");
                    Response.End();
                }

                else
                {
                    Response.Write("no");
                    Response.End();
                }
            }

            string first  = Request.Form["first"];
            string second = Request.Form["second"];
            string keyid  = Request.Form["keyid"];

            if (first != null && second != null)
            {
                if (BLL.KeyListBLL.updateKeyWordsInfo(Convert.ToInt32(keyid), first, second))
                {
                    Response.Write("yes");
                    Response.End();
                }

                else
                {
                    Response.Write("no");
                    Response.End();
                }
            }

            if (!IsPostBack)
            {
                string page = Request.QueryString["page"].ToString();
                pageIndex = int.Parse(page);
                dt        = KeyListBLL.GetKeyListAllInf0();
                PagedDataSource pds = new PagedDataSource();
                pds.AllowPaging      = true;
                pds.PageSize         = 4;
                pds.CurrentPageIndex = pageIndex - 1;
                pds.DataSource       = dt.DefaultView;
                pageCount            = pds.PageCount;
                reKeylist.DataSource = pds;
                reKeylist.DataBind();
            }
        }