Added logic to allow a merge of 16-bit data into a 32-bit database. Also tried to add an update formats for all database, but isn’t working yet, so I commented the logic out for now.

This commit is contained in:
John Jenko 2013-06-21 12:23:31 +00:00
parent 3c479b08ba
commit 5166867b4a
2 changed files with 133 additions and 63 deletions

View File

@ -73,6 +73,7 @@ namespace DataLoader
this.convertDbfSelectedInTreeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.convertDbfSelectedInTreeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.fixAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fixAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.approvalDatabasesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.approvalDatabasesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.updateFormatsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.sc.Panel1.SuspendLayout(); this.sc.Panel1.SuspendLayout();
this.sc.Panel2.SuspendLayout(); this.sc.Panel2.SuspendLayout();
this.sc.SuspendLayout(); this.sc.SuspendLayout();
@ -83,8 +84,8 @@ namespace DataLoader
// sc // sc
// //
this.sc.Dock = System.Windows.Forms.DockStyle.Fill; this.sc.Dock = System.Windows.Forms.DockStyle.Fill;
this.sc.Location = new System.Drawing.Point(0, 24); this.sc.Location = new System.Drawing.Point(0, 28);
this.sc.Margin = new System.Windows.Forms.Padding(2); this.sc.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.sc.Name = "sc"; this.sc.Name = "sc";
this.sc.Orientation = System.Windows.Forms.Orientation.Horizontal; this.sc.Orientation = System.Windows.Forms.Orientation.Horizontal;
// //
@ -104,19 +105,17 @@ namespace DataLoader
// //
this.sc.Panel2.BackColor = System.Drawing.SystemColors.Control; this.sc.Panel2.BackColor = System.Drawing.SystemColors.Control;
this.sc.Panel2.Controls.Add(this.tv); this.sc.Panel2.Controls.Add(this.tv);
this.sc.Size = new System.Drawing.Size(664, 370); this.sc.Size = new System.Drawing.Size(885, 457);
this.sc.SplitterDistance = 135; this.sc.SplitterDistance = 166;
this.sc.SplitterWidth = 3;
this.sc.TabIndex = 46; this.sc.TabIndex = 46;
// //
// lblCurSetFolder // lblCurSetFolder
// //
this.lblCurSetFolder.AutoSize = true; this.lblCurSetFolder.AutoSize = true;
this.lblCurSetFolder.ForeColor = System.Drawing.Color.Blue; this.lblCurSetFolder.ForeColor = System.Drawing.Color.Blue;
this.lblCurSetFolder.Location = new System.Drawing.Point(177, 97); this.lblCurSetFolder.Location = new System.Drawing.Point(236, 119);
this.lblCurSetFolder.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblCurSetFolder.Name = "lblCurSetFolder"; this.lblCurSetFolder.Name = "lblCurSetFolder";
this.lblCurSetFolder.Size = new System.Drawing.Size(16, 13); this.lblCurSetFolder.Size = new System.Drawing.Size(20, 17);
this.lblCurSetFolder.TabIndex = 75; this.lblCurSetFolder.TabIndex = 75;
this.lblCurSetFolder.Text = "..."; this.lblCurSetFolder.Text = "...";
this.lblCurSetFolder.Visible = false; this.lblCurSetFolder.Visible = false;
@ -124,10 +123,9 @@ namespace DataLoader
// lblProcessing // lblProcessing
// //
this.lblProcessing.AutoSize = true; this.lblProcessing.AutoSize = true;
this.lblProcessing.Location = new System.Drawing.Point(7, 97); this.lblProcessing.Location = new System.Drawing.Point(9, 119);
this.lblProcessing.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblProcessing.Name = "lblProcessing"; this.lblProcessing.Name = "lblProcessing";
this.lblProcessing.Size = new System.Drawing.Size(165, 13); this.lblProcessing.Size = new System.Drawing.Size(221, 17);
this.lblProcessing.TabIndex = 74; this.lblProcessing.TabIndex = 74;
this.lblProcessing.Text = "Processing Procedure Set Folder:"; this.lblProcessing.Text = "Processing Procedure Set Folder:";
this.lblProcessing.Visible = false; this.lblProcessing.Visible = false;
@ -135,8 +133,7 @@ namespace DataLoader
// lblTime // lblTime
// //
this.lblTime.BackColor = System.Drawing.SystemColors.ButtonShadow; this.lblTime.BackColor = System.Drawing.SystemColors.ButtonShadow;
this.lblTime.Location = new System.Drawing.Point(7, 67); this.lblTime.Location = new System.Drawing.Point(9, 82);
this.lblTime.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblTime.Name = "lblTime"; this.lblTime.Name = "lblTime";
this.lblTime.Size = new System.Drawing.Size(142, 20); this.lblTime.Size = new System.Drawing.Size(142, 20);
this.lblTime.TabIndex = 58; this.lblTime.TabIndex = 58;
@ -168,8 +165,7 @@ namespace DataLoader
// lblStep // lblStep
// //
this.lblStep.BackColor = System.Drawing.SystemColors.ButtonShadow; this.lblStep.BackColor = System.Drawing.SystemColors.ButtonShadow;
this.lblStep.Location = new System.Drawing.Point(7, 47); this.lblStep.Location = new System.Drawing.Point(9, 58);
this.lblStep.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblStep.Name = "lblStep"; this.lblStep.Name = "lblStep";
this.lblStep.Size = new System.Drawing.Size(142, 20); this.lblStep.Size = new System.Drawing.Size(142, 20);
this.lblStep.TabIndex = 49; this.lblStep.TabIndex = 49;
@ -177,8 +173,7 @@ namespace DataLoader
// lblSection // lblSection
// //
this.lblSection.BackColor = System.Drawing.SystemColors.ButtonShadow; this.lblSection.BackColor = System.Drawing.SystemColors.ButtonShadow;
this.lblSection.Location = new System.Drawing.Point(7, 28); this.lblSection.Location = new System.Drawing.Point(9, 34);
this.lblSection.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblSection.Name = "lblSection"; this.lblSection.Name = "lblSection";
this.lblSection.Size = new System.Drawing.Size(142, 19); this.lblSection.Size = new System.Drawing.Size(142, 19);
this.lblSection.TabIndex = 48; this.lblSection.TabIndex = 48;
@ -186,8 +181,7 @@ namespace DataLoader
// lblProc // lblProc
// //
this.lblProc.BackColor = System.Drawing.SystemColors.ButtonShadow; this.lblProc.BackColor = System.Drawing.SystemColors.ButtonShadow;
this.lblProc.Location = new System.Drawing.Point(7, 9); this.lblProc.Location = new System.Drawing.Point(9, 11);
this.lblProc.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblProc.Name = "lblProc"; this.lblProc.Name = "lblProc";
this.lblProc.Size = new System.Drawing.Size(142, 19); this.lblProc.Size = new System.Drawing.Size(142, 19);
this.lblProc.TabIndex = 47; this.lblProc.TabIndex = 47;
@ -197,9 +191,9 @@ namespace DataLoader
this.tv.CheckBoxes = true; this.tv.CheckBoxes = true;
this.tv.Dock = System.Windows.Forms.DockStyle.Fill; this.tv.Dock = System.Windows.Forms.DockStyle.Fill;
this.tv.Location = new System.Drawing.Point(0, 0); this.tv.Location = new System.Drawing.Point(0, 0);
this.tv.Margin = new System.Windows.Forms.Padding(2); this.tv.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.tv.Name = "tv"; this.tv.Name = "tv";
this.tv.Size = new System.Drawing.Size(664, 232); this.tv.Size = new System.Drawing.Size(885, 287);
this.tv.TabIndex = 24; this.tv.TabIndex = 24;
this.tv.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.tv_BeforeExpand); this.tv.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.tv_BeforeExpand);
this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect); this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect);
@ -209,9 +203,10 @@ namespace DataLoader
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabel1, this.toolStripStatusLabel1,
this.tsslError}); this.tsslError});
this.statusStrip1.Location = new System.Drawing.Point(0, 349); this.statusStrip1.Location = new System.Drawing.Point(0, 440);
this.statusStrip1.Name = "statusStrip1"; this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(664, 45); this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 19, 0);
this.statusStrip1.Size = new System.Drawing.Size(885, 45);
this.statusStrip1.TabIndex = 47; this.statusStrip1.TabIndex = 47;
this.statusStrip1.Text = "statusStrip1"; this.statusStrip1.Text = "statusStrip1";
// //
@ -242,7 +237,8 @@ namespace DataLoader
this.fixAllToolStripMenuItem}); this.fixAllToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(664, 24); this.menuStrip1.Padding = new System.Windows.Forms.Padding(8, 2, 0, 2);
this.menuStrip1.Size = new System.Drawing.Size(885, 28);
this.menuStrip1.TabIndex = 48; this.menuStrip1.TabIndex = 48;
this.menuStrip1.Text = "menuStrip1"; this.menuStrip1.Text = "menuStrip1";
// //
@ -251,7 +247,7 @@ namespace DataLoader
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.exitToolStripMenuItem}); this.exitToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); this.fileToolStripMenuItem.Size = new System.Drawing.Size(44, 24);
this.fileToolStripMenuItem.Text = "&File"; this.fileToolStripMenuItem.Text = "&File";
// //
// exitToolStripMenuItem // exitToolStripMenuItem
@ -275,79 +271,79 @@ namespace DataLoader
this.load16BitApprovalToolStripMenuItem, this.load16BitApprovalToolStripMenuItem,
this.fixesToolStripMenuItem}); this.fixesToolStripMenuItem});
this.processToolStripMenuItem.Name = "processToolStripMenuItem"; this.processToolStripMenuItem.Name = "processToolStripMenuItem";
this.processToolStripMenuItem.Size = new System.Drawing.Size(59, 20); this.processToolStripMenuItem.Size = new System.Drawing.Size(70, 24);
this.processToolStripMenuItem.Text = "&Process"; this.processToolStripMenuItem.Text = "&Process";
// //
// completeToolStripMenuItem // completeToolStripMenuItem
// //
this.completeToolStripMenuItem.Name = "completeToolStripMenuItem"; this.completeToolStripMenuItem.Name = "completeToolStripMenuItem";
this.completeToolStripMenuItem.Size = new System.Drawing.Size(224, 22); this.completeToolStripMenuItem.Size = new System.Drawing.Size(264, 24);
this.completeToolStripMenuItem.Text = "Complete"; this.completeToolStripMenuItem.Text = "Complete";
this.completeToolStripMenuItem.Click += new System.EventHandler(this.completeToolStripMenuItem_Click); this.completeToolStripMenuItem.Click += new System.EventHandler(this.completeToolStripMenuItem_Click);
// //
// toolStripMenuItem1 // toolStripMenuItem1
// //
this.toolStripMenuItem1.Name = "toolStripMenuItem1"; this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(221, 6); this.toolStripMenuItem1.Size = new System.Drawing.Size(261, 6);
// //
// formatOnlyToolStripMenuItem // formatOnlyToolStripMenuItem
// //
this.formatOnlyToolStripMenuItem.Name = "formatOnlyToolStripMenuItem"; this.formatOnlyToolStripMenuItem.Name = "formatOnlyToolStripMenuItem";
this.formatOnlyToolStripMenuItem.Size = new System.Drawing.Size(224, 22); this.formatOnlyToolStripMenuItem.Size = new System.Drawing.Size(264, 24);
this.formatOnlyToolStripMenuItem.Text = "Format Only"; this.formatOnlyToolStripMenuItem.Text = "Format Only";
this.formatOnlyToolStripMenuItem.Click += new System.EventHandler(this.formatOnlyToolStripMenuItem_Click); this.formatOnlyToolStripMenuItem.Click += new System.EventHandler(this.formatOnlyToolStripMenuItem_Click);
// //
// toolStripMenuItem2 // toolStripMenuItem2
// //
this.toolStripMenuItem2.Name = "toolStripMenuItem2"; this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(221, 6); this.toolStripMenuItem2.Size = new System.Drawing.Size(261, 6);
// //
// convertDBToolStripMenuItem // convertDBToolStripMenuItem
// //
this.convertDBToolStripMenuItem.Name = "convertDBToolStripMenuItem"; this.convertDBToolStripMenuItem.Name = "convertDBToolStripMenuItem";
this.convertDBToolStripMenuItem.Size = new System.Drawing.Size(224, 22); this.convertDBToolStripMenuItem.Size = new System.Drawing.Size(264, 24);
this.convertDBToolStripMenuItem.Text = "Convert DB"; this.convertDBToolStripMenuItem.Text = "Convert DB";
this.convertDBToolStripMenuItem.Click += new System.EventHandler(this.convertDBToolStripMenuItem_Click); this.convertDBToolStripMenuItem.Click += new System.EventHandler(this.convertDBToolStripMenuItem_Click);
// //
// fixTransitionsToolStripMenuItem // fixTransitionsToolStripMenuItem
// //
this.fixTransitionsToolStripMenuItem.Name = "fixTransitionsToolStripMenuItem"; this.fixTransitionsToolStripMenuItem.Name = "fixTransitionsToolStripMenuItem";
this.fixTransitionsToolStripMenuItem.Size = new System.Drawing.Size(224, 22); this.fixTransitionsToolStripMenuItem.Size = new System.Drawing.Size(264, 24);
this.fixTransitionsToolStripMenuItem.Text = "Fix Transitions"; this.fixTransitionsToolStripMenuItem.Text = "Fix Transitions";
this.fixTransitionsToolStripMenuItem.Click += new System.EventHandler(this.fixTransitionsToolStripMenuItem_Click); this.fixTransitionsToolStripMenuItem.Click += new System.EventHandler(this.fixTransitionsToolStripMenuItem_Click);
// //
// convertToChangeManagerToolStripMenuItem // convertToChangeManagerToolStripMenuItem
// //
this.convertToChangeManagerToolStripMenuItem.Name = "convertToChangeManagerToolStripMenuItem"; this.convertToChangeManagerToolStripMenuItem.Name = "convertToChangeManagerToolStripMenuItem";
this.convertToChangeManagerToolStripMenuItem.Size = new System.Drawing.Size(224, 22); this.convertToChangeManagerToolStripMenuItem.Size = new System.Drawing.Size(264, 24);
this.convertToChangeManagerToolStripMenuItem.Text = "Convert to Change Manager"; this.convertToChangeManagerToolStripMenuItem.Text = "Convert to Change Manager";
this.convertToChangeManagerToolStripMenuItem.Click += new System.EventHandler(this.convertToChangeManagerToolStripMenuItem_Click); this.convertToChangeManagerToolStripMenuItem.Click += new System.EventHandler(this.convertToChangeManagerToolStripMenuItem_Click);
// //
// convertToApprovalToolStripMenuItem // convertToApprovalToolStripMenuItem
// //
this.convertToApprovalToolStripMenuItem.Name = "convertToApprovalToolStripMenuItem"; this.convertToApprovalToolStripMenuItem.Name = "convertToApprovalToolStripMenuItem";
this.convertToApprovalToolStripMenuItem.Size = new System.Drawing.Size(224, 22); this.convertToApprovalToolStripMenuItem.Size = new System.Drawing.Size(264, 24);
this.convertToApprovalToolStripMenuItem.Text = "Convert to Approval"; this.convertToApprovalToolStripMenuItem.Text = "Convert to Approval";
this.convertToApprovalToolStripMenuItem.Click += new System.EventHandler(this.convertToApprovalToolStripMenuItem_Click); this.convertToApprovalToolStripMenuItem.Click += new System.EventHandler(this.convertToApprovalToolStripMenuItem_Click);
// //
// load16BitApprovalToolStripMenuItem // load16BitApprovalToolStripMenuItem
// //
this.load16BitApprovalToolStripMenuItem.Name = "load16BitApprovalToolStripMenuItem"; this.load16BitApprovalToolStripMenuItem.Name = "load16BitApprovalToolStripMenuItem";
this.load16BitApprovalToolStripMenuItem.Size = new System.Drawing.Size(224, 22); this.load16BitApprovalToolStripMenuItem.Size = new System.Drawing.Size(264, 24);
this.load16BitApprovalToolStripMenuItem.Text = "Load 16-Bit Approval"; this.load16BitApprovalToolStripMenuItem.Text = "Load 16-Bit Approval";
this.load16BitApprovalToolStripMenuItem.Click += new System.EventHandler(this.load16BitApprovalToolStripMenuItem_Click); this.load16BitApprovalToolStripMenuItem.Click += new System.EventHandler(this.load16BitApprovalToolStripMenuItem_Click);
// //
// fixesToolStripMenuItem // fixesToolStripMenuItem
// //
this.fixesToolStripMenuItem.Name = "fixesToolStripMenuItem"; this.fixesToolStripMenuItem.Name = "fixesToolStripMenuItem";
this.fixesToolStripMenuItem.Size = new System.Drawing.Size(224, 22); this.fixesToolStripMenuItem.Size = new System.Drawing.Size(264, 24);
this.fixesToolStripMenuItem.Text = "Fixes"; this.fixesToolStripMenuItem.Text = "Fixes";
this.fixesToolStripMenuItem.Click += new System.EventHandler(this.fixesToolStripMenuItem_Click); this.fixesToolStripMenuItem.Click += new System.EventHandler(this.fixesToolStripMenuItem_Click);
// //
// settingsToolStripMenuItem // settingsToolStripMenuItem
// //
this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem"; this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
this.settingsToolStripMenuItem.Size = new System.Drawing.Size(61, 20); this.settingsToolStripMenuItem.Size = new System.Drawing.Size(74, 24);
this.settingsToolStripMenuItem.Text = "&Settings"; this.settingsToolStripMenuItem.Text = "&Settings";
this.settingsToolStripMenuItem.Click += new System.EventHandler(this.settingsToolStripMenuItem_Click); this.settingsToolStripMenuItem.Click += new System.EventHandler(this.settingsToolStripMenuItem_Click);
// //
@ -364,92 +360,100 @@ namespace DataLoader
this.toolStripMenuItem3, this.toolStripMenuItem3,
this.convertDbfSelectedInTreeToolStripMenuItem}); this.convertDbfSelectedInTreeToolStripMenuItem});
this.oldToolStripMenuItem.Name = "oldToolStripMenuItem"; this.oldToolStripMenuItem.Name = "oldToolStripMenuItem";
this.oldToolStripMenuItem.Size = new System.Drawing.Size(38, 20); this.oldToolStripMenuItem.Size = new System.Drawing.Size(45, 24);
this.oldToolStripMenuItem.Text = "Old"; this.oldToolStripMenuItem.Text = "Old";
// //
// convertSecurityToolStripMenuItem // convertSecurityToolStripMenuItem
// //
this.convertSecurityToolStripMenuItem.Name = "convertSecurityToolStripMenuItem"; this.convertSecurityToolStripMenuItem.Name = "convertSecurityToolStripMenuItem";
this.convertSecurityToolStripMenuItem.Size = new System.Drawing.Size(224, 22); this.convertSecurityToolStripMenuItem.Size = new System.Drawing.Size(268, 24);
this.convertSecurityToolStripMenuItem.Text = "Convert Security"; this.convertSecurityToolStripMenuItem.Text = "Convert Security";
this.convertSecurityToolStripMenuItem.Click += new System.EventHandler(this.convertSecurityToolStripMenuItem_Click); this.convertSecurityToolStripMenuItem.Click += new System.EventHandler(this.convertSecurityToolStripMenuItem_Click);
// //
// toolStripMenuItem4 // toolStripMenuItem4
// //
this.toolStripMenuItem4.Name = "toolStripMenuItem4"; this.toolStripMenuItem4.Name = "toolStripMenuItem4";
this.toolStripMenuItem4.Size = new System.Drawing.Size(221, 6); this.toolStripMenuItem4.Size = new System.Drawing.Size(265, 6);
// //
// convertTopFoldersToolStripMenuItem // convertTopFoldersToolStripMenuItem
// //
this.convertTopFoldersToolStripMenuItem.Name = "convertTopFoldersToolStripMenuItem"; this.convertTopFoldersToolStripMenuItem.Name = "convertTopFoldersToolStripMenuItem";
this.convertTopFoldersToolStripMenuItem.Size = new System.Drawing.Size(224, 22); this.convertTopFoldersToolStripMenuItem.Size = new System.Drawing.Size(268, 24);
this.convertTopFoldersToolStripMenuItem.Text = "Convert Top Folders"; this.convertTopFoldersToolStripMenuItem.Text = "Convert Top Folders";
this.convertTopFoldersToolStripMenuItem.Click += new System.EventHandler(this.convertTopFoldersToolStripMenuItem_Click); this.convertTopFoldersToolStripMenuItem.Click += new System.EventHandler(this.convertTopFoldersToolStripMenuItem_Click);
// //
// loadTreeFromCSLAToolStripMenuItem // loadTreeFromCSLAToolStripMenuItem
// //
this.loadTreeFromCSLAToolStripMenuItem.Name = "loadTreeFromCSLAToolStripMenuItem"; this.loadTreeFromCSLAToolStripMenuItem.Name = "loadTreeFromCSLAToolStripMenuItem";
this.loadTreeFromCSLAToolStripMenuItem.Size = new System.Drawing.Size(224, 22); this.loadTreeFromCSLAToolStripMenuItem.Size = new System.Drawing.Size(268, 24);
this.loadTreeFromCSLAToolStripMenuItem.Text = "Load Tree From CSLA"; this.loadTreeFromCSLAToolStripMenuItem.Text = "Load Tree From CSLA";
this.loadTreeFromCSLAToolStripMenuItem.Click += new System.EventHandler(this.loadTreeFromCSLAToolStripMenuItem_Click); this.loadTreeFromCSLAToolStripMenuItem.Click += new System.EventHandler(this.loadTreeFromCSLAToolStripMenuItem_Click);
// //
// loadVETreeFromCSLAToolStripMenuItem // loadVETreeFromCSLAToolStripMenuItem
// //
this.loadVETreeFromCSLAToolStripMenuItem.Name = "loadVETreeFromCSLAToolStripMenuItem"; this.loadVETreeFromCSLAToolStripMenuItem.Name = "loadVETreeFromCSLAToolStripMenuItem";
this.loadVETreeFromCSLAToolStripMenuItem.Size = new System.Drawing.Size(224, 22); this.loadVETreeFromCSLAToolStripMenuItem.Size = new System.Drawing.Size(268, 24);
this.loadVETreeFromCSLAToolStripMenuItem.Text = "Load VETree From CSLA"; this.loadVETreeFromCSLAToolStripMenuItem.Text = "Load VETree From CSLA";
this.loadVETreeFromCSLAToolStripMenuItem.Click += new System.EventHandler(this.loadVETreeFromCSLAToolStripMenuItem_Click); this.loadVETreeFromCSLAToolStripMenuItem.Click += new System.EventHandler(this.loadVETreeFromCSLAToolStripMenuItem_Click);
// //
// groupSecurityToolStripMenuItem // groupSecurityToolStripMenuItem
// //
this.groupSecurityToolStripMenuItem.Name = "groupSecurityToolStripMenuItem"; this.groupSecurityToolStripMenuItem.Name = "groupSecurityToolStripMenuItem";
this.groupSecurityToolStripMenuItem.Size = new System.Drawing.Size(224, 22); this.groupSecurityToolStripMenuItem.Size = new System.Drawing.Size(268, 24);
this.groupSecurityToolStripMenuItem.Text = "Group/Security"; this.groupSecurityToolStripMenuItem.Text = "Group/Security";
this.groupSecurityToolStripMenuItem.Click += new System.EventHandler(this.groupSecurityToolStripMenuItem_Click); this.groupSecurityToolStripMenuItem.Click += new System.EventHandler(this.groupSecurityToolStripMenuItem_Click);
// //
// countTokensToolStripMenuItem // countTokensToolStripMenuItem
// //
this.countTokensToolStripMenuItem.Name = "countTokensToolStripMenuItem"; this.countTokensToolStripMenuItem.Name = "countTokensToolStripMenuItem";
this.countTokensToolStripMenuItem.Size = new System.Drawing.Size(224, 22); this.countTokensToolStripMenuItem.Size = new System.Drawing.Size(268, 24);
this.countTokensToolStripMenuItem.Text = "Count Tokens"; this.countTokensToolStripMenuItem.Text = "Count Tokens";
this.countTokensToolStripMenuItem.Click += new System.EventHandler(this.countTokensToolStripMenuItem_Click); this.countTokensToolStripMenuItem.Click += new System.EventHandler(this.countTokensToolStripMenuItem_Click);
// //
// toolStripMenuItem3 // toolStripMenuItem3
// //
this.toolStripMenuItem3.Name = "toolStripMenuItem3"; this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(221, 6); this.toolStripMenuItem3.Size = new System.Drawing.Size(265, 6);
// //
// convertDbfSelectedInTreeToolStripMenuItem // convertDbfSelectedInTreeToolStripMenuItem
// //
this.convertDbfSelectedInTreeToolStripMenuItem.Name = "convertDbfSelectedInTreeToolStripMenuItem"; this.convertDbfSelectedInTreeToolStripMenuItem.Name = "convertDbfSelectedInTreeToolStripMenuItem";
this.convertDbfSelectedInTreeToolStripMenuItem.Size = new System.Drawing.Size(224, 22); this.convertDbfSelectedInTreeToolStripMenuItem.Size = new System.Drawing.Size(268, 24);
this.convertDbfSelectedInTreeToolStripMenuItem.Text = "Convert Dbf Selected In Tree"; this.convertDbfSelectedInTreeToolStripMenuItem.Text = "Convert Dbf Selected In Tree";
this.convertDbfSelectedInTreeToolStripMenuItem.Click += new System.EventHandler(this.convertDbfSelectedInTreeToolStripMenuItem_Click); this.convertDbfSelectedInTreeToolStripMenuItem.Click += new System.EventHandler(this.convertDbfSelectedInTreeToolStripMenuItem_Click);
// //
// fixAllToolStripMenuItem // fixAllToolStripMenuItem
// //
this.fixAllToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fixAllToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.approvalDatabasesToolStripMenuItem}); this.approvalDatabasesToolStripMenuItem,
this.updateFormatsToolStripMenuItem});
this.fixAllToolStripMenuItem.Name = "fixAllToolStripMenuItem"; this.fixAllToolStripMenuItem.Name = "fixAllToolStripMenuItem";
this.fixAllToolStripMenuItem.Size = new System.Drawing.Size(50, 20); this.fixAllToolStripMenuItem.Size = new System.Drawing.Size(61, 24);
this.fixAllToolStripMenuItem.Text = "Fix All"; this.fixAllToolStripMenuItem.Text = "Fix All";
// //
// approvalDatabasesToolStripMenuItem // approvalDatabasesToolStripMenuItem
// //
this.approvalDatabasesToolStripMenuItem.Name = "approvalDatabasesToolStripMenuItem"; this.approvalDatabasesToolStripMenuItem.Name = "approvalDatabasesToolStripMenuItem";
this.approvalDatabasesToolStripMenuItem.Size = new System.Drawing.Size(178, 22); this.approvalDatabasesToolStripMenuItem.Size = new System.Drawing.Size(212, 24);
this.approvalDatabasesToolStripMenuItem.Text = "Approval Databases"; this.approvalDatabasesToolStripMenuItem.Text = "Approval Databases";
this.approvalDatabasesToolStripMenuItem.Click += new System.EventHandler(this.approvalDatabasesToolStripMenuItem_Click); this.approvalDatabasesToolStripMenuItem.Click += new System.EventHandler(this.approvalDatabasesToolStripMenuItem_Click);
// //
// updateFormatsToolStripMenuItem
//
this.updateFormatsToolStripMenuItem.Name = "updateFormatsToolStripMenuItem";
this.updateFormatsToolStripMenuItem.Size = new System.Drawing.Size(212, 24);
this.updateFormatsToolStripMenuItem.Text = "Update Formats";
this.updateFormatsToolStripMenuItem.Click += new System.EventHandler(this.updateFormatsToolStripMenuItem_Click);
//
// frmLoader // frmLoader
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(664, 394); this.ClientSize = new System.Drawing.Size(885, 485);
this.Controls.Add(this.statusStrip1); this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.sc); this.Controls.Add(this.sc);
this.Controls.Add(this.menuStrip1); this.Controls.Add(this.menuStrip1);
this.Margin = new System.Windows.Forms.Padding(2); this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Name = "frmLoader"; this.Name = "frmLoader";
this.Text = "PROMS-2010 Data Loader"; this.Text = "PROMS-2010 Data Loader";
this.Load += new System.EventHandler(this.frmLoader_Load); this.Load += new System.EventHandler(this.frmLoader_Load);
@ -511,5 +515,6 @@ namespace DataLoader
private System.Windows.Forms.ToolStripMenuItem fixesToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem fixesToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem fixAllToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem fixAllToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem approvalDatabasesToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem approvalDatabasesToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem updateFormatsToolStripMenuItem;
} }
} }

View File

@ -379,6 +379,7 @@ namespace DataLoader
ssr.InfoMessage += new SQLScriptRunnerEvent(ssr_InfoMessage); ssr.InfoMessage += new SQLScriptRunnerEvent(ssr_InfoMessage);
try try
{ {
AddError("Running Script '{0}'", scriptName);
ssr.Run(); ssr.Run();
Status = String.Format("Script '{0}' Complete", scriptName); Status = String.Format("Script '{0}' Complete", scriptName);
ok = true; ok = true;
@ -833,16 +834,21 @@ namespace DataLoader
Status = "Backing up Phase 2 Data"; Status = "Backing up Phase 2 Data";
Backup("_" + MySettings.Phase2Suffix); Backup("_" + MySettings.Phase2Suffix);
mb.Append("Phase 2 Backup Complete"); mb.Append("Phase 2 Backup Complete");
// Phase 3 - Convert to Change Manager Version // only do the following two steps if we are NOT appending to an existing set
if(!ConvertToChangeManager()) return; if (MySettings.PurgeExistingData)
mb.Append("Conversion to Change Manager Complete"); {
Status = "Backing up Phase 3 Data"; // Phase 3 - Convert to Change Manager Version
Backup("_" + MySettings.Phase3Suffix); if (!ConvertToChangeManager()) return;
mb.Append("Phase 3 Backup Complete"); mb.Append("Conversion to Change Manager Complete");
//Phase 4 - Convert to Approval Version Status = "Backing up Phase 3 Data";
if(!ConvertToApproval()) return; Backup("_" + MySettings.Phase3Suffix);
mb.Append("Phase 3 Backup Complete");
//Phase 4 - Convert to Approval Version
if (!ConvertToApproval()) return;
mb.Append("Conversion to Approval Complete");
}
if(!FixProceduresAndFunctions()) return; if(!FixProceduresAndFunctions()) return;
mb.Append("Conversion to Approval Complete"); mb.Append("FixProceduresAndFunctions Complete");
if (MySettings.LoadApproved) if (MySettings.LoadApproved)
{ {
Status = "Backing up Phase 4 Data"; Status = "Backing up Phase 4 Data";
@ -1069,6 +1075,65 @@ namespace DataLoader
Status = String.Format("Fixing databases complete. {0} Fixed, {1} Failures", good, bad); Status = String.Format("Fixing databases complete. {0} Fixed, {1} Failures", good, bad);
} }
} }
private void updateFormatsToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("Can't get this to work yet");
//this.Cursor = Cursors.WaitCursor;
////MySettings.ConnectionString
////"{DBName}", dbName
//string tmp = MySettings.ConnectionString.Replace("{DBName}", "master");
//SqlConnection cn = new SqlConnection(tmp);
//cn.Open();
//SqlDataAdapter da = new SqlDataAdapter("select name, case when object_id(name + '..Items') is null then 'Not PROMS' when object_id(name + '..Revisions') is not null then 'Approval' when object_id(name + '..ContentAudits') is not null then 'Change Manager' else 'Original' end functionality from sysdatabases where name not in ('master','model','msdb','tempdb') order by name", cn);
//DataSet ds = new DataSet();
//da.Fill(ds);
//cn.Close();
//List<string> cms = new List<string>();
//StringBuilder sb = new StringBuilder();
//sb.Append("Formats will be updated in the following databases ...\r\n");
//foreach (DataRow dr in ds.Tables[0].Rows)
//{
// if (dr["functionality"].ToString() == "Approval") // get only the databases with Approval fnctionality
// {
// cms.Add(dr["name"].ToString());
// sb.Append("\r\n " + dr["name"].ToString());
// }
//}
//this.Cursor = Cursors.Default;
//if (MessageBox.Show(sb.ToString(), "Format Updates", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)
//{
// int good = 0;
// int bad = 0;
// string saveDbName = MySettings.DBName;
// foreach (string s in cms)
// {
// try
// {
// AddInfo("\r\nUpdating Formats in database {0}\r\n", s);
// MySettings.DBName = s;
// Database.VEPROMS_Connection = MySettings.ConnectionString.Replace("{DBName}", s);
// Format.UpdateFormats(MySettings.FormatFolder, MySettings.GenMacFolder);
// Database.VEPROMS_SqlConnection.Close();
// //RunScript("PROMSFixes.sql", s);
// good++;
// }
// catch (Exception ex)
// {
// AddInfo("====****====");
// AddError(ex, "While Updating Formats for database {0}", s);
// AddInfo("====****====");
// bad++;
// }
// }
// MySettings.DBName = saveDbName;
// AddInfo("\r\nUpdating Formats in databases complete. {0} Fixed, {1} Failures", good, bad);
// Status = String.Format("Updating Formats in databases complete. {0} Fixed, {1} Failures", good, bad);
//}
}
} }
public class MessageBuilder public class MessageBuilder
{ {