public void LoadComboBox() { List <eDisk> ls = dbll.getAllDisk(); foreach (eDisk item in ls) { cmbDiskID.Items.Add(item.DiskID); } }
private void btnDelete_Click(object sender, EventArgs e) { int diskid = Convert.ToInt32(lblDiskID.Text); if (diskbll.deleteDisk(diskid)) { listdisk = diskbll.getAllDisk(); LoadDataGridView(); MessageBox.Show("Success"); } else { MessageBox.Show("fail"); } }