private void btnClear_Click(object sender, EventArgs e)
{
try {
for (int i = 0; i < lstViewCPTCompliance.Items.Count; i++)
{
lstViewCPTCompliance.Items[i].Remove();
lstViewCPTCompliance.Update();
lstViewCPTCompliance.Refresh();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
private void btnDelete_Click(object sender, EventArgs e)
{
try {
for (int i = 0; i < lstViewCPTCompliance.Items.Count; i++)
{
if (lstViewCPTCompliance.Items[i].Selected == true)
{
lstViewCPTCompliance.Items[i].Remove();
lstViewCPTCompliance.Update();
lstViewCPTCompliance.Refresh();
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}