From 1088563cecf27d4eca1b50aa0e104837f02a0736 Mon Sep 17 00:00:00 2001 From: Rich Date: Fri, 29 Mar 2013 14:21:03 +0000 Subject: [PATCH] Changed the enable logic for the RO Update button to be based upon the date of the current Associated ROFST and the most recent ROFST. Added code to disable the Update Button once it has been processed. --- PROMS/VEPROMS User Interface/frmVersionsProperties.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PROMS/VEPROMS User Interface/frmVersionsProperties.cs b/PROMS/VEPROMS User Interface/frmVersionsProperties.cs index 0c51c285..ba311356 100644 --- a/PROMS/VEPROMS User Interface/frmVersionsProperties.cs +++ b/PROMS/VEPROMS User Interface/frmVersionsProperties.cs @@ -297,7 +297,7 @@ namespace VEPROMS ppBtnRoDbBrowse.Visible = cmbRoDb.Visible = _DocVersionConfig.MyDocVersion.DocVersionAssociationCount == 0; btnRoDbProperties.Visible = tbRoDb.Visible = !(_DocVersionConfig.MyDocVersion.DocVersionAssociationCount == 0); - ppBtnUpRoVals.Enabled = !(_DocVersionConfig.MyDocVersion.DocVersionAssociationCount == 0); // only allow update if association + ppBtnUpRoVals.Enabled = _DocVersionConfig.MyDocVersion.NewerRoFst; // only allow update if association // Set the auto duplex controls based on whether the format allows this: // Note that the controls' visibility would not set correctly using the following two lines of code. That @@ -804,7 +804,7 @@ namespace VEPROMS 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 + ppBtnUpRoVals.Enabled = _DocVersionConfig.MyDocVersion.NewerRoFst; // only allow update if association } } @@ -844,6 +844,7 @@ namespace VEPROMS SelectedROFst.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); ROFst newrofst = ROFstInfo.UpdateRoFst(rdi, dva, _DocVersionConfig.MyDocVersion, SelectedROFst); SelectedROFst.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); + ppBtnUpRoVals.Enabled = _DocVersionConfig.MyDocVersion.NewerRoFst; Cursor = Cursors.Default; } } @@ -909,7 +910,7 @@ namespace VEPROMS 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 + ppBtnUpRoVals.Enabled = _DocVersionConfig.MyDocVersion.NewerRoFst; // only allow update if association } else return;