Add separate counts for Errors, Warnings and Information

Cleanup memory after transition processing
Adjusted width of Error Count
Added memory usage to output
Added Stored Procedure GetJustFormat
Reduce Memory Use
Removed extra using statement
This commit is contained in:
Rich
2012-05-21 13:30:21 +00:00
parent 508a86a8ac
commit f5544b7053
9 changed files with 117 additions and 37 deletions

View File

@@ -170,7 +170,7 @@ namespace DataLoader
}
}
if (userid == null || userid == "") userid = "Migration";
Transition tr = null;
string results = null;
try
{
int isRange = 0;
@@ -178,15 +178,21 @@ namespace DataLoader
isRange = 1;
else if (itype == 2)
isRange = 2;
tr = Transition.New(fromCon, toItem, toItem2, isRange, itype, ci != null ? ci.ToString() : null, dts, userid);
//if (otranskey != null)
// tr.MyZTransition.Oldto = otranskey; // info to finish outside transition processing later
//else
tr.MyZTransition.Oldto = dr["OLDTO"].ToString();
if (!tr.IsSavable) ErrorRpt.ErrorReport(tr);
tr.Save();
if (migrationErrors.Count > 0)
_ContentMigrationErrors.Add(fromCon.ContentID, migrationErrors);
using (Transition tr = Transition.New(fromCon, toItem, toItem2, isRange, itype, ci != null ? ci.ToString() : null, dts, userid))
{
//if (otranskey != null)
// tr.MyZTransition.Oldto = otranskey; // info to finish outside transition processing later
//else
tr.MyZTransition.Oldto = dr["OLDTO"].ToString();
if (!tr.IsSavable) ErrorRpt.ErrorReport(tr);
tr.Save();
if (migrationErrors.Count > 0)
_ContentMigrationErrors.Add(fromCon.ContentID, migrationErrors);
if (toItem.ItemID == toItem2.ItemID && itype != 2)
results = string.Format(@"\v <START]\v0 (Resolved Transition Text)\v #Link:Transition:{0} {1} {2}[END>\v0 ", tr.TranType, tr.TransitionID, tr.ToID);
else
results = string.Format(@"\v <START]\v0 (Resolved Transition Text)\v #Link:TransitionRange:{0} {1} {2} {3}[END>\v0 ", tr.TranType, tr.TransitionID, tr.ToID, tr.RangeID);
}
}
catch (Exception ex)
{
@@ -194,11 +200,6 @@ namespace DataLoader
log.Error("Error addition transition record");
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
}
string results = null;
if (toItem.ItemID == toItem2.ItemID && itype != 2)
results = string.Format(@"\v <START]\v0 (Resolved Transition Text)\v #Link:Transition:{0} {1} {2}[END>\v0 ", tr.TranType, tr.TransitionID, tr.ToID);
else
results = string.Format(@"\v <START]\v0 (Resolved Transition Text)\v #Link:TransitionRange:{0} {1} {2} {3}[END>\v0 ", tr.TranType, tr.TransitionID, tr.ToID, tr.RangeID);
return results;
}