private void ClearAll() { try { ClientFIOTB.Clear(); birthDateDTP.Value = DateTime.Now; cbSex.SelectedIndex = -1; AddressTB.Clear(); } catch (Exception ex) { logger.Error(ex, $"\r\n#---------#\r\n{ex.StackTrace}\r\n##---------##\r\n{ex.Message}\r\n###---------###\r\n{ex.Source}"); MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void ClearAll() { cbArea.SelectedIndex = -1; cbMO.SelectedIndex = -1; cbShortNameOrg.SelectedIndex = -1; EventDate.Value = DateTime.Now; ClientFIOTB.Clear(); ClientAddressTB.Clear(); ClientBirthDate.Value = DateTime.Now; cbClientSex.SelectedIndex = -1; foreach (RadioButton radioButton in groupBox4.Controls.OfType <RadioButton>()) { if (radioButton.Checked) { radioButton.Checked = false; } } TreatmentDate.Value = DateTime.Now; if (TransfertedCheck.Checked) { TransferTB.Clear(); TransferDate.Value = DateTime.Now; TransfertedCheck.Checked = false; } foreach (RadioButton radioButton in groupBox8.Controls.OfType <RadioButton>()) { if (radioButton.Checked) { radioButton.Checked = false; } } DiagTB.Clear(); MKB10TB.SelectedIndex = -1; SpecialityTB.Clear(); DepartmentTB.Clear(); cbHealthStatus.SelectedIndex = -1; MKB10TB.Enabled = false; DiagTB.Enabled = false; SpecialityTB.Enabled = false; DepartmentTB.Enabled = false; }