Use ‘GetJustStage’ for Stage & StageInfo gets of data.

Provide methods to use ‘GetJustStage’ from application
Use ‘GetJustFormat’ for format infos
This commit is contained in:
2015-02-17 17:30:47 +00:00
parent 9671a394be
commit 3053c892a1
10 changed files with 191 additions and 13 deletions

View File

@@ -977,7 +977,7 @@ namespace VEPROMS
{
ViewPDF = ViewPDF && MyProcedures.Count == 1;
StringBuilder sb = new StringBuilder();
StageInfo nsi = StageInfo.Get(RevStage);
StageInfo nsi = StageInfo.GetJustStage(RevStage);
foreach (ApprovalProcedure ap in MyProcedures) //spin thru looking for updating current revision
{
//RevisionInfo ric = RevisionInfo.GetCurrentByItemID(ap.ProcInfo.ItemID);
@@ -1092,11 +1092,11 @@ namespace VEPROMS
}
}
DateTime currentDTS = DateTime.Now;
Check check = Check.MakeCheck(revision, Stage.Get(RevStage), RevisionInfo.BuildRevisionChecks(pi), currentDTS, VlnSettings.UserID);
Check check = Check.MakeCheck(revision, Stage.GetJustStage(RevStage), RevisionInfo.BuildRevisionChecks(pi), currentDTS, VlnSettings.UserID);
//make pdf with promsprinter and get byte stream
// 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;
string waterMark = Stage.GetJustStage(RevStage).IsApproved > 0 ? null : Stage.GetJustStage(RevStage).Name;
//ProcedureInfo myproc = pi;
//frmPDFStatusForm frm = new frmPDFStatusForm(myproc, ap.RevNumber, /* revdate change: ap.RevDate.ToString("MM/dd/yyyy") ,*/ waterMark, false, false, ViewPDF, true, VlnSettings.TemporaryFolder, new ChangeBarDefinition(pi.MyDocVersion.MyConfig as DocVersionConfig, pi.ActiveFormat), pdfTmp, location);
//myproc.ChangeBarDate = myDTS;
@@ -1133,8 +1133,8 @@ namespace VEPROMS
byte[] buf = new byte[pdfFile.Length];
fs.Read(buf, 0, buf.Length);
fs.Close();
VEPROMS.CSLA.Library.Version version = VEPROMS.CSLA.Library.Version.MakeVersion(revision, Stage.Get(RevStage), buf, summaryBuf, currentDTS, VlnSettings.UserID);
StageInfo si = StageInfo.Get(RevStage);
VEPROMS.CSLA.Library.Version version = VEPROMS.CSLA.Library.Version.MakeVersion(revision, Stage.GetJustStage(RevStage), buf, summaryBuf, currentDTS, VlnSettings.UserID);
StageInfo si = StageInfo.GetJustStage(RevStage);
int selectedSlave = pi.MyDocVersion.DocVersionConfig.SelectedSlave;
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
if (si.IsApproved == 1)