diff --git a/PROMS/DataLoader/PROMSFixes.Sql b/PROMS/DataLoader/PROMSFixes.Sql index 679cf29f..77084393 100644 --- a/PROMS/DataLoader/PROMSFixes.Sql +++ b/PROMS/DataLoader/PROMSFixes.Sql @@ -17397,8 +17397,26 @@ IF (@@Error = 0) PRINT 'Running vesp_UtilityCheckIndexes Succeeded' ELSE PRINT 'Running vesp_UtilityCheckIndexes Failed to Execute' GO - - +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getGridIds]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) +DROP PROCEDURE [getGridIds]; +GO +/***************************************************************************** + Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE + Copyright 2022 - Volian Enterprises, Inc. All rights reserved. +*****************************************************************************/ +CREATE PROCEDURE [dbo].[getGridIds] +WITH EXECUTE AS OWNER +AS +begin + SELECT + [ContentID] + FROM [Grids] + RETURN +end +GO +IF (@@Error = 0) PRINT 'Procedure Creation: [getGridIds] Succeeded' +ELSE PRINT 'Procedure Creation: [getGridIds] Error on Creation' +GO ----------------------------------------------------------------------------- @@ -17427,8 +17445,8 @@ BEGIN TRY -- Try Block DECLARE @RevDate varchar(255) DECLARE @RevDescription varchar(255) - set @RevDate = '01/17/2022 12:30 PM' - set @RevDescription = 'getAssociationsByVersionID fix' + set @RevDate = '06/02/2022 12:30 PM' + set @RevDescription = 'getGridIds fix for table searches' Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index 679cf29f..77084393 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -17397,8 +17397,26 @@ IF (@@Error = 0) PRINT 'Running vesp_UtilityCheckIndexes Succeeded' ELSE PRINT 'Running vesp_UtilityCheckIndexes Failed to Execute' GO - - +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getGridIds]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) +DROP PROCEDURE [getGridIds]; +GO +/***************************************************************************** + Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE + Copyright 2022 - Volian Enterprises, Inc. All rights reserved. +*****************************************************************************/ +CREATE PROCEDURE [dbo].[getGridIds] +WITH EXECUTE AS OWNER +AS +begin + SELECT + [ContentID] + FROM [Grids] + RETURN +end +GO +IF (@@Error = 0) PRINT 'Procedure Creation: [getGridIds] Succeeded' +ELSE PRINT 'Procedure Creation: [getGridIds] Error on Creation' +GO ----------------------------------------------------------------------------- @@ -17427,8 +17445,8 @@ BEGIN TRY -- Try Block DECLARE @RevDate varchar(255) DECLARE @RevDescription varchar(255) - set @RevDate = '01/17/2022 12:30 PM' - set @RevDescription = 'getAssociationsByVersionID fix' + set @RevDate = '06/02/2022 12:30 PM' + set @RevDescription = 'getGridIds fix for table searches' Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription diff --git a/PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs b/PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs index a3345e95..faefb089 100644 --- a/PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs @@ -52,6 +52,22 @@ this.expandableSplitter1 = new DevComponents.DotNetBar.ExpandableSplitter(); this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); this.sideNav1 = new DevComponents.DotNetBar.Controls.SideNav(); + this.sideNavPanel2 = new DevComponents.DotNetBar.Controls.SideNavPanel(); + this.swRefreshTblsForSrch = new DevComponents.DotNetBar.Controls.SwitchButton(); + this.lblRefreshTblForSrch = new DevComponents.DotNetBar.LabelX(); + this.warningBox4 = new DevComponents.DotNetBar.Controls.WarningBox(); + this.warningBox2 = new DevComponents.DotNetBar.Controls.WarningBox(); + this.swRmObsoleteROData = new DevComponents.DotNetBar.Controls.SwitchButton(); + this.swRefreshWordAttmts = new DevComponents.DotNetBar.Controls.SwitchButton(); + this.swStandardHypenChars = new DevComponents.DotNetBar.Controls.SwitchButton(); + this.labelX4 = new DevComponents.DotNetBar.LabelX(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); + this.labelX9 = new DevComponents.DotNetBar.LabelX(); + this.swRmOrphanDataRecs = new DevComponents.DotNetBar.Controls.SwitchButton(); + this.labelX10 = new DevComponents.DotNetBar.LabelX(); + this.labelX8 = new DevComponents.DotNetBar.LabelX(); + this.line2 = new DevComponents.DotNetBar.Controls.Line(); + this.btnRunRepair = new DevComponents.DotNetBar.ButtonX(); this.sideNavPanel1 = new DevComponents.DotNetBar.Controls.SideNavPanel(); this.warningBox3 = new DevComponents.DotNetBar.Controls.WarningBox(); this.labelX7 = new DevComponents.DotNetBar.LabelX(); @@ -74,20 +90,6 @@ this.labelX6 = new DevComponents.DotNetBar.LabelX(); this.warningBox1 = new DevComponents.DotNetBar.Controls.WarningBox(); this.btnFixLinks = new DevComponents.DotNetBar.ButtonX(); - this.sideNavPanel2 = new DevComponents.DotNetBar.Controls.SideNavPanel(); - this.warningBox4 = new DevComponents.DotNetBar.Controls.WarningBox(); - this.warningBox2 = new DevComponents.DotNetBar.Controls.WarningBox(); - this.swRmObsoleteROData = new DevComponents.DotNetBar.Controls.SwitchButton(); - this.swRefreshWordAttmts = new DevComponents.DotNetBar.Controls.SwitchButton(); - this.swStandardHypenChars = new DevComponents.DotNetBar.Controls.SwitchButton(); - this.labelX4 = new DevComponents.DotNetBar.LabelX(); - this.labelX5 = new DevComponents.DotNetBar.LabelX(); - this.labelX9 = new DevComponents.DotNetBar.LabelX(); - this.swRmOrphanDataRecs = new DevComponents.DotNetBar.Controls.SwitchButton(); - this.labelX10 = new DevComponents.DotNetBar.LabelX(); - this.labelX8 = new DevComponents.DotNetBar.LabelX(); - this.line2 = new DevComponents.DotNetBar.Controls.Line(); - this.btnRunRepair = new DevComponents.DotNetBar.ButtonX(); this.sideNavItem1 = new DevComponents.DotNetBar.Controls.SideNavItem(); this.separator1 = new DevComponents.DotNetBar.Separator(); this.sideNavItmCheck = new DevComponents.DotNetBar.Controls.SideNavItem(); @@ -114,10 +116,10 @@ this.pnlLater.SuspendLayout(); this.panelEx1.SuspendLayout(); this.sideNav1.SuspendLayout(); + this.sideNavPanel2.SuspendLayout(); this.sideNavPanel1.SuspendLayout(); this.sideNavPanel4.SuspendLayout(); this.sideNavPanel3.SuspendLayout(); - this.sideNavPanel2.SuspendLayout(); this.panelEx4.SuspendLayout(); this.SuspendLayout(); // @@ -475,6 +477,253 @@ this.sideNav1.TabIndex = 3; this.sideNav1.Text = "sideNav1"; // + // sideNavPanel2 + // + this.sideNavPanel2.Controls.Add(this.swRefreshTblsForSrch); + this.sideNavPanel2.Controls.Add(this.lblRefreshTblForSrch); + this.sideNavPanel2.Controls.Add(this.warningBox4); + this.sideNavPanel2.Controls.Add(this.warningBox2); + this.sideNavPanel2.Controls.Add(this.swRmObsoleteROData); + this.sideNavPanel2.Controls.Add(this.swRefreshWordAttmts); + this.sideNavPanel2.Controls.Add(this.swStandardHypenChars); + this.sideNavPanel2.Controls.Add(this.labelX4); + this.sideNavPanel2.Controls.Add(this.labelX5); + this.sideNavPanel2.Controls.Add(this.labelX9); + this.sideNavPanel2.Controls.Add(this.swRmOrphanDataRecs); + this.sideNavPanel2.Controls.Add(this.labelX10); + this.sideNavPanel2.Controls.Add(this.labelX8); + this.sideNavPanel2.Controls.Add(this.line2); + this.sideNavPanel2.Controls.Add(this.btnRunRepair); + this.sideNavPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.sideNavPanel2.Location = new System.Drawing.Point(80, 31); + this.sideNavPanel2.Name = "sideNavPanel2"; + this.sideNavPanel2.Size = new System.Drawing.Size(300, 494); + this.sideNavPanel2.TabIndex = 6; + this.sideNavPanel2.Visible = false; + // + // swRefreshTblsForSrch + // + // + // + // + this.swRefreshTblsForSrch.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.swRefreshTblsForSrch.Location = new System.Drawing.Point(10, 153); + this.swRefreshTblsForSrch.Name = "swRefreshTblsForSrch"; + this.swRefreshTblsForSrch.Size = new System.Drawing.Size(91, 22); + this.swRefreshTblsForSrch.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.superTooltip1.SetSuperTooltip(this.swRefreshTblsForSrch, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Word Attachments", "", resources.GetString("swRefreshTblsForSrch.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 200))); + this.swRefreshTblsForSrch.SwitchClickTogglesValue = true; + this.swRefreshTblsForSrch.TabIndex = 32; + this.swRefreshTblsForSrch.Value = true; + this.swRefreshTblsForSrch.ValueObject = "Y"; + // + // lblRefreshTblForSrch + // + this.lblRefreshTblForSrch.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.lblRefreshTblForSrch.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.lblRefreshTblForSrch.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblRefreshTblForSrch.Location = new System.Drawing.Point(107, 153); + this.lblRefreshTblForSrch.Name = "lblRefreshTblForSrch"; + this.lblRefreshTblForSrch.Size = new System.Drawing.Size(186, 22); + this.superTooltip1.SetSuperTooltip(this.lblRefreshTblForSrch, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Word Attachments", "", resources.GetString("lblRefreshTblForSrch.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 200))); + this.lblRefreshTblForSrch.TabIndex = 31; + this.lblRefreshTblForSrch.Text = "Refresh Tables For Search"; + // + // warningBox4 + // + this.warningBox4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(219)))), ((int)(((byte)(249))))); + this.warningBox4.CloseButtonVisible = false; + this.warningBox4.Image = ((System.Drawing.Image)(resources.GetObject("warningBox4.Image"))); + this.warningBox4.Location = new System.Drawing.Point(12, 264); + this.warningBox4.Name = "warningBox4"; + this.warningBox4.OptionsButtonVisible = false; + this.warningBox4.Size = new System.Drawing.Size(264, 32); + this.warningBox4.TabIndex = 30; + this.warningBox4.Text = "NOTE These tools can take a long time to run"; + // + // warningBox2 + // + this.warningBox2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(219)))), ((int)(((byte)(249))))); + this.warningBox2.CloseButtonVisible = false; + this.warningBox2.Image = ((System.Drawing.Image)(resources.GetObject("warningBox2.Image"))); + this.warningBox2.Location = new System.Drawing.Point(12, 302); + this.warningBox2.Name = "warningBox2"; + this.warningBox2.OptionsButtonVisible = false; + this.warningBox2.Size = new System.Drawing.Size(264, 43); + this.warningBox2.TabIndex = 28; + this.warningBox2.Text = " Be sure there is a current backup of the \r\n database prior to running these func" + + "tions"; + // + // swRmObsoleteROData + // + // + // + // + this.swRmObsoleteROData.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.swRmObsoleteROData.Location = new System.Drawing.Point(10, 66); + this.swRmObsoleteROData.Name = "swRmObsoleteROData"; + this.swRmObsoleteROData.Size = new System.Drawing.Size(91, 22); + this.swRmObsoleteROData.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.superTooltip1.SetSuperTooltip(this.swRmObsoleteROData, new DevComponents.DotNetBar.SuperTooltipInfo("Remove Obsolete RO Data", "", resources.GetString("swRmObsoleteROData.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(230, 205))); + this.swRmObsoleteROData.SwitchClickTogglesValue = true; + this.swRmObsoleteROData.TabIndex = 26; + this.swRmObsoleteROData.Value = true; + this.swRmObsoleteROData.ValueObject = "Y"; + this.swRmObsoleteROData.ValueChanged += new System.EventHandler(this.swCk_ValueChanged); + // + // swRefreshWordAttmts + // + // + // + // + this.swRefreshWordAttmts.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.swRefreshWordAttmts.Location = new System.Drawing.Point(10, 122); + this.swRefreshWordAttmts.Name = "swRefreshWordAttmts"; + this.swRefreshWordAttmts.Size = new System.Drawing.Size(91, 22); + this.swRefreshWordAttmts.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.superTooltip1.SetSuperTooltip(this.swRefreshWordAttmts, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Word Attachments", "", resources.GetString("swRefreshWordAttmts.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 200))); + this.swRefreshWordAttmts.SwitchClickTogglesValue = true; + this.swRefreshWordAttmts.TabIndex = 27; + this.swRefreshWordAttmts.Value = true; + this.swRefreshWordAttmts.ValueObject = "Y"; + this.swRefreshWordAttmts.ValueChanged += new System.EventHandler(this.swCk_ValueChanged); + // + // swStandardHypenChars + // + // + // + // + this.swStandardHypenChars.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.swStandardHypenChars.Location = new System.Drawing.Point(10, 94); + this.swStandardHypenChars.Name = "swStandardHypenChars"; + this.swStandardHypenChars.Size = new System.Drawing.Size(91, 22); + this.swStandardHypenChars.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.superTooltip1.SetSuperTooltip(this.swStandardHypenChars, new DevComponents.DotNetBar.SuperTooltipInfo("Standardize Hyphen Characters", "", resources.GetString("swStandardHypenChars.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(225, 129))); + this.swStandardHypenChars.SwitchClickTogglesValue = true; + this.swStandardHypenChars.TabIndex = 27; + this.swStandardHypenChars.Value = true; + this.swStandardHypenChars.ValueObject = "Y"; + this.swStandardHypenChars.ValueChanged += new System.EventHandler(this.swCk_ValueChanged); + // + // labelX4 + // + this.labelX4.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelX4.Location = new System.Drawing.Point(107, 66); + this.labelX4.Name = "labelX4"; + this.labelX4.Size = new System.Drawing.Size(167, 22); + this.superTooltip1.SetSuperTooltip(this.labelX4, new DevComponents.DotNetBar.SuperTooltipInfo("Remove Obsolete RO Data", "", resources.GetString("labelX4.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(230, 205))); + this.labelX4.TabIndex = 24; + this.labelX4.Text = "Remove Obsolete RO Data"; + // + // labelX5 + // + this.labelX5.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelX5.Location = new System.Drawing.Point(107, 122); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(186, 22); + this.superTooltip1.SetSuperTooltip(this.labelX5, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Word Attachments", "", resources.GetString("labelX5.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 200))); + this.labelX5.TabIndex = 25; + this.labelX5.Text = "Refresh Word Attachments"; + // + // labelX9 + // + this.labelX9.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.labelX9.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelX9.Location = new System.Drawing.Point(107, 94); + this.labelX9.Name = "labelX9"; + this.labelX9.Size = new System.Drawing.Size(186, 22); + this.superTooltip1.SetSuperTooltip(this.labelX9, new DevComponents.DotNetBar.SuperTooltipInfo("Standardize Hyphen Characters", "", resources.GetString("labelX9.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(225, 129))); + this.labelX9.TabIndex = 25; + this.labelX9.Text = "Standardize Hyphen Characters"; + // + // swRmOrphanDataRecs + // + // + // + // + this.swRmOrphanDataRecs.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.swRmOrphanDataRecs.Location = new System.Drawing.Point(10, 38); + this.swRmOrphanDataRecs.Name = "swRmOrphanDataRecs"; + this.swRmOrphanDataRecs.Size = new System.Drawing.Size(91, 22); + this.swRmOrphanDataRecs.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.superTooltip1.SetSuperTooltip(this.swRmOrphanDataRecs, new DevComponents.DotNetBar.SuperTooltipInfo("Remove Orphan Data Records", "", resources.GetString("swRmOrphanDataRecs.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(325, 140))); + this.swRmOrphanDataRecs.SwitchClickTogglesValue = true; + this.swRmOrphanDataRecs.TabIndex = 23; + this.swRmOrphanDataRecs.Value = true; + this.swRmOrphanDataRecs.ValueObject = "Y"; + this.swRmOrphanDataRecs.ValueChanged += new System.EventHandler(this.swCk_ValueChanged); + // + // labelX10 + // + this.labelX10.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.labelX10.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelX10.Location = new System.Drawing.Point(107, 38); + this.labelX10.Name = "labelX10"; + this.labelX10.Size = new System.Drawing.Size(184, 22); + this.superTooltip1.SetSuperTooltip(this.labelX10, new DevComponents.DotNetBar.SuperTooltipInfo("Remove Orphan Data Records", "", resources.GetString("labelX10.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(325, 140))); + this.labelX10.TabIndex = 22; + this.labelX10.Text = "Remove Orphan Data Records"; + // + // labelX8 + // + this.labelX8.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.labelX8.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX8.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelX8.Location = new System.Drawing.Point(5, 3); + this.labelX8.Name = "labelX8"; + this.labelX8.Size = new System.Drawing.Size(251, 22); + this.labelX8.TabIndex = 21; + this.labelX8.Text = "Repair these Data Issues:"; + // + // line2 + // + this.line2.BackColor = System.Drawing.Color.Transparent; + this.line2.Location = new System.Drawing.Point(4, 237); + this.line2.Name = "line2"; + this.line2.Size = new System.Drawing.Size(281, 12); + this.line2.TabIndex = 20; + this.line2.Text = "line2"; + // + // btnRunRepair + // + this.btnRunRepair.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnRunRepair.Checked = true; + this.btnRunRepair.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnRunRepair.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnRunRepair.Location = new System.Drawing.Point(5, 198); + this.btnRunRepair.Name = "btnRunRepair"; + this.btnRunRepair.Size = new System.Drawing.Size(280, 23); + this.btnRunRepair.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.superTooltip1.SetSuperTooltip(this.btnRunRepair, new DevComponents.DotNetBar.SuperTooltipInfo("Run Repair", "", "This will run the database repair tools selected.\r\n\r\nClick on the on/off switches" + + " to turn on/off each tool.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 103))); + this.btnRunRepair.TabIndex = 3; + this.btnRunRepair.Text = "Run Repair"; + this.btnRunRepair.Click += new System.EventHandler(this.btnRunRepair_Click); + // // sideNavPanel1 // this.sideNavPanel1.Controls.Add(this.warningBox3); @@ -795,220 +1044,6 @@ this.btnFixLinks.Text = "Fix Links"; this.btnFixLinks.Click += new System.EventHandler(this.btnFixLinks_Click); // - // sideNavPanel2 - // - this.sideNavPanel2.Controls.Add(this.warningBox4); - this.sideNavPanel2.Controls.Add(this.warningBox2); - this.sideNavPanel2.Controls.Add(this.swRmObsoleteROData); - this.sideNavPanel2.Controls.Add(this.swRefreshWordAttmts); - this.sideNavPanel2.Controls.Add(this.swStandardHypenChars); - this.sideNavPanel2.Controls.Add(this.labelX4); - this.sideNavPanel2.Controls.Add(this.labelX5); - this.sideNavPanel2.Controls.Add(this.labelX9); - this.sideNavPanel2.Controls.Add(this.swRmOrphanDataRecs); - this.sideNavPanel2.Controls.Add(this.labelX10); - this.sideNavPanel2.Controls.Add(this.labelX8); - this.sideNavPanel2.Controls.Add(this.line2); - this.sideNavPanel2.Controls.Add(this.btnRunRepair); - this.sideNavPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.sideNavPanel2.Location = new System.Drawing.Point(80, 31); - this.sideNavPanel2.Name = "sideNavPanel2"; - this.sideNavPanel2.Size = new System.Drawing.Size(300, 494); - this.sideNavPanel2.TabIndex = 6; - this.sideNavPanel2.Visible = false; - // - // warningBox4 - // - this.warningBox4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(219)))), ((int)(((byte)(249))))); - this.warningBox4.CloseButtonVisible = false; - this.warningBox4.Image = ((System.Drawing.Image)(resources.GetObject("warningBox4.Image"))); - this.warningBox4.Location = new System.Drawing.Point(17, 234); - this.warningBox4.Name = "warningBox4"; - this.warningBox4.OptionsButtonVisible = false; - this.warningBox4.Size = new System.Drawing.Size(264, 32); - this.warningBox4.TabIndex = 30; - this.warningBox4.Text = "NOTE These tools can take a long time to run"; - // - // warningBox2 - // - this.warningBox2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(219)))), ((int)(((byte)(249))))); - this.warningBox2.CloseButtonVisible = false; - this.warningBox2.Image = ((System.Drawing.Image)(resources.GetObject("warningBox2.Image"))); - this.warningBox2.Location = new System.Drawing.Point(17, 272); - this.warningBox2.Name = "warningBox2"; - this.warningBox2.OptionsButtonVisible = false; - this.warningBox2.Size = new System.Drawing.Size(264, 43); - this.warningBox2.TabIndex = 28; - this.warningBox2.Text = " Be sure there is a current backup of the \r\n database prior to running these func" + - "tions"; - // - // swRmObsoleteROData - // - // - // - // - this.swRmObsoleteROData.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.swRmObsoleteROData.Location = new System.Drawing.Point(10, 66); - this.swRmObsoleteROData.Name = "swRmObsoleteROData"; - this.swRmObsoleteROData.Size = new System.Drawing.Size(91, 22); - this.swRmObsoleteROData.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.superTooltip1.SetSuperTooltip(this.swRmObsoleteROData, new DevComponents.DotNetBar.SuperTooltipInfo("Remove Obsolete RO Data", "", resources.GetString("swRmObsoleteROData.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(230, 205))); - this.swRmObsoleteROData.SwitchClickTogglesValue = true; - this.swRmObsoleteROData.TabIndex = 26; - this.swRmObsoleteROData.Value = true; - this.swRmObsoleteROData.ValueObject = "Y"; - this.swRmObsoleteROData.ValueChanged += new System.EventHandler(this.swCk_ValueChanged); - // - // swRefreshWordAttmts - // - // - // - // - this.swRefreshWordAttmts.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.swRefreshWordAttmts.Location = new System.Drawing.Point(10, 122); - this.swRefreshWordAttmts.Name = "swRefreshWordAttmts"; - this.swRefreshWordAttmts.Size = new System.Drawing.Size(91, 22); - this.swRefreshWordAttmts.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.superTooltip1.SetSuperTooltip(this.swRefreshWordAttmts, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Word Attachments", "", resources.GetString("swRefreshWordAttmts.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 200))); - this.swRefreshWordAttmts.SwitchClickTogglesValue = true; - this.swRefreshWordAttmts.TabIndex = 27; - this.swRefreshWordAttmts.Value = true; - this.swRefreshWordAttmts.ValueObject = "Y"; - this.swRefreshWordAttmts.ValueChanged += new System.EventHandler(this.swCk_ValueChanged); - // - // swStandardHypenChars - // - // - // - // - this.swStandardHypenChars.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.swStandardHypenChars.Location = new System.Drawing.Point(10, 94); - this.swStandardHypenChars.Name = "swStandardHypenChars"; - this.swStandardHypenChars.Size = new System.Drawing.Size(91, 22); - this.swStandardHypenChars.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.superTooltip1.SetSuperTooltip(this.swStandardHypenChars, new DevComponents.DotNetBar.SuperTooltipInfo("Standardize Hyphen Characters", "", resources.GetString("swStandardHypenChars.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(225, 129))); - this.swStandardHypenChars.SwitchClickTogglesValue = true; - this.swStandardHypenChars.TabIndex = 27; - this.swStandardHypenChars.Value = true; - this.swStandardHypenChars.ValueObject = "Y"; - this.swStandardHypenChars.ValueChanged += new System.EventHandler(this.swCk_ValueChanged); - // - // labelX4 - // - this.labelX4.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelX4.Location = new System.Drawing.Point(107, 66); - this.labelX4.Name = "labelX4"; - this.labelX4.Size = new System.Drawing.Size(167, 22); - this.superTooltip1.SetSuperTooltip(this.labelX4, new DevComponents.DotNetBar.SuperTooltipInfo("Remove Obsolete RO Data", "", resources.GetString("labelX4.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(230, 205))); - this.labelX4.TabIndex = 24; - this.labelX4.Text = "Remove Obsolete RO Data"; - // - // labelX5 - // - this.labelX5.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelX5.Location = new System.Drawing.Point(107, 122); - this.labelX5.Name = "labelX5"; - this.labelX5.Size = new System.Drawing.Size(186, 22); - this.superTooltip1.SetSuperTooltip(this.labelX5, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Word Attachments", "", resources.GetString("labelX5.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 200))); - this.labelX5.TabIndex = 25; - this.labelX5.Text = "Refresh Word Attachments"; - // - // labelX9 - // - this.labelX9.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.labelX9.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelX9.Location = new System.Drawing.Point(107, 94); - this.labelX9.Name = "labelX9"; - this.labelX9.Size = new System.Drawing.Size(186, 22); - this.superTooltip1.SetSuperTooltip(this.labelX9, new DevComponents.DotNetBar.SuperTooltipInfo("Standardize Hyphen Characters", "", resources.GetString("labelX9.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(225, 129))); - this.labelX9.TabIndex = 25; - this.labelX9.Text = "Standardize Hyphen Characters"; - // - // swRmOrphanDataRecs - // - // - // - // - this.swRmOrphanDataRecs.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.swRmOrphanDataRecs.Location = new System.Drawing.Point(10, 38); - this.swRmOrphanDataRecs.Name = "swRmOrphanDataRecs"; - this.swRmOrphanDataRecs.Size = new System.Drawing.Size(91, 22); - this.swRmOrphanDataRecs.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.superTooltip1.SetSuperTooltip(this.swRmOrphanDataRecs, new DevComponents.DotNetBar.SuperTooltipInfo("Remove Orphan Data Records", "", resources.GetString("swRmOrphanDataRecs.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(325, 140))); - this.swRmOrphanDataRecs.SwitchClickTogglesValue = true; - this.swRmOrphanDataRecs.TabIndex = 23; - this.swRmOrphanDataRecs.Value = true; - this.swRmOrphanDataRecs.ValueObject = "Y"; - this.swRmOrphanDataRecs.ValueChanged += new System.EventHandler(this.swCk_ValueChanged); - // - // labelX10 - // - this.labelX10.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.labelX10.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelX10.Location = new System.Drawing.Point(107, 38); - this.labelX10.Name = "labelX10"; - this.labelX10.Size = new System.Drawing.Size(184, 22); - this.superTooltip1.SetSuperTooltip(this.labelX10, new DevComponents.DotNetBar.SuperTooltipInfo("Remove Orphan Data Records", "", resources.GetString("labelX10.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(325, 140))); - this.labelX10.TabIndex = 22; - this.labelX10.Text = "Remove Orphan Data Records"; - // - // labelX8 - // - this.labelX8.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.labelX8.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX8.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelX8.Location = new System.Drawing.Point(5, 3); - this.labelX8.Name = "labelX8"; - this.labelX8.Size = new System.Drawing.Size(251, 22); - this.labelX8.TabIndex = 21; - this.labelX8.Text = "Repair these Data Issues:"; - // - // line2 - // - this.line2.BackColor = System.Drawing.Color.Transparent; - this.line2.Location = new System.Drawing.Point(9, 207); - this.line2.Name = "line2"; - this.line2.Size = new System.Drawing.Size(281, 12); - this.line2.TabIndex = 20; - this.line2.Text = "line2"; - // - // btnRunRepair - // - this.btnRunRepair.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnRunRepair.Checked = true; - this.btnRunRepair.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.btnRunRepair.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnRunRepair.Location = new System.Drawing.Point(10, 168); - this.btnRunRepair.Name = "btnRunRepair"; - this.btnRunRepair.Size = new System.Drawing.Size(280, 23); - this.btnRunRepair.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.superTooltip1.SetSuperTooltip(this.btnRunRepair, new DevComponents.DotNetBar.SuperTooltipInfo("Run Repair", "", "This will run the database repair tools selected.\r\n\r\nClick on the on/off switches" + - " to turn on/off each tool.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 103))); - this.btnRunRepair.TabIndex = 3; - this.btnRunRepair.Text = "Run Repair"; - this.btnRunRepair.Click += new System.EventHandler(this.btnRunRepair_Click); - // // sideNavItem1 // this.sideNavItem1.IsSystemMenu = true; @@ -1185,10 +1220,10 @@ this.panelEx1.ResumeLayout(false); this.sideNav1.ResumeLayout(false); this.sideNav1.PerformLayout(); + this.sideNavPanel2.ResumeLayout(false); this.sideNavPanel1.ResumeLayout(false); this.sideNavPanel4.ResumeLayout(false); this.sideNavPanel3.ResumeLayout(false); - this.sideNavPanel2.ResumeLayout(false); this.panelEx4.ResumeLayout(false); this.ResumeLayout(false); @@ -1270,5 +1305,7 @@ private DevComponents.DotNetBar.Controls.WarningBox warningBox3; private DevComponents.DotNetBar.Controls.WarningBox warningBox4; private DevComponents.DotNetBar.Controls.WarningBox warningBox2; + private DevComponents.DotNetBar.Controls.SwitchButton swRefreshTblsForSrch; + private DevComponents.DotNetBar.LabelX lblRefreshTblForSrch; } } \ No newline at end of file diff --git a/PROMS/VEPROMS User Interface/frmBatchRefresh.cs b/PROMS/VEPROMS User Interface/frmBatchRefresh.cs index 10750a32..b7c0a224 100644 --- a/PROMS/VEPROMS User Interface/frmBatchRefresh.cs +++ b/PROMS/VEPROMS User Interface/frmBatchRefresh.cs @@ -409,6 +409,90 @@ namespace VEPROMS this.Cursor = Cursors.Default; } + // B2022-047 - refresh the Content/Text field for table, i.e. Grid, Data so that search will find text in the Grid + // NOTE that an out of memeory error occurs when having to process alot of tables. A config flag is used on the + // grid record to flag that this operation has been run. And a message is placed in the result window stating to + // rerun until all tables/text fields are completed. + private void RefreshTablesForSearch() + { + this.Cursor = Cursors.WaitCursor; + DateTime pStart = DateTime.Now; + txtProcess.AppendText("Refreshing Tables for Search"); + txtProcess.AppendText(Environment.NewLine); + txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm"))); + txtProcess.AppendText(Environment.NewLine); + Application.DoEvents(); + int affectedRows = RefreshForSearch(); + if (affectedRows < 0) + { + txtProcess.AppendText(string.Format("Error occurred in processing, completed {0} rows. Run again!", -affectedRows)); + txtProcess.AppendText(Environment.NewLine); + txtResults.AppendText(string.Format("Error occurred in processing, completed {0} rows. Run again!", -affectedRows)); + txtResults.AppendText(Environment.NewLine); + txtResults.AppendText(Environment.NewLine); + affectedRows = -affectedRows; + } + txtProcess.AppendText(string.Format("Tables for Search Refreshed: {0}", affectedRows)); + txtProcess.AppendText(Environment.NewLine); + txtResults.AppendText(string.Format("{0} Tables for Search Refreshed.", affectedRows)); + txtResults.AppendText(Environment.NewLine); + txtResults.AppendText(Environment.NewLine); + DateTime pEnd = DateTime.Now; + txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm"))); + txtProcess.AppendText(Environment.NewLine); + txtProcess.AppendText(Environment.NewLine); + Application.DoEvents(); + this.Cursor = Cursors.Default; + } + private int RefreshForSearch() + { + int cntfix = 0; + List gids = GridInfoList.GetIds(); // get all grids in database + pbProcess.Minimum = 0; + pbProcess.Maximum = gids.Count; + pbProcess.Step = 1; + foreach (int cid in gids) + { + using (Content cc = Content.Get(cid)) + { + StepConfig sc = new StepConfig(cc.Config); + if (!sc.Step_FixedTblForSrch) // if not processed through this code already, get searchable text & save + { + try + { + using (VlnFlexGrid MyFlexGrid = new VlnFlexGrid(cc.ContentItems[0])) + { + using (StringReader sr = new StringReader(cc.MyGrid.Data)) + { + MyFlexGrid.ReadXml(sr); + sr.Close(); + } + string srchtxt = MyFlexGrid.GetSearchableText(); + if (cc.Text != srchtxt) + { + cntfix++; + cc.UserID = Volian.Base.Library.VlnSettings.UserID; + cc.DTS = DateTime.Now; + cc.Text = srchtxt; + + } + sc.Step_FixedTblForSrch = true; + cc.Config = sc.ToString(); + cc.Save(); + } + } + catch (Exception ex) + { + this.Cursor = Cursors.Default; + return -cntfix; + } + } + pbProcess.PerformStep(); + Application.DoEvents(); + } + } + return cntfix; + } // C2017-030 - new Admin Tools user interface // tool renamed to Identify Orphan Items private void IdentifyDisconnectedItems() @@ -1065,7 +1149,7 @@ namespace VEPROMS DevComponents.DotNetBar.StepItem siObsoleteROData = new DevComponents.DotNetBar.StepItem("siObsoleteROData", "Obsolete RO Data"); DevComponents.DotNetBar.StepItem siStandardHyphens = new DevComponents.DotNetBar.StepItem("siStandardHyphens", "Standardize Hyphens"); DevComponents.DotNetBar.StepItem siRefreshAttmts = new DevComponents.DotNetBar.StepItem("siRefreshAttmts", "Refresh Word Attachments"); - + DevComponents.DotNetBar.StepItem siRefreshTblsSrchTxt = new DevComponents.DotNetBar.StepItem("siRefreshTblsSrchTxt", "Refresh Tables For Search"); // this will update/rebuild the progress bar in the bottom panel of Admin Tools private void setupProgessSteps1() { @@ -1095,6 +1179,8 @@ namespace VEPROMS progressSteps1.Items.Add(siStandardHyphens); if (swRefreshWordAttmts.Value) progressSteps1.Items.Add(siRefreshAttmts); + if (swRefreshTblsForSrch.Value) + progressSteps1.Items.Add(siRefreshTblsSrchTxt); splitContainer3.Panel2Collapsed = false; progressSteps1.Visible = true; progressSteps1.Refresh(); @@ -1272,6 +1358,12 @@ namespace VEPROMS DeletePDFs(); // refresh word attachments StepProgress(prgStpIdx, 100); } + if (swRefreshTblsForSrch.Value) + { + StepProgress(++prgStpIdx, 50); + RefreshTablesForSearch(); + StepProgress(prgStpIdx, 100); + } MessageBox.Show("Repair Functions Completed", "Repair"); diff --git a/PROMS/VEPROMS User Interface/frmBatchRefresh.resx b/PROMS/VEPROMS User Interface/frmBatchRefresh.resx index 8f03bfbc..9a4c0e66 100644 --- a/PROMS/VEPROMS User Interface/frmBatchRefresh.resx +++ b/PROMS/VEPROMS User Interface/frmBatchRefresh.resx @@ -184,6 +184,18 @@ This tool may take an extended period of time to execute. Should an item become orphaned (disconnected) from the rest of the data, it will no longer be accessible. This tool detects any orphaned items in the database. This tool may take an extended period of time to execute. + + + + When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all the of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents. + +This function will remove all of the saved attachment PDFS stored in the database (not the PDFs of the entire procedure that you had previous printed). This will force PROMS to regenerate (and save) the word attachment PDFs the next time the procedure is printed. + + + + When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all the of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents. + +This function will remove all of the saved attachment PDFS stored in the database (not the PDFs of the entire procedure that you had previous printed). This will force PROMS to regenerate (and save) the word attachment PDFs the next time the procedure is printed. diff --git a/PROMS/VEPROMS.CSLA.Library/Config/StepConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/StepConfig.cs index 33d36282..63ec5619 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/StepConfig.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/StepConfig.cs @@ -419,6 +419,24 @@ namespace VEPROMS.CSLA.Library OnPropertyChanged("Step_IncludeInTOC"); } } + public bool Step_FixedTblForSrch + { + get + { + string s = _Xp["Step", "FixedTblForSrch"]; + + if (s == string.Empty) return false; + if (s == "True") return true; + return false; + } + set + { + string s = _Xp["Step", "FixedTblForSrch"]; + if (value.ToString() == s) return; + _Xp["Step", "FixedTblForSrch"] = value.ToString(); + OnPropertyChanged("Step_FixedTblForSrch"); + } + } #region RO image sizing // if the RO image (figure) is resized, save it in the step config, not in the ROImageConfig. If stored in ROImageConfig // the size is set for ALL uses. diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/GridExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/GridExt.cs index 7159e2eb..a4b023d8 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/GridExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/GridExt.cs @@ -1,10 +1,145 @@ using System; using System.Collections.Generic; using System.Text; +using System.Data; +using System.Data.SqlClient; using Csla; +using Csla.Data; +using System.ComponentModel; namespace VEPROMS.CSLA.Library { + // B2022-047 - refresh the Content/Text field for table. Get all grids in database. + public class CriteriaAllGridIds + { + bool _AllGridIds; + public bool AllGridIds + { + get { return _AllGridIds; } + set { _AllGridIds = value; } + } + public CriteriaAllGridIds(bool allGridIds) + { + _AllGridIds = allGridIds; + } + } + [Serializable()] + [TypeConverter(typeof(FormatInfoListConverter))] + public partial class GridInfoList : ReadOnlyListBase + { + #region Log4Net + private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + #endregion + internal new IList Items + { get { return base.Items; } } + private bool _Disposed = false; + private static int _CountCreated = 0; + private static int _CountDisposed = 0; + private static int _CountFinalized = 0; + private static int IncrementCountCreated + { get { return ++_CountCreated; } } + private int _CountWhenCreated = IncrementCountCreated; + public static int CountCreated + { get { return _CountCreated; } } + public static int CountNotDisposed + { get { return _CountCreated - _CountDisposed; } } + public static int CountNotFinalized + { get { return _CountCreated - _CountFinalized; } } + ~GridInfoList() + { + _CountFinalized++; + } + public void Dispose() + { + if (_Disposed) return; + _CountDisposed++; + _Disposed = true; + } + public static GridInfoList _GridInfoList = null; + /// + /// Return a list of all GridInfo. Commented out - GridInfoList was added to fix B2022-047. Have this code here in + /// case it is needed in the future. + /// + //public static GridInfoList Get() + //{ + // try + // { + // if (_GridInfoList != null) + // return _GridInfoList; + // GridInfoList tmp = DataPortal.Fetch(); + // _GridInfoList = tmp; + // return tmp; + // } + // catch (Exception ex) + // { + // throw new DbCslaException("Error on FormatInfoList.Get", ex); + // } + //} + public static List GetIds() + { + try + { + List _GridInfoIdList = new List(); + try + { + using (SqlConnection cn = Database.VEPROMS_SqlConnection) + { + using (SqlCommand cm = cn.CreateCommand()) + { + cm.CommandType = CommandType.StoredProcedure; + cm.CommandText = "getGridIds"; + cm.CommandTimeout = Database.DefaultTimeout; + using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) + { + while (dr.Read()) _GridInfoIdList.Add(dr.GetInt32("ContentID")); + } + } + } + } + catch (Exception ex) + { + if (_MyLog.IsErrorEnabled) _MyLog.Error("CriteriaAllGridIds.DataPortal_Fetch", ex); + throw new DbCslaException("CriteriaAllGridIds.DataPortal_Fetch", ex); + } + return _GridInfoIdList; + } + catch (Exception ex) + { + throw new DbCslaException("Error on GridInfoList.Get", ex); + } + } + // Commented out - GridInfoList was added to fix B2022-047. Have this code here in + // case it is needed in the future. The associated query 'getGrids' does not exist. + //private void DataPortal_Fetch() + //{ + // this.RaiseListChangedEvents = false; + // if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] GridInfoList.DataPortal_Fetch", GetHashCode()); + // try + // { + // using (SqlConnection cn = Database.VEPROMS_SqlConnection) + // { + // using (SqlCommand cm = cn.CreateCommand()) + // { + // cm.CommandType = CommandType.StoredProcedure; + // cm.CommandText = "getGrids"; + // cm.CommandTimeout = Database.DefaultTimeout; + // using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) + // { + // IsReadOnly = false; + // while (dr.Read()) this.Add(new GridInfo(dr)); + // IsReadOnly = true; + // } + // } + // } + // } + // catch (Exception ex) + // { + // if (_MyLog.IsErrorEnabled) _MyLog.Error("GridInfoList.DataPortal_Fetch", ex); + // throw new DbCslaException("GridInfoList.DataPortal_Fetch", ex); + // } + // this.RaiseListChangedEvents = true; + //} + } public partial class GridInfo { public void ResetContent(Grid myGrid)