Fixed logic to add ROImages so that adding a duplicate record will not cause the code to crash.

Fixed the layout of the Tag Panel so that the Step Type can be changed,
This commit is contained in:
Rich 2015-07-23 16:25:26 +00:00
parent 5f117cf611
commit 03d5bb04f8
2 changed files with 116 additions and 57 deletions

View File

@ -10850,7 +10850,6 @@ GO
IF (@@Error = 0) PRINT 'Procedure Creation: vesp_ListItemsAfterLastChanged Succeeded'
ELSE PRINT 'Procedure Creation: vesp_ListItemsAfterLastChanged Error on Creation'
GO
GO
/****** Object: StoredProcedure [ve_GetShortPath] ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[ve_GetShortPath]') AND OBJECTPROPERTY(id,N'IsScalarFunction') = 1)
@ -10934,4 +10933,66 @@ GO
IF (@@Error = 0) PRINT 'ScalarFunction Creation: ve_GetShortPath Succeeded'
ELSE PRINT 'ScalarFunction Creation: ve_GetShortPath Error on Creation'
GO
PRINT '20150616 - Uses VarChar(4) for Siblings!'
/****** Object: StoredProcedure [addROImage] ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[addROImage]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE addROImage;
GO
/*****************************************************************************
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2012 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
CREATE PROCEDURE [dbo].[addROImage]
(
@RODbID int,
@FileName nvarchar(255),
@Content varbinary(MAX),
@Config nvarchar(MAX)=null,
@DTS datetime,
@UserID nvarchar(100),
@newImageID int output,
@newLastChanged timestamp output
)
WITH EXECUTE AS OWNER
AS
BEGIN TRY -- Try Block
BEGIN TRANSACTION
IF exists(select * from ROImages where @rodbid = rodbid and @FileName=FileName and @DTS = DTS)
BEGIN
select @newImageID = ImageID from ROImages where @rodbid = rodbid and @FileName=FileName and @DTS = DTS
END
ELSE
BEGIN
INSERT INTO [ROImages]
(
[RODbID],
[FileName],
[Content],
[Config],
[DTS],
[UserID]
)
VALUES
(
@RODbID,
@FileName,
@Content,
@Config,
@DTS,
@UserID
)
SELECT @newImageID= SCOPE_IDENTITY()
END
SELECT @newLastChanged=[LastChanged]
FROM [ROImages] WHERE [ImageID]=@newImageID
IF( @@TRANCOUNT > 0 ) COMMIT
END TRY
BEGIN CATCH -- Catch Block
IF( @@TRANCOUNT = 1 ) ROLLBACK -- Only rollback if top level
ELSE IF( @@TRANCOUNT > 1 ) COMMIT -- Otherwise commit. Top level will rollback
EXEC vlnErrorHandler
END CATCH
IF (@@Error = 0) PRINT 'Procedure Creation: addROImage Succeeded'
ELSE PRINT 'Procedure Creation: addROImage Error on Creation'
GO
PRINT '20150722 Fixed AddROImage for WCN'

View File

@ -63,10 +63,10 @@ namespace Volian.Controls.Library
this.groupPanelPaginate.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.groupPanelPaginate.Controls.Add(this.cbPageBreak);
this.groupPanelPaginate.Dock = System.Windows.Forms.DockStyle.Top;
this.groupPanelPaginate.Location = new System.Drawing.Point(0, 382);
this.groupPanelPaginate.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.groupPanelPaginate.Location = new System.Drawing.Point(0, 330);
this.groupPanelPaginate.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupPanelPaginate.Name = "groupPanelPaginate";
this.groupPanelPaginate.Size = new System.Drawing.Size(229, 71);
this.groupPanelPaginate.Size = new System.Drawing.Size(172, 58);
//
//
//
@ -105,10 +105,10 @@ namespace Volian.Controls.Library
//
//
this.cbPageBreak.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbPageBreak.Location = new System.Drawing.Point(4, 14);
this.cbPageBreak.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cbPageBreak.Location = new System.Drawing.Point(3, 11);
this.cbPageBreak.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.cbPageBreak.Name = "cbPageBreak";
this.cbPageBreak.Size = new System.Drawing.Size(140, 17);
this.cbPageBreak.Size = new System.Drawing.Size(122, 15);
this.superTooltipTags.SetSuperTooltip(this.cbPageBreak, new DevComponents.DotNetBar.SuperTooltipInfo("Manual Page Break", "", "When set, starts this step at the top of a page.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cbPageBreak.TabIndex = 0;
this.cbPageBreak.Text = "Manual Page Break";
@ -122,11 +122,10 @@ namespace Volian.Controls.Library
//
//
this.cbCAS.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbCAS.Enabled = false;
this.cbCAS.Location = new System.Drawing.Point(4, 17);
this.cbCAS.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cbCAS.Location = new System.Drawing.Point(3, 14);
this.cbCAS.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.cbCAS.Name = "cbCAS";
this.cbCAS.Size = new System.Drawing.Size(187, 17);
this.cbCAS.Size = new System.Drawing.Size(162, 15);
this.superTooltipTags.SetSuperTooltip(this.cbCAS, new DevComponents.DotNetBar.SuperTooltipInfo("Continuous Action Summary", "", "Include this in the Continuous Action Summary section", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cbCAS.TabIndex = 1;
this.cbCAS.Text = "Continuous Action Summary";
@ -141,10 +140,10 @@ namespace Volian.Controls.Library
this.cmbCheckoff.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCheckoff.FormattingEnabled = true;
this.cmbCheckoff.ItemHeight = 17;
this.cmbCheckoff.Location = new System.Drawing.Point(4, 21);
this.cmbCheckoff.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cmbCheckoff.Location = new System.Drawing.Point(3, 17);
this.cmbCheckoff.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.cmbCheckoff.Name = "cmbCheckoff";
this.cmbCheckoff.Size = new System.Drawing.Size(217, 23);
this.cmbCheckoff.Size = new System.Drawing.Size(164, 23);
this.cmbCheckoff.TabIndex = 0;
this.cmbCheckoff.WatermarkFont = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cmbCheckoff.WatermarkText = "select signoff / checkoff";
@ -156,10 +155,10 @@ namespace Volian.Controls.Library
this.groupPanelCheckoff.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.groupPanelCheckoff.Controls.Add(this.cmbCheckoff);
this.groupPanelCheckoff.Dock = System.Windows.Forms.DockStyle.Top;
this.groupPanelCheckoff.Location = new System.Drawing.Point(0, 154);
this.groupPanelCheckoff.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.groupPanelCheckoff.Location = new System.Drawing.Point(0, 145);
this.groupPanelCheckoff.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupPanelCheckoff.Name = "groupPanelCheckoff";
this.groupPanelCheckoff.Size = new System.Drawing.Size(229, 95);
this.groupPanelCheckoff.Size = new System.Drawing.Size(172, 77);
//
//
//
@ -202,10 +201,10 @@ namespace Volian.Controls.Library
this.groupPanelChgBar.Controls.Add(this.rbChgBarOff);
this.groupPanelChgBar.Controls.Add(this.rbChgBarOn);
this.groupPanelChgBar.Dock = System.Windows.Forms.DockStyle.Top;
this.groupPanelChgBar.Location = new System.Drawing.Point(0, 249);
this.groupPanelChgBar.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.groupPanelChgBar.Location = new System.Drawing.Point(0, 222);
this.groupPanelChgBar.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupPanelChgBar.Name = "groupPanelChgBar";
this.groupPanelChgBar.Size = new System.Drawing.Size(229, 133);
this.groupPanelChgBar.Size = new System.Drawing.Size(172, 108);
//
//
//
@ -239,29 +238,30 @@ namespace Volian.Controls.Library
//
// tbChgID
//
this.tbChgID.Location = new System.Drawing.Point(0, 82);
this.tbChgID.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.tbChgID.Location = new System.Drawing.Point(0, 67);
this.tbChgID.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.tbChgID.Name = "tbChgID";
this.tbChgID.Size = new System.Drawing.Size(107, 22);
this.tbChgID.Size = new System.Drawing.Size(81, 20);
this.tbChgID.TabIndex = 4;
this.tbChgID.TextChanged += new System.EventHandler(this.tbChgID_TextChanged);
//
// lblChgId
//
this.lblChgId.AutoSize = true;
this.lblChgId.Location = new System.Drawing.Point(0, 64);
this.lblChgId.Location = new System.Drawing.Point(0, 52);
this.lblChgId.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblChgId.Name = "lblChgId";
this.lblChgId.Size = new System.Drawing.Size(74, 17);
this.lblChgId.Size = new System.Drawing.Size(58, 13);
this.lblChgId.TabIndex = 3;
this.lblChgId.Text = "Change ID";
//
// rbChgBarOff
//
this.rbChgBarOff.AutoSize = true;
this.rbChgBarOff.Location = new System.Drawing.Point(0, 32);
this.rbChgBarOff.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.rbChgBarOff.Location = new System.Drawing.Point(0, 26);
this.rbChgBarOff.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.rbChgBarOff.Name = "rbChgBarOff";
this.rbChgBarOff.Size = new System.Drawing.Size(56, 21);
this.rbChgBarOff.Size = new System.Drawing.Size(45, 17);
this.superTooltipTags.SetSuperTooltip(this.rbChgBarOff, new DevComponents.DotNetBar.SuperTooltipInfo("Change Bar OFF", "", "Turn change bar off. Note that \'OVERRIDE\' will turn off a change bar even though" +
" text is changed.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.rbChgBarOff.TabIndex = 2;
@ -273,10 +273,10 @@ namespace Volian.Controls.Library
// rbChgBarOn
//
this.rbChgBarOn.AutoSize = true;
this.rbChgBarOn.Location = new System.Drawing.Point(0, 5);
this.rbChgBarOn.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.rbChgBarOn.Location = new System.Drawing.Point(0, 4);
this.rbChgBarOn.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.rbChgBarOn.Name = "rbChgBarOn";
this.rbChgBarOn.Size = new System.Drawing.Size(50, 21);
this.rbChgBarOn.Size = new System.Drawing.Size(41, 17);
this.superTooltipTags.SetSuperTooltip(this.rbChgBarOn, new DevComponents.DotNetBar.SuperTooltipInfo("Change Bar ON", "", "Add a change bar on this step", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.rbChgBarOn.TabIndex = 1;
this.rbChgBarOn.TabStop = true;
@ -286,7 +286,6 @@ namespace Volian.Controls.Library
//
// groupPanelChgStepType
//
this.groupPanelChgStepType.AutoSize = true;
this.groupPanelChgStepType.BackColor = System.Drawing.SystemColors.Control;
this.groupPanelChgStepType.CanvasColor = System.Drawing.SystemColors.Control;
this.groupPanelChgStepType.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
@ -295,9 +294,9 @@ namespace Volian.Controls.Library
this.groupPanelChgStepType.Controls.Add(this.listBoxStepTypes);
this.groupPanelChgStepType.Dock = System.Windows.Forms.DockStyle.Top;
this.groupPanelChgStepType.Location = new System.Drawing.Point(0, 0);
this.groupPanelChgStepType.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.groupPanelChgStepType.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupPanelChgStepType.Name = "groupPanelChgStepType";
this.groupPanelChgStepType.Size = new System.Drawing.Size(229, 154);
this.groupPanelChgStepType.Size = new System.Drawing.Size(172, 145);
//
//
//
@ -339,20 +338,20 @@ namespace Volian.Controls.Library
//
this.lblNoTypeChgReason.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.lblNoTypeChgReason.ForeColor = System.Drawing.Color.Red;
this.lblNoTypeChgReason.Location = new System.Drawing.Point(3, 34);
this.lblNoTypeChgReason.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.lblNoTypeChgReason.Location = new System.Drawing.Point(2, 28);
this.lblNoTypeChgReason.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.lblNoTypeChgReason.Name = "lblNoTypeChgReason";
this.lblNoTypeChgReason.Size = new System.Drawing.Size(219, 118);
this.lblNoTypeChgReason.Size = new System.Drawing.Size(164, 96);
this.lblNoTypeChgReason.TabIndex = 5;
//
// cbChgAll
//
this.cbChgAll.AutoSize = true;
this.cbChgAll.BackColor = System.Drawing.Color.Transparent;
this.cbChgAll.Location = new System.Drawing.Point(3, 7);
this.cbChgAll.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cbChgAll.Location = new System.Drawing.Point(2, 6);
this.cbChgAll.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.cbChgAll.Name = "cbChgAll";
this.cbChgAll.Size = new System.Drawing.Size(153, 21);
this.cbChgAll.Size = new System.Drawing.Size(119, 17);
this.superTooltipTags.SetSuperTooltip(this.cbChgAll, new DevComponents.DotNetBar.SuperTooltipInfo("Change Step Type - All At Level", "", "When checked, all steps at the level of current step will have their step type ch" +
"anged to the selected type in list below...", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cbChgAll.TabIndex = 4;
@ -364,11 +363,10 @@ namespace Volian.Controls.Library
this.listBoxStepTypes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listBoxStepTypes.FormattingEnabled = true;
this.listBoxStepTypes.ItemHeight = 16;
this.listBoxStepTypes.Location = new System.Drawing.Point(3, 34);
this.listBoxStepTypes.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.listBoxStepTypes.Location = new System.Drawing.Point(2, 28);
this.listBoxStepTypes.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.listBoxStepTypes.Name = "listBoxStepTypes";
this.listBoxStepTypes.Size = new System.Drawing.Size(217, 116);
this.listBoxStepTypes.Size = new System.Drawing.Size(164, 95);
this.superTooltipTags.SetSuperTooltip(this.listBoxStepTypes, new DevComponents.DotNetBar.SuperTooltipInfo("Possible Step Types", "", "This list allows change of type showing all selections of any possible step type " +
"for the current step.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.listBoxStepTypes.TabIndex = 3;
@ -387,10 +385,10 @@ namespace Volian.Controls.Library
this.groupPanelIncludeOn.Controls.Add(this.cbPlaceKeeper);
this.groupPanelIncludeOn.Controls.Add(this.cbCAS);
this.groupPanelIncludeOn.Dock = System.Windows.Forms.DockStyle.Top;
this.groupPanelIncludeOn.Location = new System.Drawing.Point(0, 453);
this.groupPanelIncludeOn.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.groupPanelIncludeOn.Location = new System.Drawing.Point(0, 388);
this.groupPanelIncludeOn.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupPanelIncludeOn.Name = "groupPanelIncludeOn";
this.groupPanelIncludeOn.Size = new System.Drawing.Size(229, 116);
this.groupPanelIncludeOn.Size = new System.Drawing.Size(172, 94);
//
//
//
@ -430,10 +428,10 @@ namespace Volian.Controls.Library
//
//
this.cbPlaceKeeperCont.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbPlaceKeeperCont.Location = new System.Drawing.Point(4, 64);
this.cbPlaceKeeperCont.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cbPlaceKeeperCont.Location = new System.Drawing.Point(3, 52);
this.cbPlaceKeeperCont.Margin = new System.Windows.Forms.Padding(2);
this.cbPlaceKeeperCont.Name = "cbPlaceKeeperCont";
this.cbPlaceKeeperCont.Size = new System.Drawing.Size(183, 17);
this.cbPlaceKeeperCont.Size = new System.Drawing.Size(158, 15);
this.cbPlaceKeeperCont.TabIndex = 1;
this.cbPlaceKeeperCont.Text = "Placekeeper as Cont Action";
this.cbPlaceKeeperCont.CheckedChanged += new System.EventHandler(this.cbPlaceKeeperCont_CheckedChanged);
@ -446,10 +444,10 @@ namespace Volian.Controls.Library
//
//
this.cbPlaceKeeper.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbPlaceKeeper.Location = new System.Drawing.Point(4, 41);
this.cbPlaceKeeper.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cbPlaceKeeper.Location = new System.Drawing.Point(3, 33);
this.cbPlaceKeeper.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.cbPlaceKeeper.Name = "cbPlaceKeeper";
this.cbPlaceKeeper.Size = new System.Drawing.Size(95, 17);
this.cbPlaceKeeper.Size = new System.Drawing.Size(84, 15);
this.cbPlaceKeeper.TabIndex = 1;
this.cbPlaceKeeper.Text = "Placekeeper";
this.cbPlaceKeeper.CheckedChanged += new System.EventHandler(this.cbPlacekeeper_CheckedChanged);
@ -508,7 +506,7 @@ namespace Volian.Controls.Library
//
// DisplayTags
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.groupPanelWcnTrnResp);
this.Controls.Add(this.groupPanelIncludeOn);
@ -516,9 +514,9 @@ namespace Volian.Controls.Library
this.Controls.Add(this.groupPanelChgBar);
this.Controls.Add(this.groupPanelCheckoff);
this.Controls.Add(this.groupPanelChgStepType);
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Name = "DisplayTags";
this.Size = new System.Drawing.Size(229, 729);
this.Size = new System.Drawing.Size(172, 512);
this.groupPanelPaginate.ResumeLayout(false);
this.groupPanelPaginate.PerformLayout();
this.groupPanelCheckoff.ResumeLayout(false);