// Bring all values to default private void Reset() { TxtClientNumber.ResetText(); CmbAuthors.ResetText(); CmbBooks.ResetText(); NumInterval.Value = 30; }
// Reset all items to default... private void Reset() { // Reset combo boxes not to confuse the FillDgvReservations method. It considers these combo boxes and TxtClientNumber... CmbSearch.SelectedIndex = -1; CmbBooks.SelectedIndex = -1; CmbAuthors.SelectedIndex = -1; CmbUsers.SelectedIndex = -1; CmbWhichDates.SelectedIndex = -1; TxtClientNumber.ResetText(); ClickedRow = -1; ClickedId = 0; // Do not show any group boxes because nothing is selected in CmbSearch... GrbUsers.Visible = false; GrbBookDetails.Visible = false; GrbClientNumber.Visible = false; BtnStopReservation.Visible = false; BtnDeleteReservation.Visible = false; FillDgvReservations(); }