private void selectJobsByProfile(object sender, DataGridViewCellEventArgs e) { if (Convert.ToInt32(((DataTable)profileDataGridView.DataSource).Rows[e.RowIndex]["Id"]) > 0) { int id = Convert.ToInt32(((DataTable)profileDataGridView.DataSource).Rows[e.RowIndex]["Id"]); string fullName = ((DataTable)profileDataGridView.DataSource).Rows[e.RowIndex]["FullName"].ToString(); DataTable dt = QueryDb.GetJobsByProfile(id); ShowProfileForm(dt, id, fullName); } }
private void updateDGVfromDb(int id) { gridTable = QueryDb.GetJobsByProfile(id); dataGridView1.DataSource = gridTable; }