Updated Generated Code to Use IDs rather than Objects for internal Updates
This commit is contained in:
@@ -952,12 +952,12 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsNew)
|
||||
_LastChanged = Membership.Add(cn, ref _UGID, _MyUser, _MyGroup, new SmartDate(_StartDate), new SmartDate(_EndDate), _Config, _DTS, _UsrID);
|
||||
else
|
||||
_LastChanged = Membership.Update(cn, ref _UGID, _MyUser, _MyGroup, new SmartDate(_StartDate), new SmartDate(_EndDate), _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
_LastChanged = Membership.Update(cn, ref _UGID, _UID, _GID, new SmartDate(_StartDate), new SmartDate(_EndDate), _Config, _DTS, _UsrID, ref _LastChanged);
|
||||
MarkOld();
|
||||
}
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
public static byte[] Update(SqlConnection cn, ref int ugid, User myUser, Group myGroup, SmartDate startDate, SmartDate endDate, string config, DateTime dts, string usrID, ref byte[] lastChanged)
|
||||
public static byte[] Update(SqlConnection cn, ref int ugid, int uid, int gid, SmartDate startDate, SmartDate endDate, string config, DateTime dts, string usrID, ref byte[] lastChanged)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Membership.Update", 0);
|
||||
try
|
||||
@@ -968,10 +968,10 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "updateMembership";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@UGID", ugid);
|
||||
cm.Parameters.AddWithValue("@UID", myUser.UID);
|
||||
cm.Parameters.AddWithValue("@GID", myGroup.GID);
|
||||
cm.Parameters.AddWithValue("@StartDate", startDate.DBValue);
|
||||
cm.Parameters.AddWithValue("@EndDate", endDate.DBValue);
|
||||
cm.Parameters.AddWithValue("@UID", uid);
|
||||
cm.Parameters.AddWithValue("@GID", gid);
|
||||
cm.Parameters.AddWithValue("@StartDate", startDate);
|
||||
cm.Parameters.AddWithValue("@EndDate", endDate);
|
||||
cm.Parameters.AddWithValue("@Config", config);
|
||||
if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts);
|
||||
cm.Parameters.AddWithValue("@UsrID", usrID);
|
||||
|
Reference in New Issue
Block a user