Fixed Stored Procedure getAnnotationAuditsChronologyByItemID

Fixed Approved Method to Update Content and Item at the same time
Force History tab to be cleared when a procedure is deleted
This commit is contained in:
Rich
2012-04-04 19:06:06 +00:00
parent 4d24f93f3a
commit 74097dc316
3 changed files with 103 additions and 3 deletions

View File

@@ -960,7 +960,8 @@ namespace VEPROMS
//make pdf with promsprinter and get byte stream
string pdfTmp = string.Format(@"{0}.pdf", pi.DisplayNumber);
string pdfPath = string.Format(@"{0}\{1}", VlnSettings.TemporaryFolder, pdfTmp);
UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, myDTS);
// Moved to end so that Item and Content are saved at the same time
//UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, myDTS);
string waterMark = Stage.Get(RevStage).IsApproved > 0 ? null : Stage.Get(RevStage).Name;
frmPDFStatusForm frm = new frmPDFStatusForm(pi, ap.RevNumber, ap.RevDate.ToString("MM/dd/yyyy"), waterMark, false, ViewPDF, true, VlnSettings.TemporaryFolder, new ChangeBarDefinition(), pdfTmp, location);
frm.AllowAllWatermarks = true;
@@ -974,7 +975,10 @@ namespace VEPROMS
VEPROMS.CSLA.Library.Version version = VEPROMS.CSLA.Library.Version.MakeVersion(revision, Stage.Get(RevStage), buf, summaryBuf, DateTime.Now, VlnSettings.UserID);
StageInfo si = StageInfo.Get(RevStage);
if (si.IsApproved == 1)
UpdateProcedureDTS(pi, DateTime.Now);
UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, DateTime.Now);
else
UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, myDTS);
//UpdateProcedureDTS(pi, DateTime.Now);
}
return true;
#region old code

View File

@@ -368,7 +368,7 @@ namespace VEPROMS
}
private bool tv_DeleteItemInfo(object sender, vlnTreeItemInfoEventArgs args)
{
if (displayHistory.MyEditItem != null && displayHistory.MyItemInfo.ItemID == args.MyItemInfo.ItemID)
if (displayHistory.MyEditItem != null && displayHistory.MyItemInfo.MyProcedure.ItemID == args.MyItemInfo.ItemID)
displayHistory.MyEditItem = null;
return tc.DeleteRTBItem(args.MyItemInfo);
//if (si == null) return false;