This commit is contained in:
@@ -218,6 +218,64 @@ namespace VEPROMS.CSLA.Library
|
||||
this.RaiseListChangedEvents = true;
|
||||
}
|
||||
#endregion
|
||||
#region PastedAffectedTransitions
|
||||
private class PastedAffectedTransitonsCriteria
|
||||
{
|
||||
public PastedAffectedTransitonsCriteria(int itemID)
|
||||
{
|
||||
_ItemID = itemID;
|
||||
}
|
||||
private int _ItemID;
|
||||
public int ItemID
|
||||
{
|
||||
get { return _ItemID; }
|
||||
set { _ItemID = value; }
|
||||
}
|
||||
}
|
||||
internal static TransitionInfoList GetPastedAffected(int itemID)
|
||||
{
|
||||
try
|
||||
{
|
||||
TransitionInfoList tmp = DataPortal.Fetch<TransitionInfoList>(new PastedAffectedTransitonsCriteria(itemID));
|
||||
TransitionInfo.AddList(tmp);
|
||||
tmp.AddEvents();
|
||||
return tmp;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new DbCslaException("Error on TransitionInfoList.GetPastedAffected", ex);
|
||||
}
|
||||
}
|
||||
private void DataPortal_Fetch(PastedAffectedTransitonsCriteria criteria)
|
||||
{
|
||||
this.RaiseListChangedEvents = false;
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] TransitionInfoList.DataPortal_FetchPastedAffected", GetHashCode());
|
||||
try
|
||||
{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "getPastedAffectedTransitions";
|
||||
cm.Parameters.AddWithValue("@ItemID", criteria.ItemID);
|
||||
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))
|
||||
{
|
||||
IsReadOnly = false;
|
||||
while (dr.Read()) this.Add(new TransitionInfo(dr));
|
||||
IsReadOnly = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (_MyLog.IsErrorEnabled) _MyLog.Error("TransitionInfoList.DataPortal_FetchPastedAffected", ex);
|
||||
throw new DbCslaException("TransitionInfoList.DataPortal_Fetch", ex);
|
||||
}
|
||||
this.RaiseListChangedEvents = true;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
public static class TransitionText
|
||||
{
|
||||
@@ -381,7 +439,7 @@ namespace VEPROMS.CSLA.Library
|
||||
sret = StepInfo.Get(item.ItemID).MyTab.CleanText;
|
||||
if (!item.IsHigh)
|
||||
{
|
||||
if (item.IsRNO)
|
||||
if (item.IsRNOPart)
|
||||
{
|
||||
string mytb = sret.Trim(" .)".ToCharArray());
|
||||
if (mytb == null || mytb == "")
|
||||
@@ -430,7 +488,7 @@ namespace VEPROMS.CSLA.Library
|
||||
private static bool AddIncludedStepNumber(bool textAdded, TransitionBuilder tb, string token, string nonToken)
|
||||
{
|
||||
if (textAdded) Append(tb, nonToken, false);
|
||||
Append(tb, "#", true); // TODO: Intermediate Range.
|
||||
Append(tb, Tab(tb._ToItem), true); // TODO: Intermediate Range.
|
||||
textAdded = true;
|
||||
return textAdded;
|
||||
}
|
||||
|
Reference in New Issue
Block a user