コード例 #1
0
        private void tela_contatos_Load(object sender, EventArgs e)
        {
            Listar_contatos listar_tabelas = new Listar_contatos();
            DataSet         ds             = new DataSet();

            ds = listar_tabelas.listarContato(msg);
            metroGrid1.DataSource            = ds.Tables[0];
            metroGrid1.Columns[0].HeaderText = "Nome";
            metroGrid1.Columns[1].HeaderText = "Username";
            metroGrid1.Columns[2].HeaderText = "Departamento";


            metroGrid1.Refresh();
        }
コード例 #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            Listar_contatos listar_tabelas = new Listar_contatos();
            DataSet         ds             = new DataSet();

            ds = listar_tabelas.listarContato(msg);
            metroGrid1.DataSource            = ds.Tables[0];
            metroGrid1.Columns[0].HeaderText = "Nome";
            metroGrid1.Columns[1].HeaderText = "Username";
            metroGrid1.Columns[1].HeaderText = "Departamento";

            metroGrid1.Refresh();
            txtContato.Clear();
            txtContato.Focus();
        }