Ejemplo n.º 1
0
 protected virtual void OnNavigationButtonClicked(NavigationButtonEventArgs e)
 {
     if (NavigationButtonClicked != null)
     {
         NavigationButtonClicked(e);
     }
 }
Ejemplo n.º 2
0
    protected void btnGO_Click(object sender, ImageClickEventArgs e)
    {
        NavigationButtonEventArgs oEventArgs = new NavigationButtonEventArgs();

        oEventArgs.ButtonClicked = ClickedButton.GoToPageButton;
        int iPageNo;

        try
        {
            iPageNo = int.Parse(txtGO.Text.ToString());
        }
        catch (Exception ex)
        {
            iPageNo = currentPage;
        }
        if (iPageNo > totalPages)
        {
            iPageNo = int.Parse(totalPages.ToString());
        }
        oEventArgs.PageToGo = iPageNo;
        txtGO.Text          = totalPages.ToString();
        if (IsNumeric(txtPagesize.Text) == false)
        {
            txtPagesize.Text = "20";
        }
        PageSize = long.Parse(txtPagesize.Text.ToString());
        OnNavigationButtonClicked(oEventArgs);
    }
Ejemplo n.º 3
0
    protected void btnNext_Click(object sender, ImageClickEventArgs e)
    {
        NavigationButtonEventArgs oEventArgs = new NavigationButtonEventArgs();

        oEventArgs.ButtonClicked = ClickedButton.NextRecordButton;
        NavigationLink("Next");
        oEventArgs.PageToGo = currentPage;
        OnNavigationButtonClicked(oEventArgs);
    }
Ejemplo n.º 4
0
    protected void btnLast_Click(object sender, ImageClickEventArgs e)
    {
        NavigationButtonEventArgs oEventArgs = new NavigationButtonEventArgs();

        oEventArgs.ButtonClicked = ClickedButton.LastRecordButton;
        NavigationLink("Last");
        oEventArgs.PageToGo = Convert.ToInt16(totalPages.ToString());
        txtGO.Text          = totalPages.ToString();
        OnNavigationButtonClicked(oEventArgs);
    }
Ejemplo n.º 5
0
    protected void btnFirst_Click(object sender, ImageClickEventArgs e)
    {
        NavigationButtonEventArgs oEventArgs = new NavigationButtonEventArgs();

        oEventArgs.ButtonClicked = ClickedButton.FirstRecordButton;
        txtGO.Text          = "1";
        oEventArgs.PageToGo = 1;
        NavigationLink("First");
        OnNavigationButtonClicked(oEventArgs);
    }
Ejemplo n.º 6
0
 protected void GridView1_NavigationButtonClick(object sender, NavigationButtonEventArgs e)
 {
     if (e.NavigationButtonsType == NavigationButtonsTypes.GoFirst)
     {
         FilterToNthPage(GridView1.SearchFilters,
                         GridView1.CurrentSortExpression,
                         GridView1.CurrentSortDirection, 1);
     }
     else if (e.NavigationButtonsType == NavigationButtonsTypes.GoLast)
     {
         FilterToNthPage(GridView1.SearchFilters,
                         GridView1.CurrentSortExpression,
                         GridView1.CurrentSortDirection,
                         GridView1.TotalSearchPages);
     }
     else if (e.NavigationButtonsType == NavigationButtonsTypes.GoNext)
     {
         if (GridView1.CurrentSearchPageNo < GridView1.TotalSearchPages)
         {
             FilterToNthPage(GridView1.SearchFilters,
                             GridView1.CurrentSortExpression,
                             GridView1.CurrentSortDirection,
                             (int)GridView1.CurrentSearchPageNo + 1);
         }
     }
     else if (e.NavigationButtonsType == NavigationButtonsTypes.GoPrevious)
     {
         if (GridView1.CurrentSearchPageNo > 1)
         {
             FilterToNthPage(GridView1.SearchFilters,
                             GridView1.CurrentSortExpression,
                             GridView1.CurrentSortDirection,
                             (int)GridView1.CurrentSearchPageNo - 1);
         }
     }
     else if (e.NavigationButtonsType == NavigationButtonsTypes.GoToPage)
     {
         FilterToNthPage(GridView1.SearchFilters,
                         GridView1.CurrentSortExpression,
                         GridView1.CurrentSortDirection,
                         (int)e.PageIndex);
     }
 }
Ejemplo n.º 7
0
 protected virtual void OnNavigationButtonClicked(NavigationButtonEventArgs e)
 {
     if (NavigationButtonClicked != null)
         {
             NavigationButtonClicked(e);
         }
 }
Ejemplo n.º 8
0
 protected void btnPrev_Click(object sender, ImageClickEventArgs e)
 {
     NavigationButtonEventArgs oEventArgs = new NavigationButtonEventArgs();
         oEventArgs.ButtonClicked = ClickedButton.PreviousRecordButton;
         NavigationLink("Prev");
         oEventArgs.PageToGo = currentPage;
         OnNavigationButtonClicked(oEventArgs);
 }
Ejemplo n.º 9
0
 protected void btnLast_Click(object sender, ImageClickEventArgs e)
 {
     NavigationButtonEventArgs oEventArgs = new NavigationButtonEventArgs();
         oEventArgs.ButtonClicked = ClickedButton.LastRecordButton;
         NavigationLink("Last");
         oEventArgs.PageToGo = Convert.ToInt16(totalPages.ToString());
         txtGO.Text = totalPages.ToString();
         OnNavigationButtonClicked(oEventArgs);
 }
Ejemplo n.º 10
0
    protected void btnGO_Click(object sender, ImageClickEventArgs e)
    {
        NavigationButtonEventArgs oEventArgs = new NavigationButtonEventArgs();
            oEventArgs.ButtonClicked = ClickedButton.GoToPageButton;
            int iPageNo;

            try
            {
                iPageNo = int.Parse(txtGO.Text.ToString());
            }
            catch (Exception ex)
            {
                iPageNo = currentPage;
            }
            if(iPageNo > totalPages)
            {
                iPageNo = int.Parse(totalPages.ToString());
            }
            oEventArgs.PageToGo = iPageNo;
            txtGO.Text = totalPages.ToString();
            if(IsNumeric(txtPagesize.Text) == false)
            {
                txtPagesize.Text = "20";
            }
            PageSize = long.Parse(txtPagesize.Text.ToString());
            OnNavigationButtonClicked(oEventArgs);
    }
Ejemplo n.º 11
0
 protected void btnFirst_Click(object sender, ImageClickEventArgs e)
 {
     NavigationButtonEventArgs oEventArgs = new NavigationButtonEventArgs();
         oEventArgs.ButtonClicked = ClickedButton.FirstRecordButton;
         txtGO.Text = "1";
         oEventArgs.PageToGo = 1;
         NavigationLink("First");
         OnNavigationButtonClicked(oEventArgs);
 }