This commit is contained in:
Kathy Ruffing 2012-04-11 10:39:49 +00:00
parent e01c1c387b
commit 4137af4bb8

View File

@ -169,6 +169,25 @@ namespace DataLoader
}
else
itm = Item.MakeItem(FromItem, cont, Dts, Userid);
// Check this section type versus the docstyleindex, i.e. that the docstyle was not of
// the same type of section as the data. For example, rgesmped.in has only 1 doc style
// and it WAS both step & doc when the section was added as a word doc, but the current
// rgesmped.in only supports step sections. The result was that there is Word content but
// a step docstyle.
//
// Identify this problem by putting out an error message & adding an annotation. The data
// will have to be fixed manually, i.e. go into sql server & change the format and Type to
// use a word section type.
if (needEntry && format.PlantFormat.DocStyles.DocStyleList[docstyleindx].IsStepSection)
{
frmMain.AddError("Conflicting section type (Word Section: {0}) & Document Style (Step Section type: {1})",
ProcNumber + ":" + Number + ":" + Title, format.PlantFormat.DocStyles.DocStyleList[docstyleindx].Name);
ItemAnnotation ia = itm.ItemAnnotations.Add(MigrationErrorType);
ia.SearchText = "Conflicting Section Type and Document Style";
ia.UserID = "Migration";
itm.Save();
}
if (missingDocFile)
{
ItemAnnotation ia = itm.ItemAnnotations.Add(MigrationErrorType);
@ -251,11 +270,6 @@ namespace DataLoader
}
private int GetDocStyleIndx(string dstyleindx, FormatInfo format, Item procitem, /* DocVersion docver,*/ string Number, string Title)
{
// get the format, if format is set, use it, otherwise walk
//if (format == null)
//{
//format = GetFormat(procitem, docver);
//}
int docstyle = LookupOldToNew(dstyleindx);
foreach (DocStyle ds in format.PlantFormat.DocStyles.DocStyleList)
{