new settings to control conversion of approved data
fixed handling of this set only deleted developer mode add master slave menu item (under development) add loading of approved data to complete processing remove background double-click event handler added menu item for loading approved data added menu item for master slave (under development) added stored procedures and functions removed from BuildVEPROMS.sql added purging of tables to support master slave (under development)
This commit is contained in:
@@ -320,14 +320,13 @@ namespace DataLoader
|
||||
}
|
||||
if (success)
|
||||
{
|
||||
bool allSets = !_DeveloperMode || !MySettings.OnlyThisSet;
|
||||
TimeSpan ts = new TimeSpan();
|
||||
DocVersionInfoList vl = DocVersionInfoList.Get();
|
||||
DocVersion v = null;
|
||||
MyInfo = "Computer Name: " + SystemInformation.ComputerName.ToUpper();
|
||||
foreach (DocVersionInfo vi in vl)
|
||||
{
|
||||
if (allSets || (MySettings.OnlyThisSet && vi.Title.ToUpper() == MySettings.ProcedureSetPath.ToUpper())) // is this the procedure set we want to convert?
|
||||
if (!MySettings.OnlyThisSet || (vi.Title.ToUpper() == MySettings.ProcedureSetPath.ToUpper())) // is this the procedure set we want to convert?
|
||||
{
|
||||
v = DocVersion.Get(vi.VersionID);
|
||||
Status = "Load " + v.Title + " - " + v.Name;
|
||||
@@ -356,7 +355,7 @@ namespace DataLoader
|
||||
}
|
||||
}
|
||||
|
||||
private void RunScript(string scriptName, string dbName)
|
||||
public void RunScript(string scriptName, string dbName)
|
||||
{
|
||||
Status = String.Format("Running Script '{0}'", scriptName);
|
||||
string script = GetScript(scriptName);
|
||||
@@ -520,6 +519,8 @@ namespace DataLoader
|
||||
MySettings.Phase3Suffix = Properties.Settings.Default.Phase3;
|
||||
MySettings.FormatFolder = Properties.Settings.Default.FormatFolder;
|
||||
MySettings.GenMacFolder = Properties.Settings.Default.GenMacFolder;
|
||||
MySettings.LoadApproved = Properties.Settings.Default.LoadApproved;
|
||||
MySettings.Phase4Suffix = Properties.Settings.Default.Phase4;
|
||||
|
||||
string validity = MySettings.ValidityCheck;
|
||||
if (validity != "")
|
||||
@@ -573,6 +574,8 @@ namespace DataLoader
|
||||
Properties.Settings.Default.Phase3 = MySettings.Phase3Suffix;
|
||||
Properties.Settings.Default.FormatFolder = MySettings.FormatFolder;
|
||||
Properties.Settings.Default.GenMacFolder = MySettings.GenMacFolder;
|
||||
Properties.Settings.Default.LoadApproved = MySettings.LoadApproved;
|
||||
Properties.Settings.Default.Phase4 = MySettings.Phase4Suffix;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
private void frmLoader_Load(object sender, EventArgs e)
|
||||
@@ -604,20 +607,6 @@ namespace DataLoader
|
||||
{
|
||||
Status = args.MyStatus;
|
||||
}
|
||||
private bool _DeveloperMode = false;
|
||||
private void ToggleDeveloperMode()
|
||||
{
|
||||
DialogResult dr = MessageBox.Show((_DeveloperMode)?"Make the User Interface Less Confusing?":"Make the User Interface More Confusing?", "DataLoader UI", MessageBoxButtons.YesNo,MessageBoxIcon.Question);
|
||||
if (dr == DialogResult.Yes)
|
||||
{
|
||||
_DeveloperMode = !_DeveloperMode;
|
||||
}
|
||||
}
|
||||
|
||||
private void sc_Panel1_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
ToggleDeveloperMode();
|
||||
}
|
||||
private bool _DidLogPathCheck = false;
|
||||
//private string _LogFilePath = "";
|
||||
|
||||
@@ -725,7 +714,16 @@ namespace DataLoader
|
||||
//Phase 4 - Convert to Approval Version
|
||||
ConvertToApproval();
|
||||
mb.Append("Conversion to Approval Complete");
|
||||
Status = "Backing up Phase 4 Data";
|
||||
if (MySettings.LoadApproved)
|
||||
{
|
||||
Status = "Backing up Phase 4 Data";
|
||||
Backup("_" + MySettings.Phase4Suffix);
|
||||
mb.Append("Phase 4 Backup Complete");
|
||||
//Phase 5 - Load Approved Data
|
||||
LoadApprovedData();
|
||||
mb.Append("Conversion of Approved Data Complete");
|
||||
}
|
||||
Status = "Backing up Data";
|
||||
Backup("");
|
||||
mb.Append("Backup Complete");
|
||||
Status = "Processing Complete";
|
||||
@@ -766,6 +764,25 @@ namespace DataLoader
|
||||
ProcessTime = DateTime.Now;
|
||||
ConvertToApproval();
|
||||
}
|
||||
private void load16BitApprovalToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
LoadApprovedData();
|
||||
}
|
||||
|
||||
private void LoadApprovedData()
|
||||
{
|
||||
Status = "Converting 16-Bit Approved Data";
|
||||
Database.VEPROMS_Connection = MySettings.ConnectionString.Replace("{DBName}", MySettings.DBName);
|
||||
bool ok = ldr.BuildApprovedRevision();
|
||||
Status = "Conversion " + (ok ? "Succeeded" : "Failed");
|
||||
}
|
||||
private void scopesApplicabilitiesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Status = "Building Scopes and Applicabilities";
|
||||
Database.VEPROMS_Connection = MySettings.ConnectionString.Replace("{DBName}", MySettings.DBName);
|
||||
bool ok = ldr.BuildScopeApplicability();
|
||||
Status = Status + " " + (ok ? "Succeeded" : "Failed");
|
||||
}
|
||||
#endregion
|
||||
#region Settings Menu Items
|
||||
private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
@@ -803,6 +820,7 @@ namespace DataLoader
|
||||
btnConvertSelected_Click(this, new EventArgs());
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
public class MessageBuilder
|
||||
{
|
||||
|
Reference in New Issue
Block a user