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.
This commit is contained in:
Rich 2013-03-29 14:21:03 +00:00
parent 182fb63cb6
commit 1088563cec

View File

@ -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;