Use FormatInfo rather than Format object

This commit is contained in:
Rich
2009-10-08 14:24:34 +00:00
parent c5d2578ee9
commit 8804d367da
4 changed files with 38 additions and 32 deletions

View File

@@ -98,14 +98,16 @@ namespace DataLoader
myReader.Close();
}
Folder tmpfld = (Folder)parfld;
Format format = null;
FormatInfo format = null;
if (defPlantFmt != null && defPlantFmt != "")
{
format = GetFormat(defPlantFmt);
}
else
format = Format.Get(1);
DocVersion v = DocVersion.MakeDocVersion(tmpfld, (int)DocVersionType(vb.Path.ToLower()), thetitle, vb.Path.ToLower(), null, format, fld_cfg == null ? null : fld_cfg.ToString(), DateTime.Now, "Migration");
format = FormatInfo.Get(1);
DocVersion v;
using(Format fmt = format.Get())
v = DocVersion.MakeDocVersion(tmpfld, (int)DocVersionType(vb.Path.ToLower()), thetitle, vb.Path.ToLower(), null, fmt, fld_cfg == null ? null : fld_cfg.ToString(), DateTime.Now, "Migration");
tn.Tag = v;
MigrateDocVersion(v, false);
return (object)v;