This commit is contained in:
John Jenko 2010-08-12 16:11:14 +00:00
parent 5d77b1aec4
commit bdc2d651e3

View File

@ -30,10 +30,14 @@ namespace DataLoader
private Dictionary<string, int> dicOldToNew; private Dictionary<string, int> dicOldToNew;
private Item AddSection(Item procitem, string Number, string Title, string SecType, DateTime Dts, string Userid, ConfigInfo ci, string stpseq, string fmt, int libdocid, string pth, Item FromItem, FormatInfo activeFormat) private Item AddSection(Item procitem, string Number, string Title, string SecType, DateTime Dts, string Userid, ConfigInfo ci, string stpseq, string fmt, int libdocid, string pth, Item FromItem, FormatInfo activeFormat)
{ {
//Console.WriteLine("before UpdateLabels");
frmMain.UpdateLabels(0, 1, 0); frmMain.UpdateLabels(0, 1, 0);
//Console.WriteLine("after UpdateLabels");
try try
{ {
//Console.WriteLine("before activeFormat");
FormatInfo format = activeFormat; FormatInfo format = activeFormat;
//Console.WriteLine("after activeFormat");
// Tie the section to format used, this will add the format xml if it doesn't exist in // Tie the section to format used, this will add the format xml if it doesn't exist in
// the database yet. Note that if there is no format at this level then none should // the database yet. Note that if there is no format at this level then none should
@ -302,6 +306,14 @@ namespace DataLoader
} }
return menustr; return menustr;
} }
private static Color _OverrideColor = Color.Red;
public static Color OverrideColor
{
get { return Loader._OverrideColor; }
set { Loader._OverrideColor = value; }
}
private Item MigrateSection(Item procitem, string procnum, OleDbConnection cn, DataRowView dr, DataTable dt, Item FromItem, bool isSubSection, string pth, DocVersion docver, FormatInfo activeFormat,Content cont) private Item MigrateSection(Item procitem, string procnum, OleDbConnection cn, DataRowView dr, DataTable dt, Item FromItem, bool isSubSection, string pth, DocVersion docver, FormatInfo activeFormat,Content cont)
{ {
Int32 thesectid = 0; Int32 thesectid = 0;
@ -463,7 +475,9 @@ namespace DataLoader
libDocid = dicLibDocRef[thekey]; libDocid = dicLibDocRef[thekey];
} }
} }
//Console.WriteLine("Before AddSection");
Item secitem = AddSection(procitem, num, title, stype, dts, init, ci, step + sequence, fmt, libDocid, pth, FromItem, sectFormat); Item secitem = AddSection(procitem, num, title, stype, dts, init, ci, step + sequence, fmt, libDocid, pth, FromItem, sectFormat);
//Console.WriteLine("After AddSection");
if (secitem == null) if (secitem == null)
throw (new Exception("Null parameter in AddSection")); throw (new Exception("Null parameter in AddSection"));
if (cont != null) if (cont != null)
@ -481,7 +495,7 @@ namespace DataLoader
{ {
using (DocumentInfo di = DocumentInfo.Get(secitem.MyContent.MyEntry.DocID)) using (DocumentInfo di = DocumentInfo.Get(secitem.MyContent.MyEntry.DocID))
{ {
MSWordToPDF.UpdateDocPdf(di, Color.Red); MSWordToPDF.UpdateDocPdf(di, OverrideColor);
} }
} }
} }
@ -582,4 +596,4 @@ namespace DataLoader
} }
} }
} }
} }