This commit is contained in:
parent
515d17df30
commit
e7838d2434
@ -18,7 +18,7 @@ namespace DataLoader
|
||||
{
|
||||
public partial class Loader
|
||||
{
|
||||
private Item AddStep(OleDbConnection cn, string StepType, string Textm, string Recid, string stpseq, string structtype, Item FromItem, DateTime dts, string userid, bool conv_caret, string pth, DocVersion docver, FormatInfo fmt,Item parentItem, int frType)
|
||||
private Item AddStep(OleDbConnection cn, string StepType, string Textm, string Recid, string stpseq, string structtype, Item FromItem, DateTime dts, string userid, bool conv_caret, string pth, DocVersion docver, FormatInfo fmt,Item parentItem, int frType, string seqRoTran)
|
||||
{
|
||||
//if (ProcNumber + "|" + stpseq == "082-002CD|A=S")
|
||||
// Console.WriteLine("here");
|
||||
@ -47,7 +47,8 @@ namespace DataLoader
|
||||
else
|
||||
stptext = TextConvert.ConvertText(Textm.Substring(0, tok), conv_caret);
|
||||
//string stpTextOrg = stptext;
|
||||
string seqcvt = TextConvert.ConvertSeq(stpseq);
|
||||
|
||||
string seqcvt = stpseq;
|
||||
|
||||
string newstptyp = null;
|
||||
bool ManualPagebreak = false;
|
||||
@ -85,7 +86,7 @@ namespace DataLoader
|
||||
if (tokrt > -1)
|
||||
{
|
||||
txtdirty = true;
|
||||
stptext = MigrateRos(cn, stptext, seqcvt, content, docver, conv_caret, ref rotype);
|
||||
stptext = MigrateRos(cn, stptext, seqRoTran, content, docver, conv_caret, ref rotype);
|
||||
stptext = stptext.TrimEnd(" ".ToCharArray());
|
||||
// if this is a table RO, then save a flag in the config
|
||||
isROTable = (rotype == 2);
|
||||
@ -94,7 +95,7 @@ namespace DataLoader
|
||||
if (tokrt > -1)
|
||||
{
|
||||
txtdirty = true;
|
||||
stptext = MigrateRos(cn, stptext, seqcvt, content, docver, conv_caret, ref rotype);
|
||||
stptext = MigrateRos(cn, stptext, seqRoTran, content, docver, conv_caret, ref rotype);
|
||||
stptext = stptext.TrimEnd(" ".ToCharArray());
|
||||
}
|
||||
|
||||
@ -109,7 +110,7 @@ namespace DataLoader
|
||||
if (tokrt > -1)
|
||||
{
|
||||
txtdirty = true;
|
||||
stptext = MigrateTrans(cn, stptext, seqcvt, content, pth);
|
||||
stptext = MigrateTrans(cn, stptext, seqRoTran, content, pth);
|
||||
stptext = stptext.TrimEnd(" ".ToCharArray());
|
||||
}
|
||||
//string fixStpText = FixStepText(stptext,content.Type);
|
||||
@ -139,17 +140,17 @@ namespace DataLoader
|
||||
migrationerrors = _ContentMigrationErrors[content.ContentID];
|
||||
content = content.Save();
|
||||
// check if already created thru new during transition migration...
|
||||
if (dicTrans_ItemIds.ContainsKey(ProcNumber + "|" + seqcvt))
|
||||
if (dicTrans_ItemIds.ContainsKey(ProcNumber + "|" + seqRoTran))
|
||||
{
|
||||
item = dicTrans_ItemIds[ProcNumber + "|" + seqcvt];
|
||||
item = dicTrans_ItemIds[ProcNumber + "|" + seqRoTran];
|
||||
item.MyPrevious = FromItem;
|
||||
item.MyContent = content;
|
||||
item.DTS = dts;
|
||||
item.UserID = userid;
|
||||
if (!item.IsSavable) ErrorRpt.ErrorReport(item);
|
||||
item = item.Save();
|
||||
dicTrans_ItemIds.Remove(ProcNumber + "|" + seqcvt);
|
||||
dicTrans_MigrationErrors.Remove(ProcNumber + "|" + seqcvt);
|
||||
dicTrans_ItemIds.Remove(ProcNumber + "|" + seqRoTran);
|
||||
dicTrans_MigrationErrors.Remove(ProcNumber + "|" + seqRoTran);
|
||||
}
|
||||
else
|
||||
item = Item.MakeItem(FromItem, content, content.DTS, content.UserID);
|
||||
@ -209,7 +210,7 @@ namespace DataLoader
|
||||
dicTrans_MigrationErrors[str].Add(item);
|
||||
}
|
||||
}
|
||||
dicTrans_ItemDone[ProcNumber + "|" + seqcvt] = item;
|
||||
dicTrans_ItemDone[ProcNumber + "|" + seqRoTran] = item;
|
||||
dicOldStepSequence[content] = seqcvt;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -452,7 +453,8 @@ namespace DataLoader
|
||||
Item item = AddStep(cn, drv["Type"].ToString()
|
||||
, (drv["textm"] == DBNull.Value ? drv["Text"].ToString() : drv["Textm"].ToString())
|
||||
, drv["Recid"].ToString(), drv["CStep"].ToString() + drv["CSequence"].ToString(), "S", FromItem // was str
|
||||
, GetDTS(drv["Date"].ToString(), drv["Time"].ToString()), drv["Initials"].ToString(), conv_caret, pth, docver, fmt, parentItem, frTypeParam);
|
||||
, GetDTS(drv["Date"].ToString(), drv["Time"].ToString()), drv["Initials"].ToString(), conv_caret, pth, docver, fmt, parentItem, frTypeParam
|
||||
, drv["Step"].ToString() + drv["CSequence"].ToString());
|
||||
|
||||
//Content cont = Content.MakeContent(null,(drv["textm"] == DBNull.Value ? drv["Text"].ToString() : drv["Textm"].ToString()),drv["Type"]+20000,null,null,
|
||||
// GetDTS(drv["Date"].ToString(), drv["Time"].ToString()), drv["Initials"].ToString());
|
||||
@ -502,12 +504,13 @@ namespace DataLoader
|
||||
FrItem = null;
|
||||
FrType = (3 + ("CNRST".IndexOf(sType)));
|
||||
}
|
||||
|
||||
itemc = AddStep(cn, drvs["Type"].ToString()
|
||||
, (drvs["textm"] == DBNull.Value ? drvs["Text"].ToString() : drvs["Textm"].ToString())
|
||||
, drv["Recid"].ToString(), drvs["CStep"].ToString() + drvs["CSequence"].ToString()
|
||||
, GetStructType(drvs["sequence"].ToString()), FrItem
|
||||
, GetDTS(drvs["Date"].ToString(), drvs["Time"].ToString()), drvs["Initials"].ToString(), conv_caret, pth, docver, fmt, itemp, FrType);
|
||||
|
||||
, GetDTS(drvs["Date"].ToString(), drvs["Time"].ToString()), drvs["Initials"].ToString(), conv_caret, pth, docver, fmt, itemp, FrType
|
||||
, drvs["Step"].ToString() + drvs["CSequence"].ToString());
|
||||
//if (FrType > 0 )
|
||||
//{
|
||||
// itemp.MyContent.ContentParts.Add(FrType, itemc);
|
||||
|
Loading…
x
Reference in New Issue
Block a user