Example #1
0
        public Medicine(StructMedicine structMedicine_, ReimbursedMedicine reimbursedMedicine_)
            : base(structMedicine_.Name, structMedicine_.Type, structMedicine_.Price, structMedicine_.AgeRestrictions, structMedicine_.Intended, structMedicine_.Composition, structMedicine_.Comments)
        {
            reimbursedMedicine = (ReimbursedMedicine)reimbursedMedicine_.Clone();

            replacements = new ObservableCollection <Medicine>();

            GuidMed = Guid.NewGuid();
        }
Example #2
0
        public static void AddRandomMedicineToDatabase(Database database)
        {
            string nameMed = RandomText(3, 20);

            while (Regex.IsMatch(nameMed, "^[^ ].*$") == false)
            {
                nameMed = RandomText(3, 20);
            }


            StructMedicine     sMed = new StructMedicine(nameMed, RandomText(0, 15), RandomPrice(1000), rnd.Next(80), RandomText(0, 200), RandomText(0, 200), RandomText(0, 200));
            ReimbursedMedicine rMed = new ReimbursedMedicine(RandomPrice(1000), RandomLevelOfFunding());

            database.AddMedicine(new Medicine(sMed, rMed));
        }