Beispiel #1
0
        private void showgrid(object sender, System.EventArgs e)
        {
            DataTable mydt = null;

            mydt = AccessDb.Execute("select * from t_news where ptype='" + typ + "' order by id desc").Tables[0];

            DGList.DataSource = mydt;

            DataTable dt = new DataTable();

            try
            {
                DGList.DataBind();
                MyPage1.init(mydt.Rows.Count);
            }
            catch
            {
                if ((DGList.CurrentPageIndex - 1) >= 0)
                {
                    DGList.CurrentPageIndex = DGList.CurrentPageIndex - 1;
                }
                DGList.DataBind();
                MyPage1.init(mydt.Rows.Count);
            }
        }
Beispiel #2
0
 private void txtCari_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Down)
     {
         DGList.Focus();
     }
 }
Beispiel #3
0
        private void showgrid(object sender, System.EventArgs e)
        {
            DataTable mydt = null;

            mydt = AccessDb.Execute("select * from t_user").Tables[0];

            DGList.DataSource = mydt;
            try
            {
                DGList.DataBind();
            }
            catch
            {
                if ((DGList.CurrentPageIndex - 1) >= 0)
                {
                    DGList.CurrentPageIndex = DGList.CurrentPageIndex - 1;
                }
                DGList.DataBind();
            }
        }
        private void showgrid(object sender, System.EventArgs e)
        {
            DataTable mydt = null;

            mydt = AccessDb.Execute("select * from t_question  order by pAnswered ,pdate desc").Tables[0];

            DGList.DataSource = mydt;
            try
            {
                DGList.DataBind();
                MyPage1.init(mydt.Rows.Count);
            }
            catch
            {
                if ((DGList.CurrentPageIndex - 1) >= 0)
                {
                    DGList.CurrentPageIndex = DGList.CurrentPageIndex - 1;
                }
                DGList.DataBind();
                MyPage1.init(mydt.Rows.Count);
            }
        }