/// <summary> /// Set Chức vụ theo PB /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cbbPB_SelectedIndexChanged(object sender, EventArgs e) { int id; cbbCV.Items.Clear(); cbbKTKL.Items.Clear(); if (cbbPB.Text == "Quản lí") { id = 123; } else { id = 456; } cbbID.Items.Clear(); txtN.Text = ""; ketoan = new PhongKeToanBO(); ketoan.GetChucvuDTO(out list, id); if (list != null) { for (int i = 0; i < list.Count; i++) { cbbCV.Items.Add(list[i].NameCV); } } else { MessageBox.Show("Lỗi không lấy được chức vụ", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error); } }