This commit is contained in:
Kathy Ruffing 2007-12-05 13:12:16 +00:00
parent 9a386f7b2b
commit 7e648b560c
5 changed files with 7 additions and 10 deletions

View File

@ -58,7 +58,7 @@ namespace DataLoader
nxml = xl[0];
if (nxml.GetType() != typeof(XmlElement))
{
frmLoader.log.ErrorFormat("Invalid xml element type when migrating config data - element = {0}, name = {1} , value = {2}", ename, aname, avalue);
frmLoader._MyLog.ErrorFormat("Invalid xml element type when migrating config data - element = {0}, name = {1} , value = {2}", ename, aname, avalue);
return false;
}
break;

View File

@ -64,7 +64,7 @@ namespace Utils
}
catch (Exception e)
{
DataLoader.frmLoader.log.ErrorFormat("Error migrating {0} Curset.dat, error = {1}", PathName, e.Message);
DataLoader.frmLoader._MyLog.ErrorFormat("Error migrating {0} Curset.dat, error = {1}", PathName, e.Message);
return cfg;
}
@ -104,7 +104,7 @@ namespace Utils
catch(Exception e)
{
if(br!=null) br.Close();
DataLoader.frmLoader.log.ErrorFormat("Error migrating {0} Curset.dat, error = {1}", PathName, e.Message);
DataLoader.frmLoader._MyLog.ErrorFormat("Error migrating {0} Curset.dat, error = {1}", PathName, e.Message);
}
fs.Close();
return cfg;

View File

@ -31,10 +31,8 @@ namespace DataLoader
// Open connection
OleDbConnection cn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pth + ";Extended Properties=dBase III;Persist Security Info=False");
// load rofst (use it later)....
Database.LogInfoFormat("Before ROFST");
rofst = new ROFST(pth + "\\ro.fst");
// Migrate library documents
Database.LogInfoFormat("Before MigrateLibDocs");
MigrateLibDocs(cn, pth);
// Initialize Dictionaries
dicTrans_ItemDone = new Dictionary<string, Item>();

View File

@ -121,7 +121,6 @@ namespace DataLoader
Content cont = Content.New(TextConvert.ConvertText(dr["Number"].ToString()), TextConvert.ConvertText(dr["Title"].ToString(),do_cvt), 0, null, ci == null ? null : ci.ToString(), dts, userid);
Item itm = Item.MakeItem(FromItem, cont, dts, userid);
frmMain.UpdateLabels(1, 0, 0);
Database.LogInfoFormat("Processing Procedure [{0}] - [{1}] - {2} - {3}", frmMain.pbProcValue, dr["entry"], cont.Number, cont.Text);
OleDbDataAdapter da = new OleDbDataAdapter("select * from [" + dr["entry"] + "] where sequence like ' %'", cn);
try

View File

@ -37,7 +37,8 @@ namespace DataLoader
private FolderTreeNode _topnode;
private bool UseVeTree = false;
#region Log4Net
public static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
//public static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#endregion
private Loader ldr;
public bool cbSaveDocChecked { get { return cbSaveDoc.Checked; } }
@ -64,7 +65,7 @@ namespace DataLoader
public frmLoader()
{
ldr = new Loader(log, this);
ldr = new Loader(_MyLog, this);
InitializeComponent();
lblTime.Tag = DateTime.Now;
switch (SystemInformation.ComputerName.ToUpper())
@ -190,7 +191,6 @@ namespace DataLoader
if (vi.Title.ToUpper() == tbSource.Text.ToUpper())
{
v = DocVersion.Get(vi.VersionID);
Database.LogInfoFormat("Before MigrateDocVersion");
Item itm = ldr.MigrateDocVersion(v);
}
}
@ -216,7 +216,7 @@ namespace DataLoader
}
catch (Exception ex)
{
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
_MyLog.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
}
}
//Database.LoggingInfo = (pbProc.Value > 153 && pbSect.Value > 11 && pbStep.Value > 61);