private void LoadTreatmentType() { try { TreatmentTypeBLL treatTypeBll = new TreatmentTypeBLL(); bool result = treatTypeBll.GetTreatmentType(); if (result) { treatmentTypeBindingSource.DataSource = treatTypeBll.treatmentTypes; cbTreatmentType.Refresh(); } } catch (Exception ex) { Display.ShowError(ex.Message); } }
private void RefreshTreatmentTypes(bool reload) { try { bool result = !reload; if (reload) { result = treatTypeBll.GetTreatmentType(ckiJustValid.Checked); } if (result) { if (treatTypeBll.treatmentTypes != null) { treatmentTypeBindingSource.DataSource = treatTypeBll.treatmentTypes; if (treatmentTypeBindingSource.Current != null) { CurrentElement = (TreatmentType)treatmentTypeBindingSource.Current; } dgvTreatmentTypes.ReadOnly = true; tsslFound.Text = treatTypeBll.treatmentTypes.Count.ToString(); SetGui4UserProfile(); } } } catch (Exception ex) { Display.ShowError(ex.Message); } finally { if (oViewEditing.actualStatus != state.insert) { oViewEditing.actualStatus = state.view; } } }