Ejemplo n.º 1
0
 private void DeleteStaffbtn_Click(object sender, EventArgs e)
 {
     if (StaffTable.SelectedRows.Count > 0)
     {
         if (MessageBox.Show("Are you sure you want to delete" + StaffTable.SelectedRows[0].Cells[1].Value + "from staff table ?", "Delete confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             Staffs.DeleteRow(int.Parse(StaffTable.SelectedCells[0].Value.ToString()));
         }
         MessageBox.Show("Deleted succsesfully !", "Deleted", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }