private void CreateAppointments() { Random rand = new Random(DateTime.Now.Millisecond); Appointments.Add(MedicalAppointment.Create(startTime: DateTime.Now.Date.AddHours(10), endTime: DateTime.Now.Date.AddHours(11.5), doctorId: 1, paymentStateId: 1, location: "101", patientName: "Dave Murrel", note: "Take care", firstVisit: true)); Appointments.Add(MedicalAppointment.Create(startTime: DateTime.Now.Date.AddDays(2).AddHours(15), endTime: DateTime.Now.Date.AddDays(2).AddHours(16.5), doctorId: 1, paymentStateId: 1, location: "101", patientName: "Mike Roller", note: "Schedule next visit soon", firstVisit: true)); Appointments.Add(MedicalAppointment.Create(startTime: DateTime.Now.Date.AddDays(1).AddHours(11), endTime: DateTime.Now.Date.AddDays(1).AddHours(12), doctorId: 2, paymentStateId: 1, location: "103", patientName: "Bert Parkins", note: string.Empty, firstVisit: true)); Appointments.Add(MedicalAppointment.Create(startTime: DateTime.Now.Date.AddDays(2).AddHours(10), endTime: DateTime.Now.Date.AddDays(2).AddHours(12), doctorId: 2, paymentStateId: 0, location: "103", patientName: "Carl Lucas", note: string.Empty, firstVisit: false)); Appointments.Add(MedicalAppointment.Create(startTime: DateTime.Now.Date.AddHours(12), endTime: DateTime.Now.Date.AddHours(13.5), doctorId: 3, paymentStateId: 1, location: "104", patientName: "Brad Barnes", note: "Tests are necessary", firstVisit: false)); Appointments.Add(MedicalAppointment.Create(startTime: DateTime.Now.Date.AddDays(1).AddHours(14), endTime: DateTime.Now.Date.AddDays(1).AddHours(15), doctorId: 3, paymentStateId: 1, location: "104", patientName: "Richard Fisher", note: string.Empty, firstVisit: true)); }
internal static MedicalAppointment Create(DateTime startTime, DateTime endTime, int doctorId, int paymentStateId, string location, string patientName, string note, bool firstVisit) { MedicalAppointment apt = MedicalAppointment.Create(); apt.StartTime = startTime; apt.EndTime = endTime; apt.DoctorId = doctorId; apt.PaymentStateId = paymentStateId; apt.Note = note; apt.Location = location; apt.PatientName = patientName; apt.FirstVisit = firstVisit; return(apt); }