Development #481
@ -481,12 +481,14 @@ namespace VEPROMS
|
||||
// B2018-002 - Invalid Transitions - Define Transition Refresh Statistics
|
||||
private int numTransProcessed = 0;
|
||||
private int numTransFixed = 0;
|
||||
private int numTransCantFix = 0;
|
||||
private int numTransConverted = 0;
|
||||
// B2018-002 - Invalid Transitions - Initialize Transition Refresh Statistics
|
||||
private void ResetTransNumbers()
|
||||
{
|
||||
numTransProcessed = 0;
|
||||
numTransFixed = 0;
|
||||
numTransCantFix = 0;
|
||||
numTransConverted = 0;
|
||||
}
|
||||
private void RefreshTransitions()
|
||||
@ -535,11 +537,12 @@ namespace VEPROMS
|
||||
numTransConverted += ProcedureInfo.TranConvertCount;
|
||||
numTransProcessed += ProcedureInfo.TranCheckCount;
|
||||
numTransFixed += ProcedureInfo.TranFixCount;
|
||||
numTransCantFix += ProcedureInfo.TranCantFixCount; //Bad Transition Link
|
||||
pbProcess.PerformStep();
|
||||
Application.DoEvents();
|
||||
}
|
||||
}
|
||||
if (numTransFixed == 0 && numTransConverted == 0)
|
||||
if (numTransFixed == 0 && numTransConverted == 0 && numTransCantFix == 0)
|
||||
{
|
||||
txtResults.AppendText("No Transitions Needed Updated.");
|
||||
txtResults.AppendText(Environment.NewLine);
|
||||
@ -551,16 +554,18 @@ namespace VEPROMS
|
||||
txtProcess.AppendText(string.Format("Transitions Checked: {0}", numTransProcessed));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistics
|
||||
txtProcess.AppendText(string.Format("Transitions Correct As Is: {0}", numTransProcessed - (numTransConverted + numTransFixed)));
|
||||
txtProcess.AppendText(string.Format("Transitions Correct As Is: {0}", numTransProcessed - (numTransConverted + numTransFixed + numTransCantFix)));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(string.Format("Transitions Modified: {0}", numTransFixed));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(string.Format("Transitions Converted to text: {0}", numTransConverted));
|
||||
txtProcess.AppendText(Environment.NewLine);
|
||||
txtProcess.AppendText(string.Format("Transitions Unable to be Automatically Fixed (Annotation: Bad Transition Link): {0}", numTransCantFix));
|
||||
Application.DoEvents();
|
||||
if (pil.Count > 0)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("The batch refresh process was not usccessful for all procedures selected.");
|
||||
sb.AppendLine("The batch refresh process was not successful for all procedures selected.");
|
||||
sb.AppendLine("The following procedures were not able to be refreshed...");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(sbProcs.ToString());
|
||||
@ -579,11 +584,11 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
this.Cursor = Cursors.Default;
|
||||
// B2018-002 - Invalid Transitions - Display Transition Refresh Statisitic
|
||||
if (numTransFixed == 0 && numTransConverted == 0)
|
||||
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistic
|
||||
if (numTransFixed == 0 && numTransConverted == 0 && numTransCantFix == 0)
|
||||
MessageBox.Show(string.Format("{0} Transitions Checked.\n\nNo Transitions Modified.", numTransProcessed), "Refresh Transitions Completed");
|
||||
else
|
||||
MessageBox.Show(string.Format("{0} Transitions Checked.\n\n {1} Correct as is.\n\n {2} Transitions modified.\n\n {3} Transitions converted to text.", numTransProcessed, numTransProcessed - (numTransFixed + numTransConverted), numTransFixed, numTransConverted), "Refresh Transitions Completed");
|
||||
MessageBox.Show(string.Format("{0} Transitions Checked.\n\n {1} Correct as is.\n\n {2} Transitions modified.\n\n {3} Transitions converted to text.\n\n {4} Transitions unable to be automatically fixed (Annotation: Bad Transition Link).", numTransProcessed, numTransProcessed - (numTransFixed + numTransConverted + numTransCantFix), numTransFixed, numTransConverted, numTransCantFix), "Refresh Transitions Completed");
|
||||
}
|
||||
|
||||
// C2017-030 - new Admin Tools user interface
|
||||
@ -1103,8 +1108,7 @@ namespace VEPROMS
|
||||
ProcedureInfo.RefreshTransitions(pq);//, transitionsToDisconnected, transitionsToNonEditable);
|
||||
TimeSpan ts = DateTime.Now - start;
|
||||
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistics
|
||||
txtProcess.AppendText(string.Format("Procedure: {1}{0}Checked {2} Transitions{0}Fixed {3} Transitions{0}Converted to Text {4} Transitions{0}Elapsed Seconds:{5}{0}{0}", Environment.NewLine, pq.DisplayNumber, ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount, ts.TotalSeconds));
|
||||
//Console.WriteLine("\"{0}\"\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}", pq.DisplayNumber, ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount, ts.TotalSeconds, numTransProcessed, numTransFixed, numTransConverted);
|
||||
txtProcess.AppendText(string.Format("Procedure: {1}{0}Checked {2} Transitions{0}Fixed {3} Transitions{0}Converted to Text {4} Transitions{0}Cant Fix (Annotation: Bad Transition Link) {5} Transitions{0}Elapsed Seconds:{6}{0}{0}", Environment.NewLine, pq.DisplayNumber, ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount, ProcedureInfo.TranCantFixCount, ts.TotalSeconds));
|
||||
if (myFixes.Length > 0)
|
||||
{
|
||||
txtResults.AppendText(myFixes.ToString());
|
||||
|
@ -713,12 +713,14 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
TranCheckCount = 0;
|
||||
TranFixCount = 0;
|
||||
TranCantFixCount = 0;
|
||||
TranConvertCount = 0;// B2018-002 - Invalid Transitions - Initialize Transition Conversion Count
|
||||
}
|
||||
|
||||
public static int TranCheckCount = 0;
|
||||
public static int TranFixCount = 0;
|
||||
public static int TranConvertCount = 0;// B2018-002 - Invalid Transitions - Declare Transition Conversion Count
|
||||
public static int TranCantFixCount = 0;
|
||||
internal static TransitionInfoList TransitionsToDisconnected;
|
||||
internal static TransitionInfoList TransitionsToNonEditable;
|
||||
|
||||
@ -825,6 +827,15 @@ namespace VEPROMS.CSLA.Library
|
||||
content.Save();
|
||||
}
|
||||
}
|
||||
else if (newText.Contains("<CTID=-"))
|
||||
{
|
||||
//CSM C2024-028 - Bad Transition Link - Make an annotation
|
||||
using (Item itm = Item.Get(itemInfo.ItemID))
|
||||
{
|
||||
TranCantFixCount++;
|
||||
Annotation.MakeAnnotation(itm, AnnotationType.GetByNameOrCreate("Bad Transition Link"), "", $"Invalid Transition Link: ({ItemInfo.ConvertToDisplayText(newValue)})", null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3795,7 +3795,7 @@ namespace Volian.Controls.Library
|
||||
ProcedureInfo.RefreshTransitions(MyItemInfo.MyProcedure as ProcedureInfo);
|
||||
this.Cursor = Cursors.Default;
|
||||
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistics
|
||||
FlexibleMessageBox.Show(this, string.Format("Checked {0} transitions, modified {1} transitions, converted to text {2} transitions", ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount), "Results of Refresh Transitions", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
FlexibleMessageBox.Show(this, string.Format("Checked {0} transitions, modified {1} transitions, converted to text {2} transitions, {3} transitions unable to be fixed (Annotation: Bad Transition Link)", ProcedureInfo.TranCheckCount, ProcedureInfo.TranFixCount, ProcedureInfo.TranConvertCount, ProcedureInfo.TranCantFixCount), "Results of Refresh Transitions", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
private void btnRefObjRefresh_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user