Пример #1
0
 private void dataGridView_ThanhVien_SelectionChanged(object sender, EventArgs e)
 {
     string str=dataGridView_ThanhVien.CurrentRow.Cells[0].Value.ToString();
     ThanhVienBus bus = new ThanhVienBus();
     bus.GetThanhVien(str);
     //MessageBox.Show(str);
 }
Пример #2
0
 private void View_dataGridView()
 {
     ThanhVienBus bus = new ThanhVienBus();
     ArrayList arr = new ArrayList();
     arr = bus.GetDanhSachThanhVien();
     dataGridView_ThanhVien.DataSource = arr;
 }
Пример #3
0
 private void Click_Delete(object sender, EventArgs e)
 {
     ThanhVienBus bus = new ThanhVienBus();
     ThanhVienDto dto=new ThanhVienDto();
     string str=dataGridView_ThanhVien.CurrentRow.Cells[0].Value.ToString();
     dto=bus.GetThanhVien(str);
     bus.ThanhVien = dto;
     DialogResult result = MessageBox.Show("Do you really want to Delete?", "Quan Ly Gia Pha", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
     if (result == DialogResult.Yes)
           bus.Delete();
 }
Пример #4
0
 private void ShowForm_ThanhVien()
 {
     ThanhVienBus bus = new ThanhVienBus();
     ArrayList arr = new ArrayList();
     arr = bus.GetDanhSachThanhVien();
     comboBox_TenThanhVien.DisplayMember = "HoVaTen";
     comboBox_TenThanhVien.ValueMember = "MaThanhVien";
     comboBox_TenThanhVien.DataSource = arr;
 }