private void MainForm_Activated(object sender, EventArgs e) { DiaAllService.ReadDiagnosis(); dateCalendar.Value = DateTime.Now; cmbOrganization.Items.Clear(); foreach (Organization o in OrgServise.GetOrganizations()) { cmbOrganization.Items.Add(o.GetName()); } DiagnosisAll diaAll = DiaAllService.GetDiagnosisAll(); cmdDiagnosisBio.Items.Clear(); foreach (Diagnosis o in diaAll.GetDiagnosesBio()) { cmdDiagnosisBio.Items.Add(o.GetName()); } cmdDiagnosisLitt.Items.Clear(); foreach (Diagnosis o in diaAll.GetDiagnosesLittle()) { cmdDiagnosisLitt.Items.Add(o.GetName()); } cmdDiagnosisBig.Items.Clear(); foreach (Diagnosis o in diaAll.GetDiagnosesBig()) { cmdDiagnosisBig.Items.Add(o.GetName()); } dateCalendar.Value = DateTime.Now; showTransaction(); }
private void GetDeleteCheked() { try { bool bio = chkBiopsy.Checked; bool little = chkLittle.Checked; bool big = chkBig.Checked; diagnosisDelete.Clear(); if (bio) { foreach (Diagnosis o in diaService.GetDiagnosisAll().GetDiagnosesBio()) { diagnosisDelete.Add(o.GetName()); } } if (little) { foreach (Diagnosis o in diaService.GetDiagnosisAll().GetDiagnosesLittle()) { diagnosisDelete.Add(o.GetName()); } } if (big) { foreach (Diagnosis o in diaService.GetDiagnosisAll().GetDiagnosesBig()) { diagnosisDelete.Add(o.GetName()); } } cmbDeleteDia.Items.Clear(); foreach (string o in diagnosisDelete) { cmbDeleteDia.Items.Add(o); } } catch (Exception ex) { } }