C2025-027-AnnotationsTypeSelect

This commit is contained in:
2025-07-15 23:14:26 -04:00
parent e08b5cde69
commit f6e25fd966
7 changed files with 66 additions and 371 deletions

View File

@@ -24135,7 +24135,7 @@ CREATE PROC [dbo].[getAnnotationstypeSelections]
)
AS
BEGIN
IF((SELECT TypeID FROM AnnotationTypeSelections WHERE UsrID = @UsrID) > 0)
IF((SELECT count(TypeID) FROM AnnotationTypeSelections WHERE UsrID = @UsrID) > 0)
BEGIN
SELECT [ASTypeID]
,[TypeID]
@@ -24164,6 +24164,56 @@ BEGIN
END
GO
-- C2025-027 Annotation Type Filtering
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getAnnotationstypeFiltered]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [getAnnotationstypeFiltered];
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Paul Larsen
-- Create date: 07/10/2025
-- Description: Retrieve Current Annotation Types
-- =============================================
CREATE PROC [dbo].[getAnnotationstypeFiltered]
(
@UsrID varchar(50)
)
AS
BEGIN
IF((SELECT count(TypeID) FROM AnnotationTypeSelections WHERE UsrID = @UsrID) > 0)
BEGIN
SELECT [ASTypeID]
,[TypeID]
,[UsrID]
,[Name]
,[Config]
,[DTS]
,[UserID]
,[IsEPAnnotationType]
FROM [dbo].[AnnotationTypeSelections]
WHERE UsrID = @UsrID
END
ELSE
BEGIN
SELECT
[TypeID],
[Name],
[Config],
[DTS],
[UserID],
[LastChanged],
(SELECT COUNT(*) FROM [Annotations] WHERE [Annotations].[TypeID]=[AnnotationTypes].[TypeID]) [AnnotationCount],
[IsEPAnnotationType]
FROM [AnnotationTypes]
END
END
-- C2025-027 Annotation Type Filtering
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[AnnotationTypeSelections]') AND type in (N'U'))
DROP TABLE [dbo].[AnnotationTypeSelections]

View File

@@ -1663,7 +1663,7 @@ namespace VEPROMS
private DevComponents.DotNetBar.QatCustomizeItem qatCustomizeItem1;
private DevComponents.DotNetBar.Bar bottomBar;
private DevComponents.DotNetBar.ProgressBarItem bottomProgBar;
private DevComponents.DotNetBar.ExpandablePanel epAnnotations;
public DevComponents.DotNetBar.ExpandablePanel epAnnotations;
private DevComponents.DotNetBar.ExpandablePanel epProcedures;
private DevComponents.DotNetBar.ExpandablePanel infoPanel;
private Volian.Controls.Library.vlnTreeView tv;

View File

@@ -1296,37 +1296,10 @@ namespace VEPROMS
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
}
//void tv_SelectAnnotations(object sender, vlnTreeEventArgs args)
//{
// ProcedureInfo pi = (args.Node as VETreeNode).VEObject as ProcedureInfo;
// if (pi == null) return;
// tc.SaveCurrentEditItem(pi);
// //pi.MyDocVersion.DocVersionConfig.SelectedSlave = args.UnitIndex;
// DlgAnnotationsSelect sannoDlg = new DlgAnnotationsSelect(pi, MyUserInfo.UserID);
// //sannoDlg.SelectedSlave = args.UnitIndex;
// //sannoDlg.MySessionInfo = MySessionInfo;
// sannoDlg.ShowDialog(this); // RHM 20120925 - Center dialog over PROMS window
// //pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
//}
public static void tv_SelectAnnotations()
{
//ProcedureInfo pi = (args.Node as VETreeNode).VEObject as ProcedureInfo;
//if (pi == null) return;
//tc.SaveCurrentEditItem(pi);
//pi.MyDocVersion.DocVersionConfig.SelectedSlave = args.UnitIndex;
DlgAnnotationsSelect sannoDlg = new DlgAnnotationsSelect(VlnSettings.UserID);
//sannoDlg.SelectedSlave = args.UnitIndex;
//sannoDlg.MySessionInfo = MySessionInfo;
sannoDlg.ShowDialog(); // RHM 20120925 - Center dialog over PROMS window
//pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
}
void tv_CreateTimeCriticalActionSummary(object sender, vlnTreeEventArgs args)
{