This commit is contained in:
parent
73830ed0e1
commit
8489c847b3
@ -62,14 +62,9 @@ namespace DataLoader
|
|||||||
DataRow dr = dt.Rows[instance];
|
DataRow dr = dt.Rows[instance];
|
||||||
string ROID = dr["ROID"].ToString();
|
string ROID = dr["ROID"].ToString();
|
||||||
RoUsage ro = RoUsage.MakeRoUsage(content, ROID, null, DateTime.Now, "Migration");
|
RoUsage ro = RoUsage.MakeRoUsage(content, ROID, null, DateTime.Now, "Migration");
|
||||||
rotxt.Append("\x15\\v RO\\v0 ");
|
string results = string.Format(@"{0}{1}\v #Link:ReferencedObject:{2} {3}\v0",
|
||||||
string val = rofst.GetRoValue(ROID.Substring(0, 12).ToUpper());
|
'\x15', rofst.GetRoValue(ROID.Substring(0, 12).ToUpper()), ro.ROUsageID, ROID);
|
||||||
rotxt.Append(val);
|
rotxt.Append(results);
|
||||||
rotxt.Append("\\v #");
|
|
||||||
rotxt.Append(ro.ROUsageID.ToString());
|
|
||||||
rotxt.Append(" ");
|
|
||||||
rotxt.Append(ROID);
|
|
||||||
rotxt.Append("\\v0 ");
|
|
||||||
instance++;
|
instance++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -72,15 +72,6 @@ namespace DataLoader
|
|||||||
}
|
}
|
||||||
DateTime dts = GetDTS(MakeDate(dti.Substring(0, 8).Trim()), dti.Substring(8, 5).Trim());
|
DateTime dts = GetDTS(MakeDate(dti.Substring(0, 8).Trim()), dti.Substring(8, 5).Trim());
|
||||||
|
|
||||||
//// if this is an Outside Transition, then decode the ToTrans to the procedure set path and
|
|
||||||
// // procedure number. This will be saved in the tr.MyZTransition.Oldto for now.
|
|
||||||
// // Then, after all the set are processed, we'll grab these and find the proper ITEM for
|
|
||||||
// // the transition reference.
|
|
||||||
// if (itype == 6) // Outside Transition
|
|
||||||
// {
|
|
||||||
// = ProcessOutSideTrans(cn, thekey, pth);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if it's in the dictionary of structure elements already migrated, just use this
|
// if it's in the dictionary of structure elements already migrated, just use this
|
||||||
// structure id, or if it's in the dictionary of structure elements that have
|
// structure id, or if it's in the dictionary of structure elements that have
|
||||||
// not been migrated but a record was created from this code, use it. Otherwise
|
// not been migrated but a record was created from this code, use it. Otherwise
|
||||||
@ -168,131 +159,13 @@ namespace DataLoader
|
|||||||
log.Error("Error addition transition record");
|
log.Error("Error addition transition record");
|
||||||
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
||||||
}
|
}
|
||||||
StringBuilder trtxt = new StringBuilder();
|
string results = null;
|
||||||
|
|
||||||
// the following is pre RTB link code, i.e. <token>{tranid {type toid (rangeid}}
|
|
||||||
trtxt.Append("\\v TRAN\\v0 (Resolved Transition Text)\\v ");
|
|
||||||
|
|
||||||
trtxt.Append(tr.TranType.ToString());
|
|
||||||
trtxt.Append(" ");
|
|
||||||
trtxt.Append(tr.TransitionID.ToString());
|
|
||||||
trtxt.Append(" ");
|
|
||||||
trtxt.Append(tr.ToID.ToString());
|
|
||||||
if (toItem.ItemID == toItem2.ItemID)
|
if (toItem.ItemID == toItem2.ItemID)
|
||||||
trtxt.Append("\\v0 ");
|
results = string.Format(@"(Resolved Transition Text)\v #Link:Transition:{0} {1} {2}\v0", tr.TranType, tr.TransitionID, tr.ToID);
|
||||||
else
|
else
|
||||||
{
|
results = string.Format(@"(Resolved Transition Text)\v #Link:TransitionRange:{0} {1} {2} {3}\v0", tr.TranType, tr.TransitionID, tr.ToID, tr.RangeID);
|
||||||
trtxt.Append(" ");
|
return results;
|
||||||
trtxt.Append(tr.RangeID.ToString());
|
|
||||||
trtxt.Append("\\v0 ");
|
|
||||||
}
|
}
|
||||||
//trtxt.Append("{");
|
|
||||||
//trtxt.Append(tr.TransitionID.ToString());
|
|
||||||
//trtxt.Append("{");
|
|
||||||
//trtxt.Append(tr.TranType.ToString());
|
|
||||||
//trtxt.Append(" ");
|
|
||||||
//trtxt.Append(tr.ToID.ToString());
|
|
||||||
//if (toItem.ItemID == toItem2.ItemID)
|
|
||||||
// trtxt.Append("}}");
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// trtxt.Append(" ");
|
|
||||||
// trtxt.Append(tr.RangeID.ToString());
|
|
||||||
// trtxt.Append("}}");
|
|
||||||
//}
|
|
||||||
|
|
||||||
return trtxt.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
//private bool pathsAreEqual(string setpth, string pth)
|
|
||||||
//{
|
|
||||||
// bool eql = false;
|
|
||||||
// string cpth = (pth.Substring(3)).ToUpper();
|
|
||||||
// string spth = setpth.ToUpper();
|
|
||||||
// eql = cpth.Equals(spth);
|
|
||||||
// if (!eql) // full path not equal, check for a partial path match
|
|
||||||
// {
|
|
||||||
// int idx = spth.LastIndexOf('\\');
|
|
||||||
// idx = spth.LastIndexOf('\\', idx - 1);
|
|
||||||
// spth = spth.Substring(idx);
|
|
||||||
// idx = cpth.LastIndexOf('\\');
|
|
||||||
// idx = cpth.LastIndexOf('\\', idx - 1);
|
|
||||||
// cpth = cpth.Substring(idx);
|
|
||||||
// eql = (cpth.Equals(spth));
|
|
||||||
// }
|
|
||||||
// return eql;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//private string ProcessOutSideTrans(OleDbConnection cn, string thekey, string pth)
|
|
||||||
//{
|
|
||||||
// string xtransstring = null;
|
|
||||||
// DataTable dt = null;
|
|
||||||
// DataSet ds = null;
|
|
||||||
// OleDbDataAdapter da = null;
|
|
||||||
|
|
||||||
// DataTable dt2 = null;
|
|
||||||
// DataSet ds2 = null;
|
|
||||||
// OleDbDataAdapter da2 = null;
|
|
||||||
|
|
||||||
// string tosetid = thekey.Substring(0, 8);
|
|
||||||
// string toprocid = thekey.Substring(8, 8);
|
|
||||||
|
|
||||||
// /// Get the path to the procedure set from the SETID
|
|
||||||
// string xtsetcmd = "SELECT * FROM [xtsetid] WHERE [SETID]='" + tosetid +"'";
|
|
||||||
// string xtproccmd = "SELECT * FROM [xtprocid] WHERE [SETID]='" + tosetid +"' AND [PROCID]='" + toprocid +"'";
|
|
||||||
|
|
||||||
// da = new OleDbDataAdapter(xtsetcmd, cn);
|
|
||||||
// da2 = new OleDbDataAdapter(xtproccmd, cn);
|
|
||||||
|
|
||||||
// // get xtsetid records.
|
|
||||||
// ds = new DataSet();
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// da.Fill(ds);
|
|
||||||
// dt = ds.Tables[0];
|
|
||||||
// dt.CaseSensitive = true;
|
|
||||||
// }
|
|
||||||
// catch (Exception ex)
|
|
||||||
// {
|
|
||||||
// log.Error("Error getting XTSETID");
|
|
||||||
// log.ErrorFormat("to number = {0}", thekey);
|
|
||||||
// log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
|
||||||
// //return textm;
|
|
||||||
// }
|
|
||||||
// DataRow dr = dt.Rows[0]; // there should be only one entry!
|
|
||||||
// string setpth = dr["Path"].ToString(); // this should be the path to the proc set!
|
|
||||||
|
|
||||||
// // get xtprocid records
|
|
||||||
// ds2 = new DataSet();
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// da2.Fill(ds2);
|
|
||||||
// dt2 = ds2.Tables[0];
|
|
||||||
// dt2.CaseSensitive = true;
|
|
||||||
// }
|
|
||||||
// catch (Exception ex)
|
|
||||||
// {
|
|
||||||
// log.Error("Error getting XTPROCID");
|
|
||||||
// log.ErrorFormat("to number = {0}", thekey);
|
|
||||||
// log.ErrorFormat("{0}\r\n\r\n{1}", ex.Message, ex.InnerException);
|
|
||||||
// //return textm;
|
|
||||||
// }
|
|
||||||
// DataRow dr2 = dt2.Rows[0]; // there should be only one entry!
|
|
||||||
// string procnum = dr2["Procnum"].ToString(); // this should be the procedure number!
|
|
||||||
|
|
||||||
// xtransstring = setpth + "\\" + procnum; // ex: VEHLP\PROCS\0POP05-EO00
|
|
||||||
|
|
||||||
// //if (pathsAreEqual(setpth, pth))
|
|
||||||
// //{
|
|
||||||
// // // Outside Transiton is to this procedure set (not really outsde)
|
|
||||||
// // // need to find the item id that references the proc number and title
|
|
||||||
// // // - find the setpth in the doc.version
|
|
||||||
// //}
|
|
||||||
// //else
|
|
||||||
// //return thekey; // is a true outside transition
|
|
||||||
|
|
||||||
// return xtransstring;
|
|
||||||
//}
|
|
||||||
|
|
||||||
private string MigrateTrans(OleDbConnection cn, string textm, string seqcvt, Content content, string pth)
|
private string MigrateTrans(OleDbConnection cn, string textm, string seqcvt, Content content, string pth)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user