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

@@ -910,12 +910,12 @@ namespace VEPROMS.CSLA.Library
if (IsNew)
_LastChanged = Annotation.Add(cn, ref _AnnotationID, _MyItem, _MyAnnotationType, _RtfText, _SearchText, _Config, _DTS, _UserID);
else
_LastChanged = Annotation.Update(cn, ref _AnnotationID, _MyItem, _MyAnnotationType, _RtfText, _SearchText, _Config, _DTS, _UserID, ref _LastChanged);
_LastChanged = Annotation.Update(cn, ref _AnnotationID, _ItemID, _TypeID, _RtfText, _SearchText, _Config, _DTS, _UserID, ref _LastChanged);
MarkOld();
}
}
[Transactional(TransactionalTypes.TransactionScope)]
public static byte[] Update(SqlConnection cn, ref int annotationID, Item myItem, AnnotationType myAnnotationType, string rtfText, string searchText, string config, DateTime dts, string userID, ref byte[] lastChanged)
public static byte[] Update(SqlConnection cn, ref int annotationID, int itemID, int typeID, string rtfText, string searchText, string config, DateTime dts, string userID, ref byte[] lastChanged)
{
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Annotation.Update", 0);
try
@@ -926,8 +926,8 @@ namespace VEPROMS.CSLA.Library
cm.CommandText = "updateAnnotation";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@AnnotationID", annotationID);
cm.Parameters.AddWithValue("@ItemID", myItem.ItemID);
cm.Parameters.AddWithValue("@TypeID", myAnnotationType.TypeID);
cm.Parameters.AddWithValue("@ItemID", itemID);
cm.Parameters.AddWithValue("@TypeID", typeID);
cm.Parameters.AddWithValue("@RtfText", rtfText);
cm.Parameters.AddWithValue("@SearchText", searchText);
cm.Parameters.AddWithValue("@Config", config);