コード例 #1
0
 //fungsi: Refresh GridView
 protected void btnRefresh_Click(object sender, EventArgs e)
 {
     if (Page.IsValid)
     {
         GvLog.DataBind();
     }
 }
コード例 #2
0
 private void showLog()
 {
     GvLog.DataSource = LearnSite.Common.Log.FileList();
     GvLog.DataBind();
     if (GvLog.Rows.Count < 1)
     {
         Labelmsg.Text = "当前未发现异常情况记录!";
     }
 }
コード例 #3
0
        public void CargarLogs()
        {
            var getLog = new OperacionesMarcaLog();
            var dsLogs = new DataSet();

            dsLogs = getLog.ObtenerLogs();

            if (dsLogs.Tables[0].Rows.Count != 0)
            {
                GvLog.DataSource = dsLogs.Tables[0];
                GvLog.Refresh();
            }
            else
            {
                MessageBox.Show("No existen Registros: ", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
コード例 #4
0
        protected void txtHalaman_TextChanged(object sender, EventArgs e)
        {
            GridViewRow rowPager   = GvLog.BottomPagerRow;
            TextBox     txtHalaman = (TextBox)(rowPager.Cells[0].FindControl("txtHalaman"));

            try
            {
                if (int.Parse(txtHalaman.Text) <= GvLog.PageCount + 1 && int.Parse(txtHalaman.Text) > 0)
                {
                    GvLog.PageIndex = (int.Parse(txtHalaman.Text)) - 1;
                    GvLog.DataBind();
                }
            }
            catch (Exception)
            {
                txtHalaman.Text = (GvLog.PageIndex + 1).ToString();
            }
        }