Added an error handler if getOwnersByVersionID does not exist in the database.
This commit is contained in:
parent
0b53f7ec7e
commit
4531a04db1
@ -616,15 +616,24 @@ namespace VEPROMS.CSLA.Library
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
if (_MyLog.IsErrorEnabled) _MyLog.Error("OwnerInfoList.DataPortal_Fetch", ex);
|
if (_MyLog.IsErrorEnabled) _MyLog.Error("OwnerInfoList.DataPortal_Fetch", ex);
|
||||||
throw new DbCslaException("OwberInfoList.DataPortal_Fetch", ex);
|
throw new DbCslaException("OwnerInfoList.DataPortal_Fetch", ex);
|
||||||
}
|
}
|
||||||
this.RaiseListChangedEvents = true;
|
this.RaiseListChangedEvents = true;
|
||||||
}
|
}
|
||||||
public static OwnerInfoList GetByVersionID(int versionID)
|
public static OwnerInfoList GetByVersionID(int versionID)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
OwnerInfoList tmp = DataPortal.Fetch<OwnerInfoList>(new GetByVersionIDCriteria(versionID));
|
OwnerInfoList tmp = DataPortal.Fetch<OwnerInfoList>(new GetByVersionIDCriteria(versionID));
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
if (ex.Message.Contains("Could not find stored procedure"))
|
||||||
|
System.Windows.Forms.MessageBox.Show("Have your DBA run the latest version of PROMSFixes.SQL", "SQL code is not current", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
[Serializable()]
|
[Serializable()]
|
||||||
protected class GetByVersionIDCriteria
|
protected class GetByVersionIDCriteria
|
||||||
{
|
{
|
||||||
@ -660,7 +669,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
if (_MyLog.IsErrorEnabled) _MyLog.Error("OwnerInfoList.DataPortal_Fetch", ex);
|
if (_MyLog.IsErrorEnabled) _MyLog.Error("OwnerInfoList.DataPortal_Fetch", ex);
|
||||||
throw new DbCslaException("OwberInfoList.DataPortal_Fetch", ex);
|
throw new DbCslaException("OwnerInfoList.DataPortal_Fetch", ex);
|
||||||
}
|
}
|
||||||
this.RaiseListChangedEvents = true;
|
this.RaiseListChangedEvents = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user