示例#1
0
 public static void ExportGroup(EDOConfig config, GroupVM group, List<StudyUnitVM> studyUnits)
 {
     string path = IOUtils.QuerySavePathName(Resources.GroupExport, null, DDI_GROUP_FILTER, true);
     if (string.IsNullOrEmpty(path))
     {
         return;
     }
     DDI3Writer writer = new DDI3Writer(config);
     writer.WriteGroup(path, group, studyUnits);
     DDI3Reader.Validate(path);
 }
示例#2
0
 public static void ExportStudyUnit(EDOConfig config, StudyUnitVM studyUnit)
 {
     FileDialogResult result = IOUtils.QuerySavePathNameEx(string.Format(Resources.StudyUnitExport, studyUnit.Title), null, DDI_FILE_FILTER, true);
     if (result == null)
     {
         return;
     }
     if (result.FilterIndex == DDI3_FILTER_INDEX)
     {
         DDI3Writer writer = new DDI3Writer(config);
         writer.WriteStudyUnit(result.FileName, studyUnit);
         DDI3Reader.Validate(result.FileName);
     }
     else if (result.FilterIndex == DDI2_FILTER_INDEX)
     {
         DDI2Writer writer = new DDI2Writer(config);
         writer.WriteCodebook(result.FileName, studyUnit);
         DDI2Reader.Validate(result.FileName);
     }
 }