Removed Debug Print
Moved code to add sections to Procedure parts Moved code to add steps to Section parts Moved code to add steps to Step parts Changed Debug Print Fixed a Format Flag conversion DontBreakOptEquipmentList Changed GetItemFont so that parent items would not be left in the cache Changed AddIncludedStepNumber to allow for ranges to sub levels. Added a array reference to StepDataList by index.
This commit is contained in:
@@ -17,7 +17,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)
|
||||
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)
|
||||
{
|
||||
//if (ProcNumber + "|" + stpseq == "082-002CD|A=S")
|
||||
// Console.WriteLine("here");
|
||||
@@ -133,6 +133,13 @@ namespace DataLoader
|
||||
else
|
||||
item = Item.MakeItem(FromItem, content, content.DTS, content.UserID);
|
||||
|
||||
if (frType > 0)
|
||||
{
|
||||
parentItem.MyContent.ContentParts.Add(frType, item);
|
||||
if (!parentItem.MyContent.IsSavable) ErrorRpt.ErrorReport(parentItem.MyContent);
|
||||
parentItem.MyContent.Save();
|
||||
}
|
||||
|
||||
// Remove styles that user entered but are automatically done via the format
|
||||
string tstr = null;
|
||||
using (ItemInfo myInfo = item.MyItemInfo) // do this so that ItemInfo doesn't stay in cashe
|
||||
@@ -336,7 +343,7 @@ namespace DataLoader
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
private Item MigrateStep(OleDbConnection cn, DataTable dt, DataRowView drv, Item FromItem, bool conv_caret, string pth, DocVersion docver, FormatInfo fmt)
|
||||
private Item MigrateStep(OleDbConnection cn, DataTable dt, DataRowView drv, Item FromItem, bool conv_caret, string pth, DocVersion docver, FormatInfo fmt, Item parentItem, int frTypeParam)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -344,7 +351,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);
|
||||
, GetDTS(drv["Date"].ToString(), drv["Time"].ToString()), drv["Initials"].ToString(), conv_caret, pth, docver, fmt, parentItem, frTypeParam);
|
||||
|
||||
//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());
|
||||
//Item item = Item.MakeItem(FromItem, cont, cont.DTS, cont.UserID);
|
||||
@@ -397,14 +405,14 @@ namespace DataLoader
|
||||
, (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);
|
||||
, GetDTS(drvs["Date"].ToString(), drvs["Time"].ToString()), drvs["Initials"].ToString(), conv_caret, pth, docver, fmt, itemp, FrType);
|
||||
|
||||
if (FrType > 0 )
|
||||
{
|
||||
itemp.MyContent.ContentParts.Add(FrType, itemc);
|
||||
if (!itemp.MyContent.IsSavable) ErrorRpt.ErrorReport(itemp.MyContent);
|
||||
itemp.MyContent.Save();
|
||||
}
|
||||
//if (FrType > 0 )
|
||||
//{
|
||||
// itemp.MyContent.ContentParts.Add(FrType, itemc);
|
||||
// if (!itemp.MyContent.IsSavable) ErrorRpt.ErrorReport(itemp.MyContent);
|
||||
// itemp.MyContent.Save();
|
||||
//}
|
||||
dicStr[sType] = itemc;
|
||||
dicStruct[drvs["CSequence"].ToString()] = new Dictionary<string, Item>();
|
||||
dicStep[drvs["CSequence"].ToString()] = itemc;
|
||||
|
Reference in New Issue
Block a user