private void FillRepeater()
    {
        using (order obj = new order())
        {
            DataSet dsR = new DataSet();
            if (txtserch.Text == "")
            {
                dsR = obj.order_selectall();
            }
            else
            {
                obj._id = Convert.ToInt64(txtserch.Text.Trim());
                dsR     = obj.order_Select_Searchdata();
            }
            int             cnt  = dsR.Tables[0].Rows.Count;
            PagedDataSource page = new PagedDataSource();
            page.DataSource       = dsR.Tables[0].DefaultView;
            page.AllowPaging      = true;
            page.PageSize         = 5;
            page.CurrentPageIndex = Pgnm;
            vcnt = cnt / page.PageSize;

            if (Pgnm < 1)
            {
                linkprev.Visible = false;
            }
            else if (Pgnm > 0)
            {
                linkprev.Visible = true;
            }
            if (Pgnm == vcnt)
            {
                linknext.Visible = false;
            }
            if (Pgnm < vcnt)
            {
                linknext.Visible = true;
            }
            if (dsR.Tables[0].Rows.Count > 0)
            {
                rptpackage.DataSource = page;
                rptpackage.DataBind();
                if (txtserch.Text != "")
                {
                    lblMessage.Text      = " Record Found :" + dsR.Tables[0].Rows.Count;
                    messagegreen.Visible = true;
                }
            }
            else
            {
                rptpackage.Visible = false;
            }
        }
    }