Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 09a397bed2 | |||
| a33039bcae | |||
| 0ebd125266 | |||
| fd16a6b6c3 | |||
| cf19f764c7 | |||
| 88850d6c25 | |||
| b173c61575 | |||
| 3b866f0952 | |||
| 94db524a11 | |||
| f27616ce1f |
Binary file not shown.
Binary file not shown.
@@ -1817,7 +1817,7 @@ ALTER trigger [dbo].[tr_Contents_Delete] on [dbo].[Contents] instead of delete a
|
|||||||
select ii.ContentID,ii.Number,ii.Text,ii.Type,ii.FormatID,ii.Config,ii.DTS,ii.UserID,ii.DeleteStatus,ii.ActionDTS
|
select ii.ContentID,ii.Number,ii.Text,ii.Type,ii.FormatID,ii.Config,ii.DTS,ii.UserID,ii.DeleteStatus,ii.ActionDTS
|
||||||
from tblContents ii inner join deleted dd on dd.ContentID = ii.ContentID
|
from tblContents ii inner join deleted dd on dd.ContentID = ii.ContentID
|
||||||
where ii.DeleteStatus > 0
|
where ii.DeleteStatus > 0
|
||||||
update ga set ga.contentauditid = (select max(auditid) from contentaudits where contentid = ga.contentid and deletestatus = ga.deletestatus)
|
update ga set ga.contentauditid = (select ISNULL(max(auditid),0) from contentaudits where contentid = ga.contentid and deletestatus = ga.deletestatus)
|
||||||
from gridaudits ga join deleted dd on ga.contentid = dd.contentid where ga.contentauditid = 0
|
from gridaudits ga join deleted dd on ga.contentid = dd.contentid where ga.contentauditid = 0
|
||||||
end
|
end
|
||||||
go
|
go
|
||||||
|
|||||||
@@ -24990,6 +24990,34 @@ IF (@@Error = 0) PRINT 'Procedure Creation: getRevisionByItemIDandRevisionNumber
|
|||||||
ELSE PRINT 'Procedure Creation: getRevisionByItemIDandRevisionNumber Error on Creation'
|
ELSE PRINT 'Procedure Creation: getRevisionByItemIDandRevisionNumber Error on Creation'
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
/*
|
||||||
|
==========================================================================================================
|
||||||
|
Author: Matthew Schill
|
||||||
|
Create Date: 06/29/2026
|
||||||
|
Description: Added an ISNULL check when setting GridAudits.contentauditid.
|
||||||
|
Was Causing Deletion of some Grids to fail.
|
||||||
|
==========================================================================================================
|
||||||
|
*/
|
||||||
|
/****** Object: Trigger [tr_Contents_Delete] ******/
|
||||||
|
ALTER trigger [dbo].[tr_Contents_Delete] on [dbo].[Contents] instead of delete as
|
||||||
|
begin
|
||||||
|
update ii set DeleteStatus = (select max(DeleteID) from DeleteLog where SPID = @@spid), ActionDTS = getdate(),
|
||||||
|
UserID = (select top 1 UserID from DeleteLog where SPID = @@spid order by deleteid desc)
|
||||||
|
from tblContents ii inner join deleted dd on dd.ContentID = ii.ContentID
|
||||||
|
insert into ContentAudits(ContentID,Number,Text,Type,FormatID,Config,DTS,UserID,DeleteStatus,ActionDTS)
|
||||||
|
select ii.ContentID,ii.Number,ii.Text,ii.Type,ii.FormatID,ii.Config,ii.DTS,ii.UserID,ii.DeleteStatus,ii.ActionDTS
|
||||||
|
from tblContents ii inner join deleted dd on dd.ContentID = ii.ContentID
|
||||||
|
where ii.DeleteStatus > 0
|
||||||
|
update ga set ga.contentauditid = (select ISNULL(max(auditid),0) from contentaudits where contentid = ga.contentid and deletestatus = ga.deletestatus)
|
||||||
|
from gridaudits ga join deleted dd on ga.contentid = dd.contentid where ga.contentauditid = 0
|
||||||
|
end
|
||||||
|
go
|
||||||
|
|
||||||
|
-- Display the status of Trigger alter
|
||||||
|
IF (@@Error = 0) PRINT 'Trigger Alteration: tr_Contents_Delete Succeeded'
|
||||||
|
ELSE PRINT 'Trigger Alteration: tr_Contents_Delete Error on Creation'
|
||||||
|
GO
|
||||||
|
|
||||||
/*
|
/*
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
| ADD New Code Before this Block |
|
| ADD New Code Before this Block |
|
||||||
@@ -25023,8 +25051,8 @@ BEGIN TRY -- Try Block
|
|||||||
DECLARE @RevDate varchar(255)
|
DECLARE @RevDate varchar(255)
|
||||||
DECLARE @RevDescription varchar(255)
|
DECLARE @RevDescription varchar(255)
|
||||||
|
|
||||||
set @RevDate = '05/26/2026 7:00 AM'
|
set @RevDate = '06/29/2026 7:00 AM'
|
||||||
set @RevDescription = 'Get Most Recent Revision when Duplicates'
|
set @RevDescription = 'Update to Grid Deletion Audits'
|
||||||
|
|
||||||
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
|
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
|
||||||
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
|
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
|
||||||
|
|||||||
@@ -2,13 +2,12 @@ using DevComponents.DotNetBar;
|
|||||||
using JR.Utils.GUI.Forms;
|
using JR.Utils.GUI.Forms;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using VEPROMS.CSLA.Library;
|
using VEPROMS.CSLA.Library;
|
||||||
using Volian.Base.Library;
|
using Volian.Base.Library;
|
||||||
@@ -92,6 +91,10 @@ namespace Volian.Controls.Library
|
|||||||
//This flag will be set when the docversion gets updated to let it know that the full tree needs a refresh
|
//This flag will be set when the docversion gets updated to let it know that the full tree needs a refresh
|
||||||
private bool changedDocVersion = false;
|
private bool changedDocVersion = false;
|
||||||
|
|
||||||
|
//B2026-057 PROMS Crash when Closing Tabs
|
||||||
|
// this flag will prevent multiple asking in a row if should updste ROs
|
||||||
|
private static bool askedAboutchangedDocVersion = false;
|
||||||
|
|
||||||
public ROFstInfo MyROFST
|
public ROFstInfo MyROFST
|
||||||
{
|
{
|
||||||
get { return _myROFST; }
|
get { return _myROFST; }
|
||||||
@@ -135,6 +138,7 @@ namespace Volian.Controls.Library
|
|||||||
if (_docVersionInfo?.VersionID != value?.VersionID)
|
if (_docVersionInfo?.VersionID != value?.VersionID)
|
||||||
{
|
{
|
||||||
changedDocVersion = true;
|
changedDocVersion = true;
|
||||||
|
askedAboutchangedDocVersion = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_docVersionInfo = value;
|
_docVersionInfo = value;
|
||||||
@@ -648,9 +652,12 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
//do nothing - is still checked out
|
//do nothing - is still checked out
|
||||||
}
|
}
|
||||||
else if (changedDocVersion && MessageBox.Show($"There exists a newer ROFST for this RO database that was loaded for other sets.\r\n\r\nDo you want to update this set's ROs to be consistent/use the latest loaded ROFST?", "Load ROs", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
else if (changedDocVersion && !askedAboutchangedDocVersion)
|
||||||
|
{
|
||||||
|
Task.Run(() =>
|
||||||
|
{
|
||||||
|
if (MessageBox.Show($"There exists a newer ROFST for this RO database that was loaded for other sets.\r\n\r\nDo you want to update this set's ROs to be consistent/use the latest loaded ROFST?", "Load ROs", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
|
|
||||||
InitialProgressBarMessage = "Updating ROs";
|
InitialProgressBarMessage = "Updating ROs";
|
||||||
|
|
||||||
ROFstInfo roFstInfo = ROFstInfo.Get(fstid);
|
ROFstInfo roFstInfo = ROFstInfo.Get(fstid);
|
||||||
@@ -664,6 +671,15 @@ namespace Volian.Controls.Library
|
|||||||
MyROFST = roFstInfo;
|
MyROFST = roFstInfo;
|
||||||
|
|
||||||
updatedROs = true;
|
updatedROs = true;
|
||||||
|
|
||||||
|
askedAboutchangedDocVersion = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
askedAboutchangedDocVersion = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -468,15 +468,18 @@ namespace Volian.Controls.Library
|
|||||||
this.Refresh();
|
this.Refresh();
|
||||||
myFormatVersionList = FormatVersionList.GetFormatVersions();
|
myFormatVersionList = FormatVersionList.GetFormatVersions();
|
||||||
cbxTranVersion.DisplayMember = "Title";
|
cbxTranVersion.DisplayMember = "Title";
|
||||||
int lastLastFormatID = 0;
|
|
||||||
foreach (FormatVersion fv in myFormatVersionList)
|
List<FormatVersion> fvlst = myFormatVersionList.GroupBy(x => x.FormatID).Select(group => new
|
||||||
{
|
FormatVersion(title: group.Max(x => x.Title),
|
||||||
if (fv.FormatID != lastLastFormatID)
|
formatID: group.Key,
|
||||||
|
versionID: group.Max(x => x.VersionID)
|
||||||
|
)).OrderBy(y => y.Title).ToList();
|
||||||
|
|
||||||
|
foreach (FormatVersion fv in fvlst)
|
||||||
{
|
{
|
||||||
cbxTranVersion.Items.Add(fv);
|
cbxTranVersion.Items.Add(fv);
|
||||||
lastLastFormatID = fv.FormatID;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cbxTranVersion.SelectedIndexChanged -= new EventHandler(cbxTranVersion_SelectedIndexChanged);
|
cbxTranVersion.SelectedIndexChanged -= new EventHandler(cbxTranVersion_SelectedIndexChanged);
|
||||||
cbxTranVersion.SelectedIndexChanged += new EventHandler(cbxTranVersion_SelectedIndexChanged);
|
cbxTranVersion.SelectedIndexChanged += new EventHandler(cbxTranVersion_SelectedIndexChanged);
|
||||||
cbxTranFormat.SelectedIndexChanged -= new EventHandler(cbxTranFormat_SelectedIndexChanged);
|
cbxTranFormat.SelectedIndexChanged -= new EventHandler(cbxTranFormat_SelectedIndexChanged);
|
||||||
@@ -556,14 +559,9 @@ namespace Volian.Controls.Library
|
|||||||
string versionList = string.Empty;
|
string versionList = string.Empty;
|
||||||
string sep = string.Empty;
|
string sep = string.Empty;
|
||||||
FormatVersion sfv = cbxTranVersion.SelectedItem as FormatVersion;
|
FormatVersion sfv = cbxTranVersion.SelectedItem as FormatVersion;
|
||||||
foreach (FormatVersion fv in myFormatVersionList)
|
|
||||||
{
|
versionList = string.Join(",", myFormatVersionList.Where(x => x.FormatID == sfv?.FormatID).Select(y => y.VersionID));
|
||||||
if (fv.FormatID == sfv.FormatID)
|
|
||||||
{
|
|
||||||
versionList += sep + fv.VersionID;
|
|
||||||
sep = ",";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cbxTranVersion.Tag = versionList;
|
cbxTranVersion.Tag = versionList;
|
||||||
cbxTranFormatFillIn(versionList);
|
cbxTranFormatFillIn(versionList);
|
||||||
if (dicExpandedFolderNodes.Count > 0)
|
if (dicExpandedFolderNodes.Count > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user