private void PopulateClbDisease() { DataTable diseaseTable = DiseaseRepo.GetAllDisease(); for (int ax = 1; ax < diseaseTable.Rows.Count; ax++) { clbDisease.Items.Add(diseaseTable.Rows[ax]["diseasename"].ToString()); } }
private void PopulateClbDisease() { DataTable diseaseTable = DiseaseRepo.GetAllDisease(); for (int ax = 1; ax < diseaseTable.Rows.Count; ax++) { clbDisease.Items.Add(diseaseTable.Rows[ax]["diseasename"].ToString()); } DataTable allDiseaseTable = PatientDiseaseRepo.GetIndividualDisease(Convert.ToInt32(txtPersonID.Text)); for (int ax = 0; ax < allDiseaseTable.Rows.Count; ax++) { if (clbDisease.Items.Contains(allDiseaseTable.Rows[ax]["diseasename"].ToString())) { clbDisease.SetItemChecked(clbDisease.Items.IndexOf(allDiseaseTable.Rows[ax]["diseasename"].ToString()), true); } } }