Exemplo n.º 1
0
        public static void ExportQuestionnaire(EDOConfig config, StudyUnitVM studyUnit)
        {
            ControlConstructSchemeVM controlConstructScheme = null;

            if (studyUnit.ControlConstructSchemes.Count > 1)
            {
                SelectObjectWindowVM <ControlConstructSchemeVM> vm = new SelectObjectWindowVM <ControlConstructSchemeVM>(studyUnit.ControlConstructSchemes);
                SelectObjectWindow window = new SelectObjectWindow(vm);
                controlConstructScheme = SelectObjectWindow.Select(Resources.SelectOrder, vm) as ControlConstructSchemeVM; //Select Sequence
            }
            else if (studyUnit.ControlConstructSchemes.Count == 1)
            {
                controlConstructScheme = studyUnit.ControlConstructSchemes[0];
            }
            if (controlConstructScheme == null)
            {
                return;
            }
            string path = IOUtils.QuerySavePathName(Resources.ExportQuestionnair + ": " + controlConstructScheme.Title, null, QUESTIONNAIRE_FILTER, true);

            if (string.IsNullOrEmpty(path))
            {
                return;
            }
            try
            {
                QuestionnaireWriter writer = new QuestionnaireWriter(config, controlConstructScheme);
                writer.Write(path);
            }
            catch (Exception ex)
            {
                EDOUtils.ShowUnexpectedError(ex);
            }
        }
Exemplo n.º 2
0
 public bool IsDefaultControlConstructScheme(ControlConstructSchemeVM scheme)
 {
     return(studyUnit.DefaultControlConstructSchemeId == scheme.Id);
 }
Exemplo n.º 3
0
 public QuestionnaireWriter(EDOConfig config, ControlConstructSchemeVM controlConstructScheme)
 {
     this.config = config;
     this.controlConstructScheme = controlConstructScheme;
 }
Exemplo n.º 4
0
 public ChartWindowVM(ControlConstructSchemeVM controlConstructScheme)
 {
     this.controlConstructScheme = controlConstructScheme;
 }
Exemplo n.º 5
0
 public ChartWindowVM(ControlConstructSchemeVM controlConstructScheme)
 {
     this.controlConstructScheme = controlConstructScheme;
 }