public CreateStudyModel CreateEditStudyModel(int StudyID)
        {
            //Creates a CreateStudyModel containing information about the Study that should be edited.
            CreateStudyModel   cs   = new CreateStudyModel();
            ManageStudyHandler msh  = new ManageStudyHandler(new bachelordbContext());
            Study             study = msh.GetStudyDB(StudyID);
            Inclusioncriteria inc   = msh.GetInclusioncriteriaDB(StudyID);

            cs.currentStudy = new StudyModel()
            {
                Name    = study.Name, Abstract = study.Abstract, Description = study.Description, Duration = study.Duration, DateCreated = study.DateCreated, Location = study.Location,
                Isdraft = study.Isdraft, Pay = (int?)study.Pay, EligibilityRequirements = study.EligibilityRequirements, Preparation = study.Preparation, DirecetStudyLink = study.DirectStudyLink, IdStudy = study.IdStudy
            };
            cs.inclusioncriteria = new InclusioncriteriaModel()
            {
                IsMale = inc.Male, IsFemale = inc.Female, English = inc.English, MaxAge = inc.MaxAge, MinAge = inc.MinAge,
                IdInclusionCriteria = inc.IdInclusionCriteria, IdStudy = inc.IdStudy
            };

            return(cs);
        }
Beispiel #2
0
        public Inclusioncriteria GetInclusioncriteria(int id)
        {
            ManageStudyHandler msh = new ManageStudyHandler(new bachelordbContext());

            return(msh.GetInclusioncriteriaDB(id));
        }