From 086529e67aaa0eb933dfcd32f9821dbdb0e7a75a Mon Sep 17 00:00:00 2001 From: Kathy Date: Fri, 24 Feb 2012 16:32:13 +0000 Subject: [PATCH] --- .../frmVersionsProperties.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS User Interface/frmVersionsProperties.cs b/PROMS/VEPROMS User Interface/frmVersionsProperties.cs index 4eba716a..78b1af3e 100644 --- a/PROMS/VEPROMS User Interface/frmVersionsProperties.cs +++ b/PROMS/VEPROMS User Interface/frmVersionsProperties.cs @@ -802,6 +802,18 @@ namespace VEPROMS RODbInfoList rdil = RODbInfoList.Get(); RODbInfo rdi = rdil[cmbRoDb.SelectedIndex]; ROFst tmp = ROFstInfo.AddRoFst(rdi, _DocVersionConfig.MyDocVersion); + 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); + if (dlgROProperties.ShowDialog() == DialogResult.OK) + { + tbRoDb.Text = string.Format("{0} ({1})", SelectedROFst.MyRODb.ROName, SelectedROFst.MyRODb.FolderPath); + ppBtnUpRoVals.Enabled = !(_DocVersionConfig.MyDocVersion.DocVersionAssociationCount == 0); // 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); @@ -815,7 +827,8 @@ namespace VEPROMS if (dlgROProperties.ShowDialog() == DialogResult.OK) { cmbRoDb.Items.Clear(); - if (_DocVersionConfig.MyDocVersion.DocVersionAssociationCount > 1) + _DocVersionConfig.MyDocVersion.Reset_DocVersionAssociations(); + if (_DocVersionConfig.MyDocVersion.DocVersionAssociations != null && _DocVersionConfig.MyDocVersion.DocVersionAssociationCount > 0) { cmbRoDb.Visible = ppBtnRoDbBrowse.Visible = false; tbRoDb.Visible = btnRoDbProperties.Visible = true;