C2023-002: When using RO Update Values feature, display message when other users are in Proms and don’t do update

This commit is contained in:
2023-01-18 16:31:35 +00:00
parent 7be346b6c8
commit 3661876626
6 changed files with 74 additions and 32 deletions

View File

@@ -126,7 +126,12 @@ namespace Volian.Controls.Library
get { return _MyUserInfo; }
set { _MyUserInfo = value; }
}
private static SessionInfo _MySessionInfo;
public static SessionInfo MySessionInfo
{
get { return _MySessionInfo; }
set { _MySessionInfo = value; }
}
private DevComponents.DotNetBar.ButtonItem _DefaultContextMenu;
public void ClearContextMenu()
@@ -3378,7 +3383,15 @@ namespace Volian.Controls.Library
// return;
//}
Cursor = Cursors.WaitCursor;
// C2023-001: Check whether docversion can be checked out before continuing with update of ro.fst
string message = string.Empty;
if (!MySessionInfo.CanCheckOutItem(Mydvi.VersionID, CheckOutType.DocVersion, ref message))
{
FlexibleMessageBox.Show(this, message, "Working Draft Has Items Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
FinalProgressBarMessage = "Cannot check-out Working Draft";
Cursor = Cursors.Default;
return;
}
using (DocVersion dv = DocVersion.Get(Mydvi.VersionID))
{
swROUpdate = new System.IO.StreamWriter(ROFstInfo.ROUpdateResultsPath(Mydvi));