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

@@ -855,12 +855,12 @@ namespace VEPROMS.CSLA.Library
if (IsNew)
_LastChanged = Detail.Add(cn, ref _DetailID, _MyContent, _ItemType, _Text, _Config, _DTS, _UserID);
else
_LastChanged = Detail.Update(cn, ref _DetailID, _MyContent, _ItemType, _Text, _Config, _DTS, _UserID, ref _LastChanged);
_LastChanged = Detail.Update(cn, ref _DetailID, _ContentID, _ItemType, _Text, _Config, _DTS, _UserID, ref _LastChanged);
MarkOld();
}
}
[Transactional(TransactionalTypes.TransactionScope)]
public static byte[] Update(SqlConnection cn, ref int detailID, Content myContent, int itemType, string text, string config, DateTime dts, string userID, ref byte[] lastChanged)
public static byte[] Update(SqlConnection cn, ref int detailID, int contentID, int itemType, string text, string config, DateTime dts, string userID, ref byte[] lastChanged)
{
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Detail.Update", 0);
try
@@ -871,7 +871,7 @@ namespace VEPROMS.CSLA.Library
cm.CommandText = "updateDetail";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@DetailID", detailID);
cm.Parameters.AddWithValue("@ContentID", myContent.ContentID);
cm.Parameters.AddWithValue("@ContentID", contentID);
cm.Parameters.AddWithValue("@ItemType", itemType);
cm.Parameters.AddWithValue("@Text", text);
cm.Parameters.AddWithValue("@Config", config);