Added logic to only process RO value updates for the specified DocVersion.

This commit is contained in:
Rich
2013-04-08 19:26:16 +00:00
parent d650f1c98b
commit 55f918c150
4 changed files with 222 additions and 12 deletions

View File

@@ -13,13 +13,20 @@ namespace VEPROMS.CSLA.Library
[Serializable()]
private class AffectedROUsagesCriteria
{
public AffectedROUsagesCriteria(int roDbID, string roid, string roDesc, string command, string userID)
public AffectedROUsagesCriteria(int roDbID, string roid, string roDesc, string command, string userID, string versionList)
{
_RODbID = roDbID;
_ROID = roid;
_RODesc = roDesc;
_Command = command;
_UserID = userID;
_VersionList = versionList;
}
private string _VersionList;
public string VersionList
{
get { return _VersionList; }
set { _VersionList = value; }
}
private int _RODbID;
@@ -57,11 +64,11 @@ namespace VEPROMS.CSLA.Library
set { _UserID = value; }
}
}
public static RoUsageInfoList GetAffected(int roDbID, string roid, string roDesc, string command)
public static RoUsageInfoList GetAffected(int roDbID, string roid, string roDesc, string command, string versionList)
{
try
{
RoUsageInfoList tmp = DataPortal.Fetch<RoUsageInfoList>(new AffectedROUsagesCriteria(roDbID, roid, roDesc, command, Volian.Base.Library.VlnSettings.UserID));
RoUsageInfoList tmp = DataPortal.Fetch<RoUsageInfoList>(new AffectedROUsagesCriteria(roDbID, roid, roDesc, command, Volian.Base.Library.VlnSettings.UserID,versionList));
RoUsageInfo.AddList(tmp);
tmp.AddEvents();
return tmp;
@@ -88,6 +95,7 @@ namespace VEPROMS.CSLA.Library
cm.Parameters.AddWithValue("@RODesc", criteria.RODesc);
cm.Parameters.AddWithValue("@Command", criteria.Command);
cm.Parameters.AddWithValue("@UserID", criteria.UserID);
cm.Parameters.AddWithValue("@VersionList", criteria.VersionList);
cm.CommandTimeout = Database.DefaultTimeout;
using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader()))