private void deleteBtn_Click(object sender, EventArgs e) { string sub_code = AccCodetxt.Text; if (!Validator.IsValidString(sub_code)) { GUIutils.ShowMessage("Enter the valid Account code"); return; } if (!SubGroup.IsSubGroup(sub_code)) { GUIutils.ShowMessage("Account code doesn't exist"); return; } SubGroup.DeleteSubGroup(sub_code); }