C2019-036 View Only mode work with Checked Out Procedures

This commit is contained in:
2025-11-17 07:05:52 -05:00
parent b0e4128d3c
commit bd89af5e8c
9 changed files with 208 additions and 27 deletions

View File

@@ -7984,12 +7984,20 @@ namespace VEPROMS.CSLA.Library
public ProcedureInfo(SafeDataReader dr) : base(dr) { }
#endif
private ProcedureInfo() : base() { ;}
public new static ProcedureInfo Get(int itemID)
public new static ProcedureInfo Get(int itemID, bool forcerefresh = false)
{
//if (!CanGetObject())
// throw new System.Security.SecurityException("User not authorized to view a Item");
try
{
//C2019-036 View Only mode work with Checked Out Procedures
// fixes caching issue
// so this forces a refresh of the cache
if (forcerefresh)
{
_CacheByPrimaryKey.Remove(itemID.ToString());
}
ProcedureInfo tmp = GetCachedByPrimaryKey(itemID);
if (tmp == null)
{

View File

@@ -186,7 +186,7 @@ namespace VEPROMS.CSLA.Library
if (string.IsNullOrEmpty(name))
{ name = tmpproc.DisplayText; }
message = string.Format("The procedure {0} is already checked out to {1}", name, si.UserID);
message = string.Format("The procedure {0} is already checked out to {1}.\r\nWould You like to open the procedure in View Only Mode?", name, si.UserID);
rv = rv && false;
}
else if (si.ProcessID != this.ProcessID && objectType == CheckOutType.Document)