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

@@ -943,12 +943,12 @@ namespace VEPROMS.CSLA.Library
if (IsNew)
_LastChanged = Association.Add(cn, ref _AssociationID, _MyDocVersion, _MyROFst, _Config, _DTS, _UserID);
else
_LastChanged = Association.Update(cn, ref _AssociationID, _MyDocVersion, _MyROFst, _Config, _DTS, _UserID, ref _LastChanged);
_LastChanged = Association.Update(cn, ref _AssociationID, _VersionID, _ROFstID, _Config, _DTS, _UserID, ref _LastChanged);
MarkOld();
}
}
[Transactional(TransactionalTypes.TransactionScope)]
public static byte[] Update(SqlConnection cn, ref int associationID, DocVersion myDocVersion, ROFst myROFst, string config, DateTime dts, string userID, ref byte[] lastChanged)
public static byte[] Update(SqlConnection cn, ref int associationID, int versionID, int rOFstID, string config, DateTime dts, string userID, ref byte[] lastChanged)
{
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Association.Update", 0);
try
@@ -959,8 +959,8 @@ namespace VEPROMS.CSLA.Library
cm.CommandText = "updateAssociation";
// Input All Fields - Except Calculated Columns
cm.Parameters.AddWithValue("@AssociationID", associationID);
cm.Parameters.AddWithValue("@VersionID", myDocVersion.VersionID);
cm.Parameters.AddWithValue("@ROFstID", myROFst.ROFstID);
cm.Parameters.AddWithValue("@VersionID", versionID);
cm.Parameters.AddWithValue("@ROFstID", rOFstID);
cm.Parameters.AddWithValue("@Config", config);
if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts);
cm.Parameters.AddWithValue("@UserID", userID);