diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index b9ea0ba0..9ed7dcc0 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -76,11 +76,11 @@ namespace VEPROMS Directory.CreateDirectory(PEIPath); if (_MyMode == "Import") { - if (MyFolder != null && MyFolder.ChildFolderCount == 0) - { - Directory.Delete(PEIPath, true); - Directory.CreateDirectory(PEIPath); - } + //if (MyFolder != null && MyFolder.ChildFolderCount == 0 ) + //{ + // Directory.Delete(PEIPath, true); + // Directory.CreateDirectory(PEIPath); + //} } pnlExport.Dock = DockStyle.Fill; pnlImport.Dock = DockStyle.Fill; @@ -239,8 +239,21 @@ namespace VEPROMS if ((dlg.SelectedROFolder ?? string.Empty) != string.Empty) // B2015-216 If the return value is null treat it like an empty string { MyRODb = RODb.GetByFolderPath(dlg.SelectedROFolder); + RODbInfo myRODBInfo = RODbInfo.Get(MyRODb.RODbID); oldRODbID = newRODbID = MyRODb.RODbID; - MyDocVersion.RefreshDocVersionAssociations(); + ROFstInfo fstInfo = null; + foreach (ROFstInfo tmp in myRODBInfo.RODbROFsts) + if (fstInfo == null || tmp.ROFstID > fstInfo.ROFstID) + fstInfo = tmp; + using(DocVersion dv = MyDocVersion.Get()) + { + using (ROFst fst = fstInfo.Get()) + { + dv.DocVersionAssociations.Add(fst); + dv.Save(); + } + dv.Reset_DocVersionAssociations(); + MyDocVersion.RefreshDocVersionAssociations(); } } else { diff --git a/PROMS/VEPROMS User Interface/frmRODbProperties.cs b/PROMS/VEPROMS User Interface/frmRODbProperties.cs index 0143e6f7..77045d7e 100644 --- a/PROMS/VEPROMS User Interface/frmRODbProperties.cs +++ b/PROMS/VEPROMS User Interface/frmRODbProperties.cs @@ -203,6 +203,7 @@ namespace VEPROMS // properties on the top node. And lastly, it is the code default. ppTxtExt.Text = cfg.GetDefaultGraphicExtension(); ppLblGraphicFileExtLoc.Text = (cfg == null) ? null : cfg.GetDefaultGraphicExtensionLocation(); + ppBtnOk.Enabled = false; if (_roDbInfo == null) { string newFolderPath = null; @@ -212,11 +213,21 @@ namespace VEPROMS if (dlgROFolder.ShowDialog() == DialogResult.OK) { newFolderPath = dlgROFolder.SelectedPath; + RODbInfoList allRODBs = RODbInfoList.Get(); + foreach(RODbInfo rodb in allRODBs) + { + if (newFolderPath.ToUpper() == rodb.FolderPath.ToUpper()) + { + ppRTxtName.Text = rodb.ROName; + break; + } + } + ppBtnOk.Enabled = true; } ppTxtPath.Text = newFolderPath; } // Initialize the enabled status for the OK button to false. - ppBtnOk.Enabled = false; + //ppBtnOk.Enabled = false; ppTxtPath.TextChanged += ppTxtPath_TextChanged; } void ppTxtPath_TextChanged(object sender, EventArgs e) diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs index 10e8a80b..d6b6e68d 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs @@ -63,8 +63,8 @@ namespace VEPROMS this.cmbFont = new System.Windows.Forms.ComboBox(); this.labelItem10 = new DevComponents.DotNetBar.LabelItem(); this.bottomProgBar = new DevComponents.DotNetBar.ProgressBarItem(); - this.labelItem20 = new DevComponents.DotNetBar.LabelItem(); - this.lblLocked = new DevComponents.DotNetBar.LabelItem(); + //this.labelItem20 = new DevComponents.DotNetBar.LabelItem(); + //this.lblLocked = new DevComponents.DotNetBar.LabelItem(); this.labelItem9 = new DevComponents.DotNetBar.LabelItem(); this.lblEditView = new DevComponents.DotNetBar.LabelItem(); this.labelItem11 = new DevComponents.DotNetBar.LabelItem(); @@ -499,8 +499,8 @@ namespace VEPROMS this.bottomBar.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.labelItem10, this.bottomProgBar, - this.labelItem20, - this.lblLocked, + //this.labelItem20, + //this.lblLocked, this.labelItem9, this.lblEditView, this.labelItem11, @@ -552,17 +552,17 @@ namespace VEPROMS // // labelItem20 // - this.labelItem20.BorderSide = DevComponents.DotNetBar.eBorderSide.Left; - this.labelItem20.BorderType = DevComponents.DotNetBar.eBorderType.Bump; - this.labelItem20.Name = "labelItem20"; + //this.labelItem20.BorderSide = DevComponents.DotNetBar.eBorderSide.Left; + //this.labelItem20.BorderType = DevComponents.DotNetBar.eBorderType.Bump; + //this.labelItem20.Name = "labelItem20"; // // lblLocked // - this.lblLocked.BackColor = System.Drawing.Color.Transparent; - this.lblLocked.ForeColor = System.Drawing.SystemColors.MenuText; - this.lblLocked.Image = global::VEPROMS.Properties.Resources.UnProtectFormHS; - this.lblLocked.Name = "lblLocked"; - this.lblLocked.Text = "Unlocked"; + //this.lblLocked.BackColor = System.Drawing.Color.Transparent; + //this.lblLocked.ForeColor = System.Drawing.SystemColors.MenuText; + //this.lblLocked.Image = global::VEPROMS.Properties.Resources.UnProtectFormHS; + //this.lblLocked.Name = "lblLocked"; + //this.lblLocked.Text = "Unlocked"; // // labelItem9 // @@ -1620,7 +1620,7 @@ namespace VEPROMS //private DevComponents.DotNetBar.Controls.GroupPanel groupPanel1; //private DevComponents.DotNetBar.Controls.GroupPanel groupPanel3; - private DevComponents.DotNetBar.LabelItem labelItem20; + //private DevComponents.DotNetBar.LabelItem labelItem20; private DevComponents.DotNetBar.GalleryGroup Common; private DevComponents.DotNetBar.GalleryGroup Math; private DevComponents.DotNetBar.GalleryGroup Misc; @@ -1677,7 +1677,7 @@ namespace VEPROMS private DevComponents.DotNetBar.ButtonItem btnItemInfo; private DevComponents.DotNetBar.ButtonItem btnFixMSWord; private Volian.Controls.Library.DisplayBookMarks displayBookMarks; - private DevComponents.DotNetBar.LabelItem lblLocked; + //private DevComponents.DotNetBar.LabelItem lblLocked; private DevComponents.DotNetBar.ButtonItem btnShortCuts; private DevComponents.DotNetBar.LabelItem lblItemID; private System.Windows.Forms.ComboBox cmbFont; diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index f0608e45..3984e828 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -1942,6 +1942,8 @@ namespace VEPROMS btnEditItem.Visible = false; lblResolution.Visible = false; txtSearch.Visible = false; + lblLastChange.Visible = false; + btnStepRTF.Visible = false; } } #region MRU diff --git a/PROMS/VEPROMS User Interface/frmVersionsProperties.cs b/PROMS/VEPROMS User Interface/frmVersionsProperties.cs index 33e005ce..94cec880 100644 --- a/PROMS/VEPROMS User Interface/frmVersionsProperties.cs +++ b/PROMS/VEPROMS User Interface/frmVersionsProperties.cs @@ -199,6 +199,8 @@ namespace VEPROMS } // Get the ro path - there is no 'default' + if (_DocVersionConfig.MyDocVersion.DocVersionAssociationCount < 0 && _DocVersionConfig.MyDocVersion.DocVersionAssociations.Count == 0) + ;// The line above refreshes the data if (_DocVersionConfig.MyDocVersion.DocVersionAssociationCount > 0) { RODbInfo rdi = RODbInfo.GetJustRODB(SelectedROFst.RODbID); @@ -986,23 +988,39 @@ namespace VEPROMS // get the rodb from the selection - and then do an 'update rofst'... RODbInfoList rdil = RODbInfoList.Get(); RODbInfo rdi = rdil[cmbRoDb.SelectedIndex]; - ROFst tmp = ROFstInfo.AddRoFst(rdi, _DocVersionConfig.MyDocVersion, DoProgressBarRefresh); // RHM Needs To Include Delegate - if (tmp == null) + ROFstInfo fst=null; + foreach(ROFstInfo inf in rdi.RODbROFsts) + if(fst == null || inf.ROFstID > fst.ROFstID) + fst = inf; + if (fst != null) { - MessageBox.Show("Invalid ro fst directory, use the Property dialog to fix directory path to ro.fst."); - frmRODbProperties dlgROProperties = new frmRODbProperties(_DocVersionConfig.MyDocVersion, rdi); - dlgROProperties.ProgressBar = ProgressBar; - if (dlgROProperties.ShowDialog() == DialogResult.OK) - { - tbRoDb.Text = string.Format("{0} ({1})", SelectedROFst.MyRODb.ROName, SelectedROFst.MyRODb.FolderPath); - ppBtnUpRoVals.Enabled = _DocVersionConfig.MyDocVersion.NewerRoFst; // only allow update if association - } - else - return; + using(ROFst fst1 = fst.Get()) + _DocVersionConfig.MyDocVersion.DocVersionAssociations.Add(fst1); + cmbRoDb.Visible = ppBtnRoDbBrowse.Visible = false; + tbRoDb.Visible = btnRoDbProperties.Visible = true; + tbRoDb.Text = string.Format("{0} ({1})", fst.MyRODb.ROName, fst.MyRODb.FolderPath); + + } + else + { + ROFst tmp = ROFstInfo.AddRoFst(rdi, _DocVersionConfig.MyDocVersion, DoProgressBarRefresh); // RHM Needs To Include Delegate + if (tmp == null) + { + MessageBox.Show("Invalid ro fst directory, use the Property dialog to fix directory path to ro.fst."); + frmRODbProperties dlgROProperties = new frmRODbProperties(_DocVersionConfig.MyDocVersion, rdi); + dlgROProperties.ProgressBar = ProgressBar; + if (dlgROProperties.ShowDialog() == DialogResult.OK) + { + tbRoDb.Text = string.Format("{0} ({1})", SelectedROFst.MyRODb.ROName, SelectedROFst.MyRODb.FolderPath); + ppBtnUpRoVals.Enabled = _DocVersionConfig.MyDocVersion.NewerRoFst; // only allow update if association + } + else + return; + } + cmbRoDb.Visible = ppBtnRoDbBrowse.Visible = false; + tbRoDb.Visible = btnRoDbProperties.Visible = true; + tbRoDb.Text = string.Format("{0} ({1})", tmp.MyRODb.ROName, tmp.MyRODb.FolderPath); } - cmbRoDb.Visible = ppBtnRoDbBrowse.Visible = false; - tbRoDb.Visible = btnRoDbProperties.Visible = true; - tbRoDb.Text = string.Format("{0} ({1})", tmp.MyRODb.ROName, tmp.MyRODb.FolderPath); } private void ppBtnRoDbBrowse_Click(object sender, EventArgs e) diff --git a/PROMS/Volian.Print.Library/PDFChronologyReport.cs b/PROMS/Volian.Print.Library/PDFChronologyReport.cs index c840d353..f96afcbb 100644 --- a/PROMS/Volian.Print.Library/PDFChronologyReport.cs +++ b/PROMS/Volian.Print.Library/PDFChronologyReport.cs @@ -1048,8 +1048,14 @@ namespace Volian.Print.Library lastCAI.ActionWhat = firstCAI.ActionWhat; //this step was originally commented out, then jcb un commented it, but we saw a summary report that had 2 added rows //for the same step which is highly undesirable, so we commented it out again 1/17/2012 - //for example we added 2 steps, then make a change to 1st step added - auditList1.Add(firstCAI); //jcb uncommented + //for example we added 2 steps, then make a change to 1st step added\ + // + // RHM 12/4/2015 It appears that the following line is toggling between being commented-out + // and included. + // 12/4/2015 - D.C. Cook, If a new procedure is added, every new section and step was appearing in the list twice. + // First when added, then with the final text. It should only appear once with the action "Added" and with the latest + // Date Time and User as well as the latest text. + //auditList1.Add(firstCAI); //jcb uncommented auditList1.Add(lastCAI); firstCAI = null; lastCAI = null;