private void btnSearchRating_Click(object sender, EventArgs e)
        {
            Messages oErrMsg = Messages.Instance;
            FeedBack oFeedBack = new FeedBack();

            DataSet ds = null;
            this.Cursor = Cursors.WaitCursor;
            btnSearchRating.Enabled = false;

            if (!Utils.PingTest())
            {
                this.Cursor = Cursors.Default;
                MessageBox.Show("VPN disconnected. Please connect and try again.", "CSRAssistance");
                return;
            }

            oErrMsg = oFeedBack.LoadRating(dtRateFrom.Value.ToString("yyyyMMdd"),
            dtRateTo.Value.ToString("yyyyMMdd"),
            (cboRating.Text == "--Select--" ? string.Empty : cboRating.Text),
            (chkBlankComment.Checked ? 1 : 0), 20,
            1);

            if (!oErrMsg.IsError)
            {
                ds = (DataSet)oErrMsg.Results;
                if (ds.Tables.Count > 0)
                {
                    dgList.DataSource = ds.Tables[0];
                }

                this.wfrm.Hide();
                bbaPager1.RecordCount = 0;
                if (ds.Tables.Count > 0)
                    bbaPager1.RecordCount = Convert.ToInt32(ds.Tables["counter"].Rows[0]["CNT"].ToString());

                bbaPager1.PageSize = 20;
                bbaPager1.MaximumNumberofLinks = (bbaPager1.RecordCount > 0 ? 5 : 0);
                lblCounter.Text = bbaPager1.RecordCount.ToString();

                if (bbaPager1.RecordCount > 0)
                {
                    bbaPager1.Visible = true;
                }
                else
                {
                    bbaPager1.Visible = false;
                }
                this.Cursor = Cursors.Default;
                btnSearchRating.Enabled = true;
            }
            else
            {
                this.wfrm.Hide();
                this.btnRatingSearch.Enabled = true;
                this.Cursor = Cursors.Default;
                MessageBox.Show(oErrMsg.Message);
            }
        }
        private void bbaPager1_PageClicked(object sender, PagerControl.PageClickEventHandler e)
        {
            Messages oErrMsg = Messages.Instance;
            FeedBack oFeedBack = new FeedBack();
            DataSet ds = null;

            oErrMsg = oFeedBack.LoadRating(dtRateFrom.Value.ToString("yyyyMMdd"),
            dtRateTo.Value.ToString("yyyyMMdd"),
            (cboRating.Text == "--Select--" ? string.Empty : cboRating.Text),
            (chkBlankComment.Checked ? 1 : 0), 20,
            e.SelectedPage);

            if (!oErrMsg.IsError)
            {
                ds = (DataSet)oErrMsg.Results;
                if (ds.Tables.Count > 0)
                {
                    dgList.DataSource = ds.Tables[0];
                }
            }
        }