This commit is contained in:
parent
d739a72c7b
commit
a9da618d54
@ -64,7 +64,7 @@ namespace DataLoader
|
|||||||
if (fixItems.Count > 0)
|
if (fixItems.Count > 0)
|
||||||
{
|
{
|
||||||
if (ci == null) ci = new ConfigInfo(null);
|
if (ci == null) ci = new ConfigInfo(null);
|
||||||
if (fixItems[0].Rev!= null && fixItems[0].Rev !="")ci.AddItem("Procedure", "Rev", fixItems[0].Rev);
|
if (fixItems[0].Rev != null && fixItems[0].Rev != "") ci.AddItem("Procedure", "Rev", fixItems[0].Rev);
|
||||||
if (fixItems[0].RevDate != null && fixItems[0].RevDate != "") ci.AddItem("Procedure", "RevDate", fixItems[0].RevDate);
|
if (fixItems[0].RevDate != null && fixItems[0].RevDate != "") ci.AddItem("Procedure", "RevDate", fixItems[0].RevDate);
|
||||||
if (fixItems[0].ReviewDate != null && fixItems[0].ReviewDate != "") ci.AddItem("Procedure", "ReviewDate", fixItems[0].ReviewDate);
|
if (fixItems[0].ReviewDate != null && fixItems[0].ReviewDate != "") ci.AddItem("Procedure", "ReviewDate", fixItems[0].ReviewDate);
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@ namespace DataLoader
|
|||||||
if (File.Exists(fname))
|
if (File.Exists(fname))
|
||||||
{
|
{
|
||||||
// if the dbt is bad, fix it.
|
// if the dbt is bad, fix it.
|
||||||
DbtOk(dr["entry"].ToString(),pth);
|
DbtOk(dr["entry"].ToString(), pth);
|
||||||
// See if there is PSI and if so, add it to the xml.
|
// See if there is PSI and if so, add it to the xml.
|
||||||
OleDbDataAdapter dapsi = new OleDbDataAdapter("select * from [" + dr["entry"] + "] where [STEP] is null", cn);
|
OleDbDataAdapter dapsi = new OleDbDataAdapter("select * from [" + dr["entry"] + "] where [STEP] is null", cn);
|
||||||
int handleBefore = HandleCount;
|
int handleBefore = HandleCount;
|
||||||
@ -112,7 +112,7 @@ namespace DataLoader
|
|||||||
{
|
{
|
||||||
msg += "\r\n\r\nCall Volian for support.";
|
msg += "\r\n\r\nCall Volian for support.";
|
||||||
}
|
}
|
||||||
if (!RunWithDB2K)throw new Exception(msg);
|
if (!RunWithDB2K) throw new Exception(msg);
|
||||||
}
|
}
|
||||||
dt = ds.Tables[0];
|
dt = ds.Tables[0];
|
||||||
|
|
||||||
@ -159,18 +159,20 @@ namespace DataLoader
|
|||||||
|
|
||||||
// can we save itm.ItemID in a dictionary of outside trans? ex: otrans("vehlp\procs\0POP05-EO00",itm.ItemID)?
|
// can we save itm.ItemID in a dictionary of outside trans? ex: otrans("vehlp\procs\0POP05-EO00",itm.ItemID)?
|
||||||
Content cont = null;
|
Content cont = null;
|
||||||
Item itm =null;
|
Item itm = null;
|
||||||
|
string dicNumber = dr["Number"].ToString();
|
||||||
string number = TextConvert.ConvertText(dr["Number"].ToString());
|
string number = TextConvert.ConvertText(dr["Number"].ToString());
|
||||||
frmMain.UpdateLabels(1, 0, 0);
|
frmMain.UpdateLabels(1, 0, 0);
|
||||||
if (!convertProcedures || (docver.VersionType != (int)VEPROMS.CSLA.Library.VersionTypeEnum.WorkingDraft && docver.VersionType != (int)VEPROMS.CSLA.Library.VersionTypeEnum.Approved))
|
if (!convertProcedures || (docver.VersionType != (int)VEPROMS.CSLA.Library.VersionTypeEnum.WorkingDraft && docver.VersionType != (int)VEPROMS.CSLA.Library.VersionTypeEnum.Approved))
|
||||||
{
|
{
|
||||||
cont = Content.New(number, TextConvert.ConvertText(dr["Title"].ToString(),do_cvt), 0, null, ci == null ? null : ci.ToString(), dts, userid);
|
cont = Content.New(number, TextConvert.ConvertText(dr["Title"].ToString(), do_cvt), 0, null, ci == null ? null : ci.ToString(), dts, userid);
|
||||||
itm = Item.MakeItem(FromItem, cont, dts, userid);
|
itm = Item.MakeItem(FromItem, cont, dts, userid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DocVersionInfo dvi = DocVersionInfo.Get(docver.VersionID);
|
DocVersionInfo dvi = DocVersionInfo.Get(docver.VersionID);
|
||||||
foreach(ItemInfo ii in dvi.Procedures){
|
foreach (ItemInfo ii in dvi.Procedures)
|
||||||
|
{
|
||||||
if (ii.MyContent.Number == number)
|
if (ii.MyContent.Number == number)
|
||||||
{
|
{
|
||||||
//Console.WriteLine(number);
|
//Console.WriteLine(number);
|
||||||
@ -184,6 +186,7 @@ namespace DataLoader
|
|||||||
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
|
||||||
{
|
{
|
||||||
|
dicTrans_ItemDone[dicNumber] = itm; // will be null if only doing procs & no sections, etc.
|
||||||
LoadSection(ds, da, dr["entry"].ToString());
|
LoadSection(ds, da, dr["entry"].ToString());
|
||||||
da.SelectCommand.CommandText = "select * from [" + dr["entry"] + "] where step not like ' ' and step not like '%~'";
|
da.SelectCommand.CommandText = "select * from [" + dr["entry"] + "] where step not like ' ' and step not like '%~'";
|
||||||
da.Fill(ds, "Steps");
|
da.Fill(ds, "Steps");
|
||||||
@ -230,7 +233,7 @@ namespace DataLoader
|
|||||||
{
|
{
|
||||||
//if (ProcNumber == "016-001") //"017-001") //"082-002AB")
|
//if (ProcNumber == "016-001") //"017-001") //"082-002AB")
|
||||||
// Console.WriteLine("016-001"); //("017-001"); //"082-002AB");
|
// Console.WriteLine("016-001"); //("017-001"); //"082-002AB");
|
||||||
SectItm = MigrateSection(parentitem, ProcNumber, cn, drw, ds.Tables["Steps"], SectItm, dicSecCount.Count > 0 ? true : false, pth, docver, activeFormat,addpart ? cont :null);
|
SectItm = MigrateSection(parentitem, ProcNumber, cn, drw, ds.Tables["Steps"], SectItm, dicSecCount.Count > 0 ? true : false, pth, docver, activeFormat, addpart ? cont : null);
|
||||||
addpart = false;
|
addpart = false;
|
||||||
// if no children, add first child (cont)
|
// if no children, add first child (cont)
|
||||||
//if (addpart)
|
//if (addpart)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user