This commit is contained in:
61
PROMS/DataLoader/DocVersions.cs
Normal file
61
PROMS/DataLoader/DocVersions.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
// ========================================================================
|
||||
// Copyright 2006 - Volian Enterprises, Inc. All rights reserved.
|
||||
// Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
// ------------------------------------------------------------------------
|
||||
// $Workfile: $ $Revision: $
|
||||
// $Author: $ $Date: $
|
||||
//
|
||||
// $History: $
|
||||
// ========================================================================
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Volian.CSLA.Library;
|
||||
|
||||
namespace DataLoader
|
||||
{
|
||||
public partial class frmLoader : Form
|
||||
{
|
||||
private Int32 MigrateDocVersion(string pth)
|
||||
{
|
||||
|
||||
Int32 iStructureID = 0;
|
||||
// Open connection
|
||||
OleDbConnection cn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pth + ";Extended Properties=dBase III;Persist Security Info=False");
|
||||
// load rofst (use it later)....
|
||||
rofst = new ROFST(pth + "\\ro.fst");
|
||||
// Migrate library documents
|
||||
MigrateLibDocs(cn, pth);
|
||||
// Initialize Dictionaries
|
||||
dicTrans_StrDone = new Dictionary<string, int>();
|
||||
dicTrans_StrIds = new Dictionary<string, int>();
|
||||
// Process Procedures
|
||||
iStructureID = MigrateProcedures(cn,pth);
|
||||
// Show any Missing Transtitons (i.e. Transitions which have not been processed)
|
||||
ShowMissingTransitions();
|
||||
log.InfoFormat("Completed Migration of {0}",pth);
|
||||
MessageBox.Show("Completed Migration of " + pth);
|
||||
rofst.Close();
|
||||
cn.Close();
|
||||
dicTrans_StrDone.Clear();
|
||||
dicTrans_StrDone = null;
|
||||
return iStructureID;
|
||||
}
|
||||
private Volian.CSLA.Library.VersionTypeEnum DocVersionType(string s)
|
||||
{
|
||||
if (s.EndsWith("approved")) return Volian.CSLA.Library.VersionTypeEnum.Approved;
|
||||
if (s.EndsWith("chgsht")) return Volian.CSLA.Library.VersionTypeEnum.Revision;
|
||||
if (s.EndsWith("tmpchg")) return Volian.CSLA.Library.VersionTypeEnum.Temporary;
|
||||
return Volian.CSLA.Library.VersionTypeEnum.WorkingDraft;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user