private void textDate_TextChanged(object sender, EventArgs e) { if (textDate.errorProvider1.GetError(textDate) == "") { int count = Commlogs.GetRecallUndoCount(PIn.Date(textDate.Text)); labelCount.Text = count.ToString(); } else { labelCount.Text = ""; } }