private void Listar() { try { DgvListado.DataSource = NCategoria.Listar(); this.Formato(); this.Limpiar(); labelTotal.Text = "TOTAL DE REGISTROS :" + Convert.ToString(DgvListado.Rows.Count); } catch (Exception e) { MessageBox.Show(e.Message + e.StackTrace); } }
private void Listar() { try { DgvListado.DataSource = NCategoria.Listar(); this.Formato(); this.Limpiar(); LblTotal.Text = "Total de registros: " + Convert.ToString(DgvListado.Rows.Count); } catch (Exception ex) { MessageBox.Show(ex.Message + ex.StackTrace); } }
//Metodo para Listar los Datos private void Listar() { try { //Llenamos el DataGrid con el metodo Listar de la Clase Ncategoria DgvListado.DataSource = NCategoria.Listar(); //Aplicamos el formato al datagrid con el metodo "Formato" this.Formato(); //Limpiamos campos this.Limpiar(); //Le asignamos texto al Label total Registros LblTotal.Text = "Total Registros: " + Convert.ToString(DgvListado.Rows.Count); } catch (Exception ex) { MessageBox.Show(ex.Message + ex.StackTrace); } }