C2025-048-Set-Quick-Print-overwrite-pdf-to-false #595
@@ -13635,8 +13635,8 @@ WITH EXECUTE AS OWNER
|
|||||||
AS
|
AS
|
||||||
BEGIN TRY -- Try Block
|
BEGIN TRY -- Try Block
|
||||||
BEGIN TRANSACTION
|
BEGIN TRANSACTION
|
||||||
Update Contents set Text = Replace(Replace(Replace(Replace(Replace(Replace(Replace(Text,'\emdash','\u8209?'),'\endash','\u8209?'),'\u8213?','\u8209?'),'\u8212?','\u8209?'),'\u8211?','\u8209?'),'\u8210?','\u8209?'),'\u8208?','\u8209?')
|
Update Contents set Text = Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Text,'\emdash','\u8209?'),'\endash','\u8209?'),'\u8213?','\u8209?'),'\u8212?','\u8209?'),'\u8211?','\u8209?'),'\u8210?','\u8209?'),'\u8208?','\u8209?'),NCHAR(8209),'\u8209?')
|
||||||
where Text Like '%\u8208?%' or Text Like '%\u8210?%' or Text Like '%\u8211?%' or Text Like '%\u8212?%' or Text Like '%\u8213?%' or Text Like '%\endash%' or Text Like '%\emdash%'
|
where Text Like '%\u8208?%' or Text Like '%\u8210?%' or Text Like '%\u8211?%' or Text Like '%\u8212?%' or Text Like '%\u8213?%' or Text Like '%\endash%' or Text Like '%\emdash%'or Text Like '%' + NCHAR(8209) + '%' IF( @@TRANCOUNT > 0 ) COMMIT
|
||||||
IF( @@TRANCOUNT > 0 ) COMMIT
|
IF( @@TRANCOUNT > 0 ) COMMIT
|
||||||
END TRY
|
END TRY
|
||||||
BEGIN CATCH -- Catch Block
|
BEGIN CATCH -- Catch Block
|
||||||
@@ -24327,8 +24327,8 @@ BEGIN TRY -- Try Block
|
|||||||
DECLARE @RevDate varchar(255)
|
DECLARE @RevDate varchar(255)
|
||||||
DECLARE @RevDescription varchar(255)
|
DECLARE @RevDescription varchar(255)
|
||||||
|
|
||||||
set @RevDate = '07/31/2025 10:30 AM'
|
set @RevDate = '08/12/2025 4:12 PM'
|
||||||
set @RevDescription = 'SQL Optimization'
|
set @RevDescription = 'Updated Fix Hyphen Characters'
|
||||||
|
|
||||||
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
|
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
|
||||||
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
|
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
|
||||||
|
@@ -1606,6 +1606,27 @@ namespace Volian.Controls.Library
|
|||||||
FlexibleMessageBox.Show("Approved procedure saved to import file " + fileName, "Creating Export of Approved Procedure", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
FlexibleMessageBox.Show("Approved procedure saved to import file " + fileName, "Creating Export of Approved Procedure", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//C2025-015 Get a partial folder path. This will be used in building the PDF file name when viewing Approved procedures
|
||||||
|
string ProcFolderPathforApprovedPDF(string fullPath)
|
||||||
|
{
|
||||||
|
string rtnStr = "";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// the fullPath string that is passed in ends with the Working Draft node. We want to trim that off
|
||||||
|
string[] strParts = fullPath.Substring(0, fullPath.LastIndexOf("\\")).Split('\\'); //fullPath.Replace("\\Working Draft","").Split('\\');
|
||||||
|
int lastPart = Math.Max(strParts.Length - 1, 0);
|
||||||
|
rtnStr = strParts[lastPart];
|
||||||
|
if (rtnStr.ToUpper().StartsWith("UNIT"))
|
||||||
|
{
|
||||||
|
rtnStr = strParts[lastPart - 1] + "_" + rtnStr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
rtnStr = fullPath.Replace("\\", "_"); // just return the full path with _ intead of backslashes
|
||||||
|
}
|
||||||
|
return rtnStr;
|
||||||
|
}
|
||||||
|
|
||||||
void ApprovedRevision_Click(object sender, EventArgs e)
|
void ApprovedRevision_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -1619,7 +1640,10 @@ namespace Volian.Controls.Library
|
|||||||
if ((ri.RevisionID < int.Parse(mip.Parent.Tag.ToString())) && ri.LatestVersion.MyStage.IsApproved != 0)
|
if ((ri.RevisionID < int.Parse(mip.Parent.Tag.ToString())) && ri.LatestVersion.MyStage.IsApproved != 0)
|
||||||
superceded = true;
|
superceded = true;
|
||||||
}
|
}
|
||||||
vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(ProcedureInfo.Get(ri.ItemID).PDFNumber), ri.LatestVersion.PDF, superceded ? "Superceded" : "");
|
ProcedureInfo prcInfo = ProcedureInfo.Get(ri.ItemID);
|
||||||
|
// C2025-015 build a file name that includes a partial folder path and approved revision number
|
||||||
|
string approvedPDFName = string.Format("{0}_{1} Revision {2}", ProcFolderPathforApprovedPDF(prcInfo.SearchDVPath_clean), prcInfo.PDFNumber,ri.RevisionNumber);
|
||||||
|
vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(approvedPDFName), ri.LatestVersion.PDF, superceded ? "Superceded" : "");
|
||||||
OnViewPDF(sender, args);
|
OnViewPDF(sender, args);
|
||||||
// System.Diagnostics.Process pp = System.Diagnostics.Process.Start(GetDocPdf(ri, superceded));
|
// System.Diagnostics.Process pp = System.Diagnostics.Process.Start(GetDocPdf(ri, superceded));
|
||||||
}
|
}
|
||||||
@@ -1628,6 +1652,7 @@ namespace Volian.Controls.Library
|
|||||||
bool superceded = false;
|
bool superceded = false;
|
||||||
MenuItem mi = sender as MenuItem;
|
MenuItem mi = sender as MenuItem;
|
||||||
if (mi == null) return;
|
if (mi == null) return;
|
||||||
|
string childName = "";
|
||||||
//RevisionInfo ri = mi.Tag as RevisionInfo;
|
//RevisionInfo ri = mi.Tag as RevisionInfo;
|
||||||
RevisionInfo ri = RevisionInfo.Get(int.Parse(mi.Tag.ToString()));
|
RevisionInfo ri = RevisionInfo.Get(int.Parse(mi.Tag.ToString()));
|
||||||
{
|
{
|
||||||
@@ -1635,12 +1660,22 @@ namespace Volian.Controls.Library
|
|||||||
//B2021-086 Added the check for the last revision stage is an Approved stage
|
//B2021-086 Added the check for the last revision stage is an Approved stage
|
||||||
if ((ri.RevisionID < int.Parse(mip.Parent.Tag.ToString())) && ri.LatestVersion.MyStage.IsApproved != 0)
|
if ((ri.RevisionID < int.Parse(mip.Parent.Tag.ToString())) && ri.LatestVersion.MyStage.IsApproved != 0)
|
||||||
superceded = true;
|
superceded = true;
|
||||||
|
// C2025_015 get the child's name to append to file name
|
||||||
|
mip = mip.Parent as MenuItem;
|
||||||
|
if (mip != null)
|
||||||
|
{
|
||||||
|
childName = "_" + mip.Text;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ItemInfo ii = ItemInfo.Get(ri.ItemID);
|
ItemInfo ii = ItemInfo.Get(ri.ItemID);
|
||||||
ii.MyDocVersion.DocVersionConfig.SelectedSlave = ri.MyConfig.Applicability_Index;
|
ii.MyDocVersion.DocVersionConfig.SelectedSlave = ri.MyConfig.Applicability_Index;
|
||||||
vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(ProcedureInfo.Get(ri.ItemID).PDFNumber), ri.LatestVersion.PDF, superceded ? "Superceded" : "");
|
ProcedureInfo prcInfo = ProcedureInfo.Get(ri.ItemID);
|
||||||
|
if (prcInfo.MyContent.Number.ToUpper().Contains("<U") || ii.MyDocVersion.DocVersionConfig.Unit_ProcedureNumber.Contains("#"))
|
||||||
|
childName = ""; // unit identification already part of procedure number-no need to add the child name to the PDF file name
|
||||||
|
// C2025-015 build a file name that includes a partial folder path, the child name and approved revision number
|
||||||
|
string approvedPDFName = string.Format("{0}{1}_{2} Revision {3}", ProcFolderPathforApprovedPDF(prcInfo.SearchDVPath_clean),childName, prcInfo.PDFNumber, ri.RevisionNumber);
|
||||||
|
vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(approvedPDFName), ri.LatestVersion.PDF, superceded ? "Superceded" : "");
|
||||||
OnViewPDF(sender, args);
|
OnViewPDF(sender, args);
|
||||||
// System.Diagnostics.Process pp = System.Diagnostics.Process.Start(GetDocPdf(ri, superceded));
|
|
||||||
}
|
}
|
||||||
void SummaryOfChanges_Click(object sender, EventArgs e)
|
void SummaryOfChanges_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user