private void cbbMaTour_SelectedIndexChanged(object sender, EventArgs e) { try { int maTour = int.Parse(cbbMaTour.Text); DataTable tbMaDoan = doan.getDsMaDoan(maTour); cbbMaDoan.DataSource = tbMaDoan; } catch (Exception) { } }
private void cbbMaTour_SelectedIndexChanged(object sender, EventArgs e) { try { int maTour = int.Parse(cbbMaTour.Text); tbMaDoan = doan.getDsMaDoan(maTour); DataRow row = tbMaDoan.NewRow(); row[0] = -1; tbMaDoan.Rows.Add(row); cbbMaDoan.DataSource = tbMaDoan; cbbMaDoan.Text = "-1"; } catch (Exception) { } }