private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { if (SessionManager.Instance.ActiveUser.UserClinicList.Count > 0) { appts.Date = DateTime.Now.ToShortDateString(); appts.clinicId = ((Clinic)(SessionManager.Instance.ActiveUser.UserClinicList[0])).clinicID; appts.BackgroundListLoad(); } XmlNode x = cloud.FetchCompletedSurveys(); foreach (XmlNode xmlappt in x.ChildNodes) { Appointment appt = new Appointment(); int.TryParse(xmlappt.Attributes["apptid"].Value, out appt.apptID); appt.PatientName = xmlappt.Attributes["patientname"].Value; appt.Unitnum = xmlappt.Attributes["unitnum"].Value; appt.SurveyType = xmlappt.Attributes["surveyType"].Value; appt.Dob = xmlappt.Attributes["dob"].Value; DateTime.TryParse(xmlappt.Attributes["riskdatacompleted"].Value, out appt.riskdatacompleted); backgroundWorker1.ReportProgress(0, appt); } }
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { appts.Date = dateTimePicker1.Value.ToShortDateString(); appts.BackgroundListLoad(); }