示例#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;
 }