Compare commits
55 Commits
C2025-023-
...
c45dbf1dac
Author | SHA1 | Date | |
---|---|---|---|
c45dbf1dac | |||
2d08629608 | |||
49bc67a64f | |||
abec4d9281 | |||
149bc601e2 | |||
66deede936 | |||
0df5511bf7 | |||
2e68218cfe | |||
80f3568dbd | |||
5fd0ff9e71 | |||
4dcfa05157 | |||
42648f31a5 | |||
e0b628dce9 | |||
6e9c7e28e6 | |||
ac091a7d26 | |||
8f31532917 | |||
612e7955cf | |||
ce92031ff7 | |||
5a7e63871d | |||
7ade7f6e24 | |||
fb01a4f8df | |||
eacdca8669 | |||
df97a6dd01 | |||
0259d4ff1d | |||
f71e9938bb | |||
69f8e3f4fc | |||
f49c888307 | |||
04a2da4371 | |||
59372b23e4 | |||
2970c0d7d4 | |||
392f1b09b2 | |||
79f66e9641 | |||
e90fceca86 | |||
24d5cee8b4 | |||
31f608a9ec | |||
1ba4c4f343 | |||
700d9656b2 | |||
0c17d9abc2 | |||
2c1476b74c | |||
0fa71727ac | |||
20cacf26ae | |||
1d406b0c7e | |||
a099d27b86 | |||
717251ca5e | |||
5d3bb41275 | |||
e5211fee00 | |||
41cb078a94 | |||
0a5e4076e1 | |||
c3534e21fa | |||
06159c6b68 | |||
22c14d169b | |||
db09db3cd0 | |||
ba8a8b8673 | |||
6f354bfeee | |||
818d764b3d |
Binary file not shown.
@@ -23810,6 +23810,60 @@ GO
|
||||
IF (@@Error = 0) PRINT 'Running vesp_UpdateUserSettings Succeeded'
|
||||
ELSE PRINT 'Running vesp_UpdateUserSettings Failed to Execute'
|
||||
GO
|
||||
|
||||
-- =============================================
|
||||
-- Author: Matthew Schill
|
||||
-- Create date: 5/19/2025
|
||||
-- Description: Allow option to not prompt user with MS Word messages
|
||||
-- when generating Summaries
|
||||
-- =============================================
|
||||
--- MSWordSummaryPrompt = ahouls user be prompted with message?
|
||||
-- default = yes (true)
|
||||
IF NOT EXISTS(SELECT *
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE TABLE_NAME = 'Users'
|
||||
AND COLUMN_NAME = 'MSWordSummaryPrompt')
|
||||
ALTER TABLE Users ADD MSWordSummaryPrompt bit NOT NULL DEFAULT(1);
|
||||
go
|
||||
-- Display the status
|
||||
IF (@@Error = 0) PRINT 'Altered table [Users] Succeeded for MSWordSummaryPrompt'
|
||||
ELSE PRINT 'Altered table [Users] Error on Alter for MSWordSummaryPrompt'
|
||||
go
|
||||
|
||||
|
||||
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_UpdateUserSettingMSWordSummaryPrompt]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
|
||||
DROP PROCEDURE [vesp_UpdateUserSettingMSWordSummaryPrompt];
|
||||
GO
|
||||
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
-- =============================================
|
||||
-- Author: Matthew Schill
|
||||
-- Create date: 5/19/2025
|
||||
-- Description: Allow option to not prompt user with MS Word messages
|
||||
-- when generating Summaries
|
||||
-- =============================================
|
||||
CREATE PROCEDURE [dbo].[vesp_UpdateUserSettingMSWordSummaryPrompt]
|
||||
|
||||
(
|
||||
@UID varchar(100),
|
||||
@Prompt bit = null
|
||||
)
|
||||
WITH EXECUTE AS OWNER
|
||||
AS
|
||||
UPDATE Users SET
|
||||
MSWordSummaryPrompt = ISNULL(@Prompt, MSWordSummaryPrompt)
|
||||
WHERE UserID =@UID
|
||||
|
||||
RETURN
|
||||
GO
|
||||
|
||||
IF (@@Error = 0) PRINT 'Running vesp_UpdateUserSettingMSWordSummaryPrompt Succeeded'
|
||||
ELSE PRINT 'Running vesp_UpdateUserSettingMSWordSummaryPrompt Failed to Execute'
|
||||
GO
|
||||
|
||||
--- begin changes for:
|
||||
---C2025-023 - Electronic Procedures - Modifications to PROMS
|
||||
--- The following IsEPAnnotationType column was added for EP Annotations.
|
||||
@@ -24029,6 +24083,7 @@ Go
|
||||
--- end changes for:
|
||||
---C2025-023 - Electronic Procedures - Modifications to PROMS
|
||||
|
||||
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
| ADD New Code Before this Block |
|
||||
@@ -24062,8 +24117,8 @@ BEGIN TRY -- Try Block
|
||||
DECLARE @RevDate varchar(255)
|
||||
DECLARE @RevDescription varchar(255)
|
||||
|
||||
set @RevDate = '4/8/2025 11:24'
|
||||
set @RevDescription = 'Added support for EP Viewer Editing'
|
||||
set @RevDate = '5/19/2025 8:44 AM'
|
||||
set @RevDescription = 'C2025-013 Add ability to disable message that opening Summaries in MS Word'
|
||||
|
||||
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
|
||||
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
|
||||
|
@@ -2117,11 +2117,14 @@ namespace VEPROMS.CSLA.Library
|
||||
public EPFields GetValidEPFields(int AnnTypeID)
|
||||
{
|
||||
EPFields filtered = new EPFields();
|
||||
EPFields unfiltered = ActiveFormat.PlantFormat.EPFormatFiles.First(x => x.AnnotationTypeID == AnnTypeID).FieldList;
|
||||
|
||||
if (ActiveFormat.PlantFormat.EPFormatFiles.Count == 0) return filtered;
|
||||
if ((int)MyContent.Type < 20000) return filtered;
|
||||
EPFields unfiltered = ActiveFormat.PlantFormat.EPFormatFiles.Find(x => x.AnnotationTypeID == AnnTypeID)?.FieldList;
|
||||
if (unfiltered == null) return filtered;
|
||||
|
||||
//Build list of step type and step type of it's parents
|
||||
List<string> steptypelist = new List<string>();
|
||||
if ((int)MyContent.Type < 20000) return filtered;
|
||||
int stepType = ((int)MyContent.Type) % 10000;
|
||||
StepDataList sdlist = ActiveFormat.PlantFormat.FormatData.StepDataList;
|
||||
if (stepType > sdlist.MaxIndex)
|
||||
@@ -2152,6 +2155,13 @@ namespace VEPROMS.CSLA.Library
|
||||
return filtered;
|
||||
}
|
||||
|
||||
// C2025-023 - Electronic Procedures - Modifications to PROMS
|
||||
//return true if any EP Format files attached to the item's
|
||||
public bool HasEPformat(int AnnTypeID)
|
||||
{
|
||||
return GetValidEPFields(AnnTypeID).Count > 0;
|
||||
}
|
||||
|
||||
// determine if the the current step should automatically be placed on the Continuous Action Summary
|
||||
// Note, this logic only checks the format setting of the step. We will check the value of the Tag's Check Box later on.
|
||||
public bool IncludeOnContActSum
|
||||
|
@@ -155,7 +155,7 @@ namespace Volian.Controls.Library
|
||||
this.btnEPAnnotation.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnEPAnnotation.Name = "btnEPAnnotation";
|
||||
this.btnEPAnnotation.Size = new System.Drawing.Size(53, 20);
|
||||
this.superTooltip1.SetSuperTooltip(this.btnEPAnnotation, new DevComponents.DotNetBar.SuperTooltipInfo("Remove Annotation", "", "This will remove the currently selected annotation.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
|
||||
this.superTooltip1.SetSuperTooltip(this.btnEPAnnotation, new DevComponents.DotNetBar.SuperTooltipInfo("Open Annotation", "", "This will open Electronic Procedure Details for this Annotation.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
|
||||
this.btnEPAnnotation.TabIndex = 5;
|
||||
this.btnEPAnnotation.Text = "Open";
|
||||
this.btnEPAnnotation.Visible = false;
|
||||
|
@@ -340,7 +340,7 @@ namespace Volian.Controls.Library
|
||||
if ((_Annotations != null) && (dgAnnotations.Rows.Count > 0))
|
||||
{
|
||||
CurrentAnnotation = _Annotations[dgAnnotations.CurrentRow.Index];
|
||||
if (CurrentAnnotation.MyAnnotationType.IsEPAnnotationType)
|
||||
if (CurrentAnnotation.MyAnnotationType.IsEPAnnotationType && CurrentItem.HasEPformat(CurrentAnnotation.MyAnnotationType.TypeID))
|
||||
btnEPAnnotation.Visible = true;
|
||||
}
|
||||
else
|
||||
|
@@ -20,7 +20,7 @@ namespace Volian.Controls.Library
|
||||
private AnnotationConfig MyConfig;
|
||||
|
||||
private StepTabRibbon _MyStepTabRibbon;
|
||||
private Dictionary<string, StepRTB> _DicStepRtb;
|
||||
private Dictionary<string, TextBox> _DicTB;
|
||||
private Dictionary<string, CheckBox> _DicCheckBox;
|
||||
private Dictionary<string, ComboBox> _DicComboBox;
|
||||
private Dictionary<string, ComboBox> _DicSingleRO;
|
||||
@@ -32,7 +32,7 @@ namespace Volian.Controls.Library
|
||||
public frmEPAnnotationDetails(AnnotationInfo currAnn)
|
||||
{
|
||||
InitializeComponent();
|
||||
_DicStepRtb = new Dictionary<string, StepRTB>();
|
||||
_DicTB = new Dictionary<string, TextBox>();
|
||||
_DicCheckBox = new Dictionary<string, CheckBox>();
|
||||
_DicComboBox = new Dictionary<string, ComboBox>();
|
||||
_DicSingleRO = new Dictionary<string, ComboBox>();
|
||||
@@ -72,28 +72,20 @@ namespace Volian.Controls.Library
|
||||
|
||||
if (EP.type.ToLower() == "text")
|
||||
{
|
||||
StepRTB tb = new StepRTB();
|
||||
tb.Font = tb.FormatFont = new Font("Arial", 8);
|
||||
tb.FieldToEdit = E_FieldToEdit.PSI; //use same right click menu as PSI
|
||||
TextBox tb = new TextBox();
|
||||
tb.Font = tb.Font = new Font("Arial", 8);
|
||||
tb.BorderStyle = BorderStyle.FixedSingle;
|
||||
//aligning to both left and right stretches the textbox to the width of the form
|
||||
tb.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
|
||||
tb.Enter += new System.EventHandler(this.FieldStepRTB_Enter);
|
||||
|
||||
string val = MyConfig.GetValue("EP", EP.name).Replace("\\u8209?", "-");
|
||||
DisplayText dt = new DisplayText(val, new VE_Font("Arial", 10, E_Style.None, 12), false);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Arial;}");
|
||||
sb.Append(@"{\f1\fnil\fcharset0 Arial;}}{\colortbl ;\red255\green0\blue0;}"); //C2017-036 changed to just Arial because Microsoft removed Arial Unicode MS with Word16
|
||||
sb.Append(@"\viewkind4\uc1\pard\sl-240\slmult0\fs" + (int)(this.Font.SizeInPoints * 2) + " " + dt.StartText + @"}");
|
||||
tb.Rtf = sb.ToString();
|
||||
string val = MyConfig.GetValue("EP", EP.name).Replace("\\u8209?", "-").Replace(@"\u9586?", @"\");
|
||||
tb.Text = val;
|
||||
tb.Visible = true;
|
||||
tb.Height = EP.numlines * tb.Font.Height + 1 + tb.Margin.Vertical;
|
||||
tb.MinimumSize = new Size(0, EP.numlines * tb.Font.Height + 1 + tb.Margin.Vertical);
|
||||
if (EP.numlines > 1)
|
||||
{
|
||||
tb.Multiline = true;
|
||||
tb.ScrollBars = RichTextBoxScrollBars.Both;
|
||||
tb.ScrollBars = ScrollBars.Both;
|
||||
panelEP.RowStyles.Insert(panelEP.RowCount - 1, new RowStyle(SizeType.Absolute, 50));
|
||||
}
|
||||
else
|
||||
@@ -101,7 +93,7 @@ namespace Volian.Controls.Library
|
||||
panelEP.RowStyles.Insert(panelEP.RowCount - 1, new RowStyle(SizeType.AutoSize));
|
||||
}
|
||||
|
||||
_DicStepRtb.Add(EP.name, tb);
|
||||
_DicTB.Add(EP.name, tb);
|
||||
panelEP.Controls.Add(tb, 1, panelEP.RowCount - 1);
|
||||
}
|
||||
else
|
||||
@@ -226,9 +218,8 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (EP.type.ToLower() == "text")
|
||||
{
|
||||
StepRTB cur = _DicStepRtb[EP.name];
|
||||
string rtf = cur.Rtf;
|
||||
string newval = DisplayText.StaticStripRtfCommands(rtf, false);
|
||||
TextBox cur = _DicTB[EP.name];
|
||||
string newval = cur.Text;
|
||||
string oldval = MyConfig.GetValue("EP", EP.name);
|
||||
if (oldval != newval)
|
||||
{
|
||||
@@ -318,11 +309,6 @@ namespace Volian.Controls.Library
|
||||
//remove events so no memory loss
|
||||
private void frmEPAnnotationDetails_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
foreach (StepRTB tb in _DicStepRtb.Values)
|
||||
{
|
||||
tb.Enter -= FieldStepRTB_Enter;
|
||||
}
|
||||
|
||||
foreach (ListBoxMulti lb in _DicMultiRO.Values)
|
||||
{
|
||||
lb.Dispose();
|
||||
|
Reference in New Issue
Block a user