This commit is contained in:
parent
9a386f7b2b
commit
7e648b560c
@ -58,7 +58,7 @@ namespace DataLoader
|
|||||||
nxml = xl[0];
|
nxml = xl[0];
|
||||||
if (nxml.GetType() != typeof(XmlElement))
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -64,7 +64,7 @@ namespace Utils
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
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;
|
return cfg;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ namespace Utils
|
|||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
if(br!=null) br.Close();
|
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();
|
fs.Close();
|
||||||
return cfg;
|
return cfg;
|
||||||
|
@ -31,10 +31,8 @@ namespace DataLoader
|
|||||||
// Open connection
|
// Open connection
|
||||||
OleDbConnection cn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pth + ";Extended Properties=dBase III;Persist Security Info=False");
|
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)....
|
// load rofst (use it later)....
|
||||||
Database.LogInfoFormat("Before ROFST");
|
|
||||||
rofst = new ROFST(pth + "\\ro.fst");
|
rofst = new ROFST(pth + "\\ro.fst");
|
||||||
// Migrate library documents
|
// Migrate library documents
|
||||||
Database.LogInfoFormat("Before MigrateLibDocs");
|
|
||||||
MigrateLibDocs(cn, pth);
|
MigrateLibDocs(cn, pth);
|
||||||
// Initialize Dictionaries
|
// Initialize Dictionaries
|
||||||
dicTrans_ItemDone = new Dictionary<string, Item>();
|
dicTrans_ItemDone = new Dictionary<string, Item>();
|
||||||
|
@ -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);
|
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);
|
Item itm = Item.MakeItem(FromItem, cont, dts, userid);
|
||||||
frmMain.UpdateLabels(1, 0, 0);
|
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);
|
OleDbDataAdapter da = new OleDbDataAdapter("select * from [" + dr["entry"] + "] where sequence like ' %'", cn);
|
||||||
try
|
try
|
||||||
|
@ -37,7 +37,8 @@ namespace DataLoader
|
|||||||
private FolderTreeNode _topnode;
|
private FolderTreeNode _topnode;
|
||||||
private bool UseVeTree = false;
|
private bool UseVeTree = false;
|
||||||
#region Log4Net
|
#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
|
#endregion
|
||||||
private Loader ldr;
|
private Loader ldr;
|
||||||
public bool cbSaveDocChecked { get { return cbSaveDoc.Checked; } }
|
public bool cbSaveDocChecked { get { return cbSaveDoc.Checked; } }
|
||||||
@ -64,7 +65,7 @@ namespace DataLoader
|
|||||||
|
|
||||||
public frmLoader()
|
public frmLoader()
|
||||||
{
|
{
|
||||||
ldr = new Loader(log, this);
|
ldr = new Loader(_MyLog, this);
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
lblTime.Tag = DateTime.Now;
|
lblTime.Tag = DateTime.Now;
|
||||||
switch (SystemInformation.ComputerName.ToUpper())
|
switch (SystemInformation.ComputerName.ToUpper())
|
||||||
@ -190,7 +191,6 @@ namespace DataLoader
|
|||||||
if (vi.Title.ToUpper() == tbSource.Text.ToUpper())
|
if (vi.Title.ToUpper() == tbSource.Text.ToUpper())
|
||||||
{
|
{
|
||||||
v = DocVersion.Get(vi.VersionID);
|
v = DocVersion.Get(vi.VersionID);
|
||||||
Database.LogInfoFormat("Before MigrateDocVersion");
|
|
||||||
Item itm = ldr.MigrateDocVersion(v);
|
Item itm = ldr.MigrateDocVersion(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -216,7 +216,7 @@ namespace DataLoader
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
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);
|
//Database.LoggingInfo = (pbProc.Value > 153 && pbSect.Value > 11 && pbStep.Value > 61);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user