private void PeriodButton_Click(object sender, EventArgs e) { if (PeriodCheckBox.Checked) { if (CalendarTo.SelectionEnd < CalendarFrom.SelectionEnd) { ErrorLabel.Visible = true; return; } else { ErrorLabel.Visible = false; } ClientPayments.CheckClientAndPeriod(ClientComboBox.SelectedValue.ToString(), CalendarFrom.SelectionEnd, CalendarTo.SelectionEnd, ClientCheckBox.Checked, TPSCheckBox.Checked); UpdateLabelPayments(); } }