using Npgsql;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TestsManipulate
{
    public partial class UsersPage : Form
    {
        public UsersPage()
        {
            InitializeComponent();
            LoadData();
        }

        private void LoadData()
        {
            var conn = new NpgsqlConnection(Program.connString);
            conn.Open();
            var cmd = new NpgsqlCommand("select * from users",conn);
            var reader = cmd.ExecuteReader();
            var dt = new DataTable();
            dt.Load(reader);
            dataGridView1.DataSource = dt;
            conn.Close();

        }
    }
}
