This commit is contained in:
Kathy Ruffing 2008-10-03 11:22:46 +00:00
parent 4ea65e4bf6
commit 3635a5e403
9 changed files with 15 additions and 29 deletions

View File

@ -35,7 +35,6 @@ namespace DataLoader
public Item MigrateDocVersion(DocVersion docver, bool convertProcedures) public Item MigrateDocVersion(DocVersion docver, bool convertProcedures)
{ {
string pth = docver.Title; string pth = docver.Title;
// TODO: If set.dbf is missing or curset.dat is missing don't process it.
if (!File.Exists(pth + @"\set.dbf") || !File.Exists(pth + @"\curset.dat")) return null; // Open connection if (!File.Exists(pth + @"\set.dbf") || !File.Exists(pth + @"\curset.dat")) return null; // Open connection
OleDbConnection cn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pth + ";Extended Properties=dBase III;Persist Security Info=False"); OleDbConnection cn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pth + ";Extended Properties=dBase III;Persist Security Info=False");
if (convertProcedures) if (convertProcedures)

View File

@ -33,7 +33,7 @@ namespace DataLoader
string genmacdata = null; string genmacdata = null;
XmlDocument xd = null; XmlDocument xd = null;
string path = "e:\\fmtall\\" + format + "all.xml"; string path = "c:\\development\\fmtall\\" + format + "all.xml";
if (File.Exists(path)) if (File.Exists(path))
{ {
xd = new XmlDocument(); xd = new XmlDocument();
@ -44,7 +44,7 @@ namespace DataLoader
// Do we need genmac - only if non-subformat // Do we need genmac - only if non-subformat
if (!issub) if (!issub)
{ {
path = "e:\\genmacall\\" + format + ".svg"; path = "c:\\development\\genmacall\\" + format + ".svg";
if (File.Exists(path)) if (File.Exists(path))
{ {
XmlDocument xdg = new XmlDocument(); XmlDocument xdg = new XmlDocument();
@ -82,7 +82,7 @@ namespace DataLoader
// now loop through all files... If there is an _ in the name, it's a subformat // now loop through all files... If there is an _ in the name, it's a subformat
// (for example, AEP_00.xml) skip it in main loop, it's handled for each format. // (for example, AEP_00.xml) skip it in main loop, it's handled for each format.
DirectoryInfo di = new DirectoryInfo("e:\\fmtall"); DirectoryInfo di = new DirectoryInfo(@"c:\development\fmtall");
FileInfo[] fis = di.GetFiles("*.xml"); FileInfo[] fis = di.GetFiles("*.xml");
foreach (FileInfo fi in fis) foreach (FileInfo fi in fis)
@ -96,7 +96,7 @@ namespace DataLoader
// now see if there are any subformats associated with this, if so // now see if there are any subformats associated with this, if so
// add them here... // add them here...
DirectoryInfo sdi = new DirectoryInfo("e:\\fmtall"); DirectoryInfo sdi = new DirectoryInfo("c:\\development\\fmtall");
FileInfo[] sfis = di.GetFiles(fmtname+"_*.xml"); FileInfo[] sfis = di.GetFiles(fmtname+"_*.xml");
foreach (FileInfo sfi in sfis) foreach (FileInfo sfi in sfis)
{ {

View File

@ -107,20 +107,6 @@ namespace DataLoader
byte[] buf = new byte[l]; byte[] buf = new byte[l];
br.Read(buf, 0, (int)l); br.Read(buf, 0, (int)l);
bw.Write(buf, 0, (int)l); bw.Write(buf, 0, (int)l);
// TODO: Check with KBR to see if she needed read/write this way
// I can't remember.
//byte ac;
//bool done = false;
//while (done == false)
//{
// if (br.PeekChar() > 0)
// {
// ac = br.ReadByte();
// bw.Write(ac);
// }
// else
// done = true;
//}
br.Close(); br.Close();
fs.Close(); fs.Close();
bw.Close(); bw.Close();

View File

@ -107,9 +107,8 @@ namespace DataLoader
format = Format.Get(1); format = Format.Get(1);
DocVersion v = DocVersion.MakeDocVersion(tmpfld, (int)DocVersionType(vb.Path.ToLower()), thetitle, vb.Path.ToLower(), null, format, fld_cfg == null ? null : fld_cfg.ToString(), DateTime.Now, "Migration"); DocVersion v = DocVersion.MakeDocVersion(tmpfld, (int)DocVersionType(vb.Path.ToLower()), thetitle, vb.Path.ToLower(), null, format, fld_cfg == null ? null : fld_cfg.ToString(), DateTime.Now, "Migration");
tn.Tag = v; tn.Tag = v;
//TODO: load procedure set MigrateDocVersion(v, false);
MigrateDocVersion(v, false); return (object)v;
return (object)v;
} }
return 0; return 0;
} }

View File

@ -186,9 +186,9 @@ namespace DataLoader
{ {
if (_DocVersions == null) if (_DocVersions == null)
_DocVersions = DocVersionInfoList.Get(); _DocVersions = DocVersionInfoList.Get();
DocVersionInfo dvi = ExactMatch(path); //TODO: Look for an exact match of the paths. DocVersionInfo dvi = ExactMatch(path);
if (dvi == null) dvi = PartialMatch(path);//TODO: If none is found, look for a partial match. if (dvi == null) dvi = PartialMatch(path);
if (dvi != null) return FindItem(dvi, procnum);//TODO: Look for the Procedure number in the procedure list and return item that matches if (dvi != null) return FindItem(dvi, procnum);
return null; return null;
} }

View File

@ -129,12 +129,12 @@ namespace DataLoader
Item itm =null; Item itm =null;
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)// TODO: if convertProcedures == False - create item and content if (!convertProcedures || docver.VersionType != (int)VEPROMS.CSLA.Library.VersionTypeEnum.WorkingDraft)
{ {
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 // TODO: if convertProcedures == True - Find existing item. 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){

View File

@ -38,7 +38,6 @@ namespace DataLoader
private string AddTrans(OleDbConnection cn, Content fromCon, DataRow dr, DataRow dr2, string pth) private string AddTrans(OleDbConnection cn, Content fromCon, DataRow dr, DataRow dr2, string pth)
{ {
List<string> migrationErrors = new List<string>(); List<string> migrationErrors = new List<string>();
//TODO: ZTransitions tr.Oldto = dr["OLDTO"].ToString();
string thekey = dr["TONUMBER"].ToString() + "|" + dr["TOSEQUENCE"].ToString(); string thekey = dr["TONUMBER"].ToString() + "|" + dr["TOSEQUENCE"].ToString();
string dti = dr["DTI"].ToString().PadRight(18, ' '); string dti = dr["DTI"].ToString().PadRight(18, ' ');
string userid = dti.Substring(13, 5).Trim(); string userid = dti.Substring(13, 5).Trim();

View File

@ -154,7 +154,7 @@ namespace DataLoader
this.tbVesamPath.Name = "tbVesamPath"; this.tbVesamPath.Name = "tbVesamPath";
this.tbVesamPath.Size = new System.Drawing.Size(469, 22); this.tbVesamPath.Size = new System.Drawing.Size(469, 22);
this.tbVesamPath.TabIndex = 66; this.tbVesamPath.TabIndex = 66;
this.tbVesamPath.Text = "e:\\ve-proms\\vesam.opt"; this.tbVesamPath.Text = "c:\\16bit\\ve-proms\\vesam.opt";
// //
// btnVesam // btnVesam
// //

View File

@ -76,6 +76,9 @@ namespace DataLoader
//tbSource.Text = "G:\\vecal\\eops.bck"; // test link seq STP_LNK_SEQ //tbSource.Text = "G:\\vecal\\eops.bck"; // test link seq STP_LNK_SEQ
tbSource.Text = "G:\\vehlp\\procs";// G:\\vewcnckl\\ckl.prc - multiple change ids. tbSource.Text = "G:\\vehlp\\procs";// G:\\vewcnckl\\ckl.prc - multiple change ids.
break; break;
case "KATHY-VISTA":
tbSource.Text = @"c:\16bit\debug\vehlp\procs";// G:\\vewcnckl\\ckl.prc - multiple change ids.
break;
case "RHMDESKTOP": case "RHMDESKTOP":
//tbSource.Text = @"I:\UNZIPPED ACTIVE BASELINE DATA\vehlp\Procs"; // Sub-sections //tbSource.Text = @"I:\UNZIPPED ACTIVE BASELINE DATA\vehlp\Procs"; // Sub-sections
tbSource.Text = @"I:\veDATA\vehlp\Procs"; // Sub-sections tbSource.Text = @"I:\veDATA\vehlp\Procs"; // Sub-sections