This commit is contained in:
Jsj
2008-05-16 18:07:47 +00:00
parent 9d0b3cd543
commit cda0291dbd
116 changed files with 4257 additions and 3382 deletions

View File

@@ -59,9 +59,9 @@ namespace VEPROMS.CSLA.Library
}
public RolePermission Add(int permLevel, int versionType, int permValue) // One to Many
{
RolePermission permission = RolePermission.New(permLevel, versionType, permValue);
this.Add(permission);
return permission;
RolePermission permission = RolePermission.New(permLevel, versionType, permValue);
this.Add(permission);
return permission;
}
public void Remove(Permission myPermission)
{
@@ -94,8 +94,8 @@ namespace VEPROMS.CSLA.Library
{
get
{
IVEHasBrokenRules hasBrokenRules=null;
foreach(RolePermission rolePermission in this)
IVEHasBrokenRules hasBrokenRules = null;
foreach (RolePermission rolePermission in this)
if ((hasBrokenRules = rolePermission.HasBrokenRules) != null) return hasBrokenRules;
return hasBrokenRules;
}
@@ -104,8 +104,8 @@ namespace VEPROMS.CSLA.Library
{
get
{
IVEHasBrokenRules hasBrokenRules = HasBrokenRules;
return (hasBrokenRules != null ? hasBrokenRules.BrokenRules : null);
IVEHasBrokenRules hasBrokenRules = HasBrokenRules;
return (hasBrokenRules != null ? hasBrokenRules.BrokenRules : null);
}
}
#endregion
@@ -165,7 +165,7 @@ namespace VEPROMS.CSLA.Library
private void DataPortal_Fetch(RIDCriteria criteria)
{
this.RaiseListChangedEvents = false;
if(_MyLog.IsDebugEnabled)_MyLog.DebugFormat("[{0}] RolePermissions.DataPortal_FetchRID", GetHashCode());
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] RolePermissions.DataPortal_FetchRID", GetHashCode());
try
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
@@ -184,7 +184,7 @@ namespace VEPROMS.CSLA.Library
}
catch (Exception ex)
{
if(_MyLog.IsErrorEnabled)_MyLog.Error("RolePermissions.DataPortal_FetchRID", ex);
if (_MyLog.IsErrorEnabled) _MyLog.Error("RolePermissions.DataPortal_FetchRID", ex);
throw new DbCslaException("RolePermissions.DataPortal_Fetch", ex);
}
this.RaiseListChangedEvents = true;
@@ -269,8 +269,8 @@ namespace VEPROMS.CSLA.Library
/// </summary>
public partial class RolePermissionsPropertyDescriptor : vlnListPropertyDescriptor
{
private RolePermission Item { get { return (RolePermission) _Item;} }
public RolePermissionsPropertyDescriptor(RolePermissions collection, int index):base(collection, index){;}
private RolePermission Item { get { return (RolePermission)_Item; } }
public RolePermissionsPropertyDescriptor(RolePermissions collection, int index) : base(collection, index) { ;}
}
#endregion
#region Converter
@@ -281,7 +281,7 @@ namespace VEPROMS.CSLA.Library
if (destType == typeof(string) && value is RolePermissions)
{
// Return department and department role separated by comma.
return ((RolePermissions) value).Items.Count.ToString() + " Permissions";
return ((RolePermissions)value).Items.Count.ToString() + " Permissions";
}
return base.ConvertTo(context, culture, value, destType);
}