private void btnDel_Click(object sender, System.EventArgs e) { if (this.grouplist.SelectedItems.Count <= 0) { return; } if (EcoMessageBox.ShowWarning(EcoLanguage.getMsg(LangRes.Group_delCfm, new string[0]), MessageBoxButtons.OKCancel).Equals(DialogResult.Cancel)) { return; } string value = this.grouplist.SelectedItems[0].Tag.ToString().Split(new char[] { '|' })[0]; string text = this.grouplist.SelectedItems[0].SubItems[0].Text; string text2 = this.grouplist.SelectedItems[0].SubItems[1].Text; int num = GroupInfo.DeleteGroupByID((long)System.Convert.ToInt32(value)); if (num > 0) { LogAPI.writeEventLog("0430031", new string[] { text2, text, EcoGlobalVar.gl_LoginUser.UserName }); EcoGlobalVar.setDashBoardFlg(520uL, "", 64); this.FillList(); if (this.grouplist.Items.Count == 0) { this.btnDel.Enabled = false; this.btnModify.Enabled = false; this.itemlist.Columns.Clear(); this.itemlist.Items.Clear(); return; } } else { EcoMessageBox.ShowError(EcoLanguage.getMsg(LangRes.OPfail, new string[0])); } }