public Doctor Generate(bool T1_TIME)
        {
            string title  = RandomTitle();
            int    minAge = titles[title];

            Doctor doctor = new Doctor(pg.Generate(minAge));

            doctor.Title           = title;
            doctor.Specjalizations = RandomSpecialization();
            doctor.Cabinet         = RandomCabinet();

            int number = random.Next(1000);

            if (T1_TIME)
            {
                doctor.DateOfEmployment = RandomDateOfEmployment_T1();

                if (number >= 100 && number <= 300)
                {
                    doctor.DateOfDissmiss = RandomDateOfDissmiss(doctor.DateOfEmployment, endDateOfEmploy_T1);
                    ResourceManager.FreeDoctorsCabinet[doctor.Cabinet] = true;
                }
            }
            else
            {
                doctor.DateOfEmployment = RandomDateOfEmployment_T2();
                if (number >= 100 && number <= 200)
                {
                    doctor.DateOfDissmiss = RandomDateOfDissmiss(doctor.DateOfEmployment, endDateOfEmploy_T2);
                    ResourceManager.FreeDoctorsCabinet[doctor.Cabinet] = true;
                }
            }

            return(doctor);
        }
示例#2
0
        public Patient Generate()
        {
            Patient patient = new Patient(pg.Generate());

            patient.Street     = RandomStreet();
            patient.HouseNuber = random.Next(1, 800);
            patient.ZipCode    = RandomZipCode();
            patient.City       = RandomCity();

            return(patient);
        }