Updated Generated Code to Use IDs rather than Objects for internal Updates
This commit is contained in:
@@ -765,12 +765,12 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = Entry.Add(cn, content, MyDocument, _DTS, _UserID);
|
||||
else
|
||||
_LastChanged = Entry.Update(cn, content, MyDocument, _DTS, _UserID, ref _LastChanged);
|
||||
_LastChanged = Entry.Update(cn, content.ContentID, _DocID, _DTS, _UserID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, Content myContent, Document myDocument, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, int contentID, int docID, DateTime dts, string userID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Entry.Update", 0);
|
||||
try
|
||||
@@ -780,8 +780,8 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "updateEntry";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@ContentID", myContent.ContentID);
|
||||
cm.Parameters.AddWithValue("@DocID", myDocument.DocID);
|
||||
cm.Parameters.AddWithValue("@ContentID", contentID);
|
||||
cm.Parameters.AddWithValue("@DocID", docID);
|
||||
if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts);
|
||||
cm.Parameters.AddWithValue("@UserID", userID);
|
||||
cm.Parameters.AddWithValue("@LastChanged", lastChanged);
|
||||
|
Reference in New Issue
Block a user