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

@@ -1222,7 +1222,7 @@ namespace VEPROMS.CSLA.Library
if (IsNew)
_LastChanged = Format.Add(cn, ref _FormatID, _MyParent, _Name, _Description, _Data, _GenMac, _DTS, _UserID);
else
_LastChanged = Format.Update(cn, ref _FormatID, _MyParent, _Name, _Description, _Data, _GenMac, _DTS, _UserID, ref _LastChanged);
_LastChanged = Format.Update(cn, ref _FormatID, _ParentID, _Name, _Description, _Data, _GenMac, _DTS, _UserID, ref _LastChanged);
MarkOld();
}
if (_FormatFolders != null) _FormatFolders.Update(this);
@@ -1241,7 +1241,7 @@ namespace VEPROMS.CSLA.Library
MarkNew();
}
[Transactional(TransactionalTypes.TransactionScope)]
public static byte[] Update(SqlConnection cn, ref int formatID, Format myParent, string name, string description, string data, string genMac, DateTime dts, string userID, ref byte[] lastChanged)
public static byte[] Update(SqlConnection cn, ref int formatID, int parentID, string name, string description, string data, string genMac, DateTime dts, string userID, ref byte[] lastChanged)
{
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Format.Update", 0);
try
@@ -1252,7 +1252,7 @@ namespace VEPROMS.CSLA.Library
cm.CommandText = "updateFormat";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@FormatID", formatID);
cm.Parameters.AddWithValue("@ParentID", myParent.FormatID);
cm.Parameters.AddWithValue("@ParentID", parentID);
cm.Parameters.AddWithValue("@Name", name);
cm.Parameters.AddWithValue("@Description", description);
cm.Parameters.AddWithValue("@Data", data);