public string pathFormater(string patientName, string doctorName, Appointment appointment) { string date; string path; date = appointment.Start.ToString(); date = date.Replace("/", " "); date = date.Replace(":", " "); path = " " + patientName + " " + doctorName + " " + date + " " + appointment.Status; return path; }
private void Sch_Apt_Click(object sender, RoutedEventArgs e) { googleCalendar.pushEvent(apt); doctorChoice = Doctor.SelectedValue.ToString(); doctorChoice = doctorChoice.Remove(0, 38); Patient p = new Patient(); Doctor d = new Doctor(); p.Name = apt.Summary; d.Name = doctorChoice; Appointment appointment = new Appointment(); appointment.Room = apt.Location; appointment.Description = apt.Description; appointment.Start = apt.Start.DateTime; appointment.End = apt.End.DateTime; appointment.Status = "open"; Visit v = new Visit(); v.apt = appointment; v.doc = d; v.patient = p; path = database.pathFormater(p.Name, d.Name, appointment); database.visitToXml(v, path); }
public void Dispose() { Appointment.DeleteAll(); Doctor.DeleteAll(); Patient.DeleteAll(); }