CSLA - Extension
This commit is contained in:
@@ -9,13 +9,6 @@
|
||||
// ========================================================================
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using System.Xml;
|
||||
using System.Xml.XPath;
|
||||
using Csla;
|
||||
using Csla.Data;
|
||||
using System.Data.SqlClient;
|
||||
@@ -28,17 +21,10 @@ namespace VEPROMS.CSLA.Library
|
||||
#region RODb Config
|
||||
[NonSerialized]
|
||||
private RODbConfig _RODbConfig;
|
||||
public RODbConfig RODbConfig
|
||||
{ get { return (_RODbConfig != null ? _RODbConfig : _RODbConfig = new RODbConfig(this)); } }
|
||||
private void RODbConfigRefresh()
|
||||
{
|
||||
_RODbConfig = null;
|
||||
}
|
||||
public RODbConfig RODbConfig => _RODbConfig ?? (_RODbConfig = new RODbConfig(this));
|
||||
#endregion
|
||||
public static RODbInfo GetJustRODB(int rODbID)
|
||||
{
|
||||
//if (!CanGetObject())
|
||||
// throw new System.Security.SecurityException("User not authorized to view a RODb");
|
||||
try
|
||||
{
|
||||
RODbInfo tmp = GetCachedByPrimaryKey(rODbID);
|
||||
@@ -62,14 +48,10 @@ namespace VEPROMS.CSLA.Library
|
||||
[Serializable()]
|
||||
protected class PKCriteriaJustRODB
|
||||
{
|
||||
private int _RODbID;
|
||||
public int RODbID
|
||||
{ get { return _RODbID; } }
|
||||
public PKCriteriaJustRODB(int rODbID)
|
||||
{
|
||||
_RODbID = rODbID;
|
||||
}
|
||||
}
|
||||
private readonly int _RODbID;
|
||||
public int RODbID => _RODbID;
|
||||
public PKCriteriaJustRODB(int rODbID) => _RODbID = rODbID;
|
||||
}
|
||||
private void DataPortal_Fetch(PKCriteriaJustRODB criteria)
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] RODbInfo.DataPortal_Fetch", GetHashCode());
|
||||
@@ -112,8 +94,6 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
public static RODb GetJustRoDb(int rODbID)
|
||||
{
|
||||
if (!CanGetObject())
|
||||
throw new System.Security.SecurityException("User not authorized to view a RODb");
|
||||
try
|
||||
{
|
||||
RODb tmp = DataPortal.Fetch<RODb>(new PKCriteriaJustRoDb(rODbID));
|
||||
@@ -151,15 +131,6 @@ namespace VEPROMS.CSLA.Library
|
||||
return;
|
||||
}
|
||||
ReadData(dr);
|
||||
// Don't load child objects
|
||||
//dr.NextResult();
|
||||
//_RODbROFsts = RODbROFsts.Get(dr);
|
||||
// load child objects
|
||||
//dr.NextResult();
|
||||
//_RODbROImages = RODbROImages.Get(dr);
|
||||
// load child objects
|
||||
//dr.NextResult();
|
||||
//_RODbRoUsages = RODbRoUsages.Get(dr);
|
||||
}
|
||||
}
|
||||
// removing of item only needed for local data portal
|
||||
@@ -177,18 +148,10 @@ namespace VEPROMS.CSLA.Library
|
||||
[Serializable()]
|
||||
protected class PKCriteriaJustRoDb
|
||||
{
|
||||
private int _RODbID;
|
||||
public int RODbID
|
||||
{ get { return _RODbID; } }
|
||||
public PKCriteriaJustRoDb(int rODbID)
|
||||
{
|
||||
_RODbID = rODbID;
|
||||
}
|
||||
}
|
||||
|
||||
#region Log4Net
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#endregion
|
||||
private readonly int _RODbID;
|
||||
public int RODbID => _RODbID;
|
||||
public PKCriteriaJustRoDb(int rODbID) => _RODbID = rODbID;
|
||||
}
|
||||
|
||||
#region RODb Config
|
||||
[NonSerialized]
|
||||
@@ -205,10 +168,7 @@ namespace VEPROMS.CSLA.Library
|
||||
return _RODbConfig;
|
||||
}
|
||||
}
|
||||
private void _RODbConfig_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
{
|
||||
Config = _RODbConfig.ToString();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
private void _RODbConfig_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) => Config = _RODbConfig.ToString();
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user