private void buttonClear_Click(object sender, EventArgs e) { this.Enabled = false; string oper = ""; if (null != comboBoxOperator.SelectedItem) { oper = comboBoxOperator.SelectedItem.ToString(); } logDao.delLog(textBoxModule.Text, oper, dateTimePickerBegin.Value.Date, dateTimePickerEnd.Value.Date); buttonQuery_Click(null, null); this.Enabled = true; }