public Form1(int UserId) { this.UserId = UserId; InitializeComponent(); GetEmployees = StaffDAL.GetEmployees(); bindingSource = new BindingSource(GetEmployees, null); dataGridView1.DataSource = bindingSource; this.dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; }
private void btnRefresh_Click(object sender, EventArgs e) { GetEmployees = StaffDAL.GetEmployees(); bindingSource = new BindingSource(GetEmployees, null); dataGridView1.DataSource = bindingSource; }