Compare commits
7 Commits
C2025-027-
...
C2025-047-
Author | SHA1 | Date | |
---|---|---|---|
d4719fe05e | |||
6bdc7d85c4 | |||
6e20774edf | |||
a7c7744ff3 | |||
019aefbc61 | |||
81a23305ba | |||
4001abff02 |
@@ -63,18 +63,21 @@ namespace VEPROMS
|
||||
lstFrom.Items.Remove(item);
|
||||
}
|
||||
SetButtonsEditable();
|
||||
btnUpdate.Enabled = true;
|
||||
}
|
||||
|
||||
// Move all items to lstSelected.
|
||||
private void btnSelectAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
MoveAllItems(lstUnselected, lstSelected);
|
||||
btnUpdate.Enabled = true;
|
||||
}
|
||||
|
||||
// Move all items to lstUnselected.
|
||||
private void btnDeselectAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
MoveAllItems(lstSelected, lstUnselected);
|
||||
btnUpdate.Enabled = true;
|
||||
}
|
||||
|
||||
// Move all items from one ListBox to another.
|
||||
@@ -83,6 +86,7 @@ namespace VEPROMS
|
||||
lstTo.Items.AddRange(lstFrom.Items);
|
||||
lstFrom.Items.Clear();
|
||||
SetButtonsEditable();
|
||||
btnUpdate.Enabled = true;
|
||||
}
|
||||
|
||||
// Enable and disable buttons.
|
||||
@@ -93,8 +97,7 @@ namespace VEPROMS
|
||||
// Save selected list to DB.
|
||||
private void btnUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataTable dt2 = coverToTable();
|
||||
VEPROMS.CSLA.Library.AnnotationstypeSelections.Update(dt2, UserID);
|
||||
saveChanges();
|
||||
}
|
||||
public class AnnotataionItem
|
||||
{
|
||||
@@ -150,11 +153,31 @@ namespace VEPROMS
|
||||
{
|
||||
lstSelected.Items.Add(new AnnotataionItem(lstSelectedRow["Name"].ToString(), (int)lstSelectedRow["TypeID"]));
|
||||
}
|
||||
btnUpdate.Enabled = false;
|
||||
}
|
||||
|
||||
private void btnCancel_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
if (btnUpdate.Enabled == true)
|
||||
{
|
||||
string message = "Changes have not yet been saved. Do you want to save the changes prior to closing?";
|
||||
string title = "Save Annotation Selections";
|
||||
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
|
||||
DialogResult result = MessageBox.Show(message, title, buttons);
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
saveChanges();
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private DataTable coverToTable()
|
||||
@@ -169,6 +192,15 @@ namespace VEPROMS
|
||||
}
|
||||
return dt;
|
||||
}
|
||||
private void saveChanges()
|
||||
{
|
||||
DataTable dt2 = coverToTable();
|
||||
VEPROMS.CSLA.Library.AnnotationstypeSelections.Update(dt2, UserID);
|
||||
btnUpdate.Enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -24136,16 +24136,18 @@ CREATE PROCEDURE [dbo].[getAnnotationSelectListTypes]
|
||||
WITH EXECUTE AS OWNER
|
||||
AS
|
||||
SELECT
|
||||
[TypeID],
|
||||
[Name],
|
||||
[Config],
|
||||
[DTS],
|
||||
[UserID],
|
||||
[LastChanged],
|
||||
(SELECT COUNT(*) FROM [Annotations] WHERE [Annotations].[TypeID]= [TypeID]) [AnnotationCount],
|
||||
[IsEPAnnotationType]
|
||||
FROM [AnnotationTypes] --A
|
||||
WHERE TypeID NOT IN (SELECT TypeID FROM AnnotationTypeSelections WHERE UserID = @UserID)
|
||||
AT.[TypeID],
|
||||
AT.[Name],
|
||||
AT.[Config],
|
||||
AT.[DTS],
|
||||
AT.[UserID],
|
||||
AT.[LastChanged],
|
||||
(SELECT COUNT(*) FROM [Annotations] WHERE [Annotations].[TypeID]= AT.[TypeID]) [AnnotationCount],
|
||||
AT.[IsEPAnnotationType]
|
||||
FROM [AnnotationTypes] AT
|
||||
LEFT OUTER JOIN AnnotationTypeSelections ATS
|
||||
ON ATS.TypeID = AT.TypeID AND ATS.UserID = @UserID
|
||||
WHERE ATS.ASTypeID IS NULL
|
||||
GO
|
||||
|
||||
-- C2025-027 Annotation Type Filtering
|
||||
@@ -24325,8 +24327,8 @@ BEGIN TRY -- Try Block
|
||||
DECLARE @RevDate varchar(255)
|
||||
DECLARE @RevDescription varchar(255)
|
||||
|
||||
set @RevDate = '07/10/2025 2:30 PM'
|
||||
set @RevDescription = 'C2025-027 Annotation Type Filtering'
|
||||
set @RevDate = '07/31/2025 10:30 AM'
|
||||
set @RevDescription = 'SQL Optimization'
|
||||
|
||||
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
|
||||
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
|
||||
|
@@ -158,7 +158,7 @@ namespace VEPROMS
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(100, 35);
|
||||
this.btnCancel.TabIndex = 9;
|
||||
this.btnCancel.Text = "Cancel";
|
||||
this.btnCancel.Text = "Close";
|
||||
this.btnCancel.UseVisualStyleBackColor = true;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click_1);
|
||||
//
|
||||
@@ -203,7 +203,7 @@ namespace VEPROMS
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.Name = "dlgAnnotationsSelect";
|
||||
this.Text = "Select Annotation Types";
|
||||
this.Text = "Filter Annotation Types";
|
||||
this.Load += new System.EventHandler(this.DlgAnnotationsSelect_Load);
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
Reference in New Issue
Block a user