Ejemplo n.º 1
0
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     if (txtSearchTerm.Text != string.Empty)
     {
         GlossaryBAL gl = new GlossaryBAL();
         ds = gl.FetchGlossary();
         ds.Tables[0].DefaultView.RowFilter = "term like '%" + txtSearchTerm.Text + "%'";
         grdGlossary.Visible    = true;
         grdGlossary.DataSource = ds.Tables[0];
         grdGlossary.DataBind();
         if (grdGlossary.Rows.Count != 0)
         {
             Label1.Visible = false;
         }
         else
         {
             Label1.Visible = true;
         }
     }
     else
     {
         grdGlossary.Visible = false;
         Label1.Visible      = true;
     }
 }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request.QueryString["glossaryid"] != null)
         {
             GlossaryBAL gl = new GlossaryBAL();
             ds = gl.FetchGlossary();
             ds.Tables[0].DefaultView.RowFilter = "term like '%" + Request.QueryString["glossaryid"].ToString() + "%'";
             grdGlossary.Visible    = true;
             grdGlossary.DataSource = ds.Tables[0];
             grdGlossary.DataBind();
             if (grdGlossary.Rows.Count != 0)
             {
                 Label1.Visible = false;
             }
             else
             {
                 Label1.Visible = true;
             }
         }
         else
         {
             GlosssaryFetch();
         }
     }
 }
Ejemplo n.º 3
0
    private void FetchDetails()
    {
        GlossaryBAL gl = new GlossaryBAL();

        ds = gl.FetchGlossary();
        grdGlossary.DataSource = ds.Tables[0];
        grdGlossary.DataBind();
    }
Ejemplo n.º 4
0
 protected void gridPageChanging(object sender, GridViewPageEventArgs e)
 {
     GlossaryBAL gl = new GlossaryBAL();
     ds = gl.FetchGlossary();
     grdGlossary.DataSource = ds.Tables[0];
     grdGlossary.PageIndex = e.NewPageIndex;
     grdGlossary.DataBind();
 }
Ejemplo n.º 5
0
    protected void gridPageChanging(object sender, GridViewPageEventArgs e)
    {
        GlossaryBAL gl = new GlossaryBAL();

        ds = gl.FetchGlossary();
        grdGlossary.DataSource = ds.Tables[0];
        grdGlossary.PageIndex  = e.NewPageIndex;
        grdGlossary.DataBind();
    }
Ejemplo n.º 6
0
 private void GlosssaryFetch()
 {
     // Bind the term and description details in grid....
     GlossaryBAL gl = new GlossaryBAL();
     ds = gl.FetchGlossary();
     grdGlossary.DataSource = ds.Tables[0];
     grdGlossary.DataBind();
     // End Bind the term and description details in grid....
 }
Ejemplo n.º 7
0
    private void GlosssaryFetch()
    {
        // Bind the term and description details in grid....
        GlossaryBAL gl = new GlossaryBAL();

        ds = gl.FetchGlossary();
        grdGlossary.DataSource = ds.Tables[0];
        grdGlossary.DataBind();
        // End Bind the term and description details in grid....
    }
Ejemplo n.º 8
0
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     if (txtSearchTerm.Text != string.Empty)
     {
         GlossaryBAL gl = new GlossaryBAL();
         ds = gl.FetchGlossary();
         ds.Tables[0].DefaultView.RowFilter = "term like '%" + txtSearchTerm.Text + "%'";
         grdGlossary.Visible = true;
         grdGlossary.DataSource = ds.Tables[0];
         grdGlossary.DataBind();
         if (grdGlossary.Rows.Count != 0)
             Label1.Visible = false;
         else
             Label1.Visible = true;
     }
     else
     {
         grdGlossary.Visible = false;
         Label1.Visible = true;
     }
 }
Ejemplo n.º 9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["glossaryid"] != null)
            {
                GlossaryBAL gl = new GlossaryBAL();
                ds = gl.FetchGlossary();
                ds.Tables[0].DefaultView.RowFilter = "term like '%" + Request.QueryString["glossaryid"].ToString() + "%'";
                grdGlossary.Visible = true;
                grdGlossary.DataSource = ds.Tables[0];
                grdGlossary.DataBind();
                if (grdGlossary.Rows.Count != 0)
                    Label1.Visible = false;
                else
                    Label1.Visible = true;
            }
            else
                GlosssaryFetch();

        }
    }
Ejemplo n.º 10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        Response.Cache.SetNoStore();
        if (!IsPostBack)
        {
            #region Fetch Grid Page Size Details...
            DataTable  pg = new DataTable();
            GeneralBAL pz = new GeneralBAL();
            pg = pz.FetchGridPageSize();
            if (pg.Rows.Count != 0 && pg.Rows[0][1].ToString() != string.Empty)
            {
                grdGlossary.PageSize = Convert.ToInt32(pg.Rows[0][1].ToString());
            }
            #endregion

            GlossaryBAL gl = new GlossaryBAL();
            ds = gl.FetchGlossary();
            grdGlossary.DataSource = ds.Tables[0];
            grdGlossary.DataBind();
        }
    }
Ejemplo n.º 11
0
 private void FetchDetails()
 {
     GlossaryBAL gl = new GlossaryBAL();
     ds = gl.FetchGlossary();
     grdGlossary.DataSource = ds.Tables[0];
     grdGlossary.DataBind();
 }
Ejemplo n.º 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        Response.Cache.SetNoStore();
        if (!IsPostBack)
        {
            #region Fetch Grid Page Size Details...
            DataTable pg = new DataTable();
            GeneralBAL pz = new GeneralBAL();
            pg = pz.FetchGridPageSize();
            if (pg.Rows.Count != 0 && pg.Rows[0][1].ToString() != string.Empty)
                grdGlossary.PageSize = Convert.ToInt32(pg.Rows[0][1].ToString());
            #endregion

            GlossaryBAL gl = new GlossaryBAL();
            ds = gl.FetchGlossary();
            grdGlossary.DataSource = ds.Tables[0];
            grdGlossary.DataBind();
        }
    }