Updated Generated Code to Use IDs rather than Objects for internal Updates

This commit is contained in:
Rich
2010-12-13 15:47:02 +00:00
parent c8d47d9c64
commit db051f8ff8
50 changed files with 112 additions and 112 deletions

View File

@@ -646,12 +646,12 @@ namespace VEPROMS.CSLA.Library
if (IsNew)
_LastChanged = ZContent.Add(cn, content, _OldStepSequence);
else
_LastChanged = ZContent.Update(cn, content, _OldStepSequence, ref _LastChanged);
_LastChanged = ZContent.Update(cn, content.ContentID, _OldStepSequence, ref _LastChanged);
MarkOld();
}
}
[Transactional(TransactionalTypes.TransactionScope)]
public static byte[] Update(SqlConnection cn, Content myContent, string oldStepSequence, ref byte[] lastChanged)
public static byte[] Update(SqlConnection cn, int contentID, string oldStepSequence, ref byte[] lastChanged)
{
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ZContent.Update", 0);
try
@@ -661,7 +661,7 @@ namespace VEPROMS.CSLA.Library
cm.CommandType = CommandType.StoredProcedure;
cm.CommandText = "updateZContent";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@ContentID", myContent.ContentID);
cm.Parameters.AddWithValue("@ContentID", contentID);
cm.Parameters.AddWithValue("@OldStepSequence", oldStepSequence);
cm.Parameters.AddWithValue("@LastChanged", lastChanged);
// Output Calculated Columns