Fixed logic to find external transition when attempting to delete a procedure
This commit is contained in:
		@@ -312,6 +312,7 @@ namespace VEPROMS.CSLA.Library
 | 
				
			|||||||
				TransitionInfoList tmp = DataPortal.Fetch<TransitionInfoList>(new ExternalTransitionsToChildrenCriteria(itemID));
 | 
									TransitionInfoList tmp = DataPortal.Fetch<TransitionInfoList>(new ExternalTransitionsToChildrenCriteria(itemID));
 | 
				
			||||||
				TransitionInfo.AddList(tmp);
 | 
									TransitionInfo.AddList(tmp);
 | 
				
			||||||
				tmp.AddEvents();
 | 
									tmp.AddEvents();
 | 
				
			||||||
 | 
									if (tmp.Count == 0) return GetExternalTransitions(itemID);
 | 
				
			||||||
				return tmp;
 | 
									return tmp;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			catch (Exception ex)
 | 
								catch (Exception ex)
 | 
				
			||||||
@@ -785,15 +786,15 @@ namespace VEPROMS.CSLA.Library
 | 
				
			|||||||
				// type (holdover from 16bit, used to define whether transitions are range) for range transitions, the page number goes after the 1st step.
 | 
									// type (holdover from 16bit, used to define whether transitions are range) for range transitions, the page number goes after the 1st step.
 | 
				
			||||||
				int strantype = tranType < tb._FromItem.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList.Count ? (int)tb._FromItem.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[tranType].Type : 0;
 | 
									int strantype = tranType < tb._FromItem.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList.Count ? (int)tb._FromItem.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[tranType].Type : 0;
 | 
				
			||||||
				if ((strantype == 1 || strantype == 2 || strantype == 4) && !tb._TransFormat.Contains("{Page Num}"))
 | 
									if ((strantype == 1 || strantype == 2 || strantype == 4) && !tb._TransFormat.Contains("{Page Num}"))
 | 
				
			||||||
				{
 | 
								{
 | 
				
			||||||
					// if range transition, the page number token needs to go after the first step, else it's at the end:
 | 
									// if range transition, the page number token needs to go after the first step, else it's at the end:
 | 
				
			||||||
					if (strantype == 2 && tb._TransFormat.Contains("{First Step"))
 | 
										if (strantype == 2 && tb._TransFormat.Contains("{First Step"))
 | 
				
			||||||
					{
 | 
									{
 | 
				
			||||||
						tb._TransFormat = tb._TransFormat.Insert(tb._TransFormat.IndexOf("{First Step}") + 12, " {Page Num}");
 | 
										tb._TransFormat = tb._TransFormat.Insert(tb._TransFormat.IndexOf("{First Step}")+12, " {Page Num}");
 | 
				
			||||||
					}
 | 
					 | 
				
			||||||
					else
 | 
					 | 
				
			||||||
						tb._TransFormat = tb._TransFormat + " {Page Num}";
 | 
					 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
									else
 | 
				
			||||||
 | 
										tb._TransFormat = tb._TransFormat + " {Page Num}";
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			if(_AppendMethods==null)
 | 
								if(_AppendMethods==null)
 | 
				
			||||||
				SetupMethods();
 | 
									SetupMethods();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user