oop_II-6/EHEC_Server/EHEC_Server/DataBuilder/GenerateDataBuilder.cs

77 lines
2.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using EHEC_Server.DatabaseAccess;
namespace EHEC_Server.DataBuilder
{
public class GenerateDataBuilder
{
private static List<Doctor> Doctors = new List<Doctor>();
private static List<Patient> Patients = new List<Patient>();
private static List<Origin> Origins = new List<Origin>();
private static List<Result> Results = new List<Result>();
private static List<Exam> Exams = new List<Exam>();
private static Random Rnd = new Random();
private static List<string> FirstNames = new List<string>(new string[]
{
"Michael", "Andreas", "Stefan", "Ivan","Adrien"
});
private static List<string> LastNames = new List<string>(new string[]
{
"Meister", "Schär", "Eberhard", "Zingg", "Howald", "Aebi", "Feldmann"
});
private static List<string> DoctorOrigins = new List<string>(new string[]
{
"SanktMonika", "DisneyWorld", "Hell", "Heaven"
});
private static List<string> Regions = new List<string>(new string[]
{
"SanktMonika", "DisneyWorld", "Hell", "Heaven"
});
private static List<string> Street = new List<string>(new string[]
{
"Rosenauweg", "Schessstrasse", "Hardstrasse", "Gehweg", "Bananastreet", "Moosweg", "Feldstrasse"
});
private static List<string> BirthDate = new List<string>(new string[]
{
"12991212", "20000112",
});
private static List<string> City = new List<string>(new string[]
{
"Meister", "Schär", "Eberhard", "Zingg", "Howald", "Aebi", "Feldmann"
});
// public static List<Patient> CreatePatients()
// {
//int Counter = Patients.Count();
//for (int i = 0; i < Counter; i++)
// foreach (var c in FirstNames)
// {
// for (int j = 0; j < 10; j++)
// {
// Patient patient = new Patient(
// FirstNames[Rnd.Next(1, FirstNames.Count())],
// LastNames[Rnd.Next(1, LastNames.Count())],
// BirthDate[Rnd.Next(1, BirthDate.Count())],
// Street[Rnd.Next(1, Street.Count())],
// City[Rnd.Next(1, City.Count())]);
// Patients.Add(patient);
// }
// }
// return Patients;
}
}