CSLA - R to Z
This commit is contained in:
@@ -13,8 +13,6 @@ using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using Csla;
|
||||
using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using Csla.Validation;
|
||||
@@ -37,10 +35,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (IsDirty)
|
||||
refreshZTransitions.Add(this);
|
||||
}
|
||||
private void ClearRefreshList()
|
||||
{
|
||||
_RefreshZTransitions = new List<ZTransition>();
|
||||
}
|
||||
private void ClearRefreshList() => _RefreshZTransitions = new List<ZTransition>();
|
||||
private void BuildRefreshList()
|
||||
{
|
||||
ClearRefreshList();
|
||||
@@ -56,6 +51,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
#endregion
|
||||
#region Collection
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "Keeping Collections Not ReadOnly")]
|
||||
private static List<ZTransition> _CacheList = new List<ZTransition>();
|
||||
protected static void AddToCache(ZTransition zTransition)
|
||||
{
|
||||
@@ -65,6 +61,7 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
while (_CacheList.Contains(zTransition)) _CacheList.Remove(zTransition); // In RemoveFromCache
|
||||
}
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "Keeping Collections Not ReadOnly")]
|
||||
private static Dictionary<string, List<ZTransition>> _CacheByPrimaryKey = new Dictionary<string, List<ZTransition>>();
|
||||
private static void ConvertListToDictionary()
|
||||
{
|
||||
@@ -90,10 +87,7 @@ namespace VEPROMS.CSLA.Library
|
||||
#endregion
|
||||
#region Business Methods
|
||||
private string _ErrorMessage = string.Empty;
|
||||
public string ErrorMessage
|
||||
{
|
||||
get { return _ErrorMessage; }
|
||||
}
|
||||
public string ErrorMessage => _ErrorMessage;
|
||||
private int _TransitionID;
|
||||
[System.ComponentModel.DataObjectField(true, true)]
|
||||
public int TransitionID
|
||||
@@ -136,40 +130,18 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
private byte[] _LastChanged = new byte[8];//timestamp
|
||||
public override bool IsDirty
|
||||
{
|
||||
get { return base.IsDirty; }
|
||||
}
|
||||
public bool IsDirtyList(List<object> list)
|
||||
{
|
||||
return base.IsDirty;
|
||||
}
|
||||
public override bool IsValid
|
||||
{
|
||||
get { return (IsNew && !IsDirty) ? true : base.IsValid; }
|
||||
}
|
||||
public bool IsValidList(List<object> list)
|
||||
{
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
}
|
||||
// CSLATODO: Replace base ZTransition.ToString function as necessary
|
||||
/// <summary>
|
||||
/// Overrides Base ToString
|
||||
/// </summary>
|
||||
/// <returns>A string representation of current ZTransition</returns>
|
||||
//public override string ToString()
|
||||
//{
|
||||
// return base.ToString();
|
||||
//}
|
||||
public override bool IsDirty => base.IsDirty;
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Keeping until replace CSLA")]
|
||||
public bool IsDirtyList(List<object> list) => base.IsDirty;
|
||||
public override bool IsValid => (IsNew && !IsDirty) || base.IsValid;
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Keeping until replace CSLA")]
|
||||
public bool IsValidList(List<object> list) => (IsNew && !IsDirty) || base.IsValid;
|
||||
// CSLATODO: Check ZTransition.GetIdValue to assure that the ID returned is unique
|
||||
/// <summary>
|
||||
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality
|
||||
/// </summary>
|
||||
/// <returns>A Unique ID for the current ZTransition</returns>
|
||||
protected override object GetIdValue()
|
||||
{
|
||||
return MyZTransitionUnique; // Absolutely Unique ID
|
||||
}
|
||||
protected override object GetIdValue() => MyZTransitionUnique; // Absolutely Unique ID
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
[NonSerialized]
|
||||
@@ -197,8 +169,8 @@ namespace VEPROMS.CSLA.Library
|
||||
get
|
||||
{
|
||||
IVEHasBrokenRules hasBrokenRules = HasBrokenRules;
|
||||
if (this.Equals(hasBrokenRules)) return BrokenRulesCollection;
|
||||
return (hasBrokenRules != null ? hasBrokenRules.BrokenRules : null);
|
||||
if (Equals(hasBrokenRules)) return BrokenRulesCollection;
|
||||
return hasBrokenRules?.BrokenRules;
|
||||
}
|
||||
}
|
||||
protected override void AddBusinessRules()
|
||||
@@ -217,17 +189,6 @@ namespace VEPROMS.CSLA.Library
|
||||
_ZTransitionExtension.AddInstanceValidationRules(ValidationRules);
|
||||
// CSLATODO: Add other validation rules
|
||||
}
|
||||
// Sample data comparison validation rule
|
||||
//private bool StartDateGTEndDate(object target, Csla.Validation.RuleArgs e)
|
||||
//{
|
||||
// if (_started > _ended)
|
||||
// {
|
||||
// e.Description = "Start date can't be after end date";
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
// return true;
|
||||
//}
|
||||
#endregion
|
||||
#region Authorization Rules
|
||||
protected override void AddAuthorizationRules()
|
||||
@@ -243,42 +204,14 @@ namespace VEPROMS.CSLA.Library
|
||||
//CSLATODO: Who can read/write which fields
|
||||
_ZTransitionExtension.AddInstanceAuthorizationRules(AuthorizationRules);
|
||||
}
|
||||
public static bool CanAddObject()
|
||||
{
|
||||
// CSLATODO: Can Add Authorization
|
||||
//return Csla.ApplicationContext.User.IsInRole("ProjectManager");
|
||||
return true;
|
||||
}
|
||||
public static bool CanGetObject()
|
||||
{
|
||||
// CSLATODO: CanGet Authorization
|
||||
return true;
|
||||
}
|
||||
public static bool CanDeleteObject()
|
||||
{
|
||||
// CSLATODO: CanDelete Authorization
|
||||
//bool result = false;
|
||||
//if (Csla.ApplicationContext.User.IsInRole("ProjectManager"))result = true;
|
||||
//if (Csla.ApplicationContext.User.IsInRole("Administrator"))result = true;
|
||||
//return result;
|
||||
return true;
|
||||
}
|
||||
public static bool CanEditObject()
|
||||
{
|
||||
// CSLATODO: CanEdit Authorization
|
||||
//return Csla.ApplicationContext.User.IsInRole("ProjectManager");
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#region Factory Methods
|
||||
public int CurrentEditLevel
|
||||
{ get { return EditLevel; } }
|
||||
public int CurrentEditLevel => EditLevel;
|
||||
private static int _ZTransitionUnique = 0;
|
||||
protected static int ZTransitionUnique
|
||||
{ get { return ++_ZTransitionUnique; } }
|
||||
private int _MyZTransitionUnique = ZTransitionUnique;
|
||||
public int MyZTransitionUnique // Absolutely Unique ID - Editable
|
||||
{ get { return _MyZTransitionUnique; } }
|
||||
protected static int ZTransitionUnique => ++_ZTransitionUnique;
|
||||
private readonly int _MyZTransitionUnique = ZTransitionUnique;
|
||||
// Absolutely Unique ID - Editable
|
||||
public int MyZTransitionUnique => _MyZTransitionUnique;
|
||||
protected ZTransition()
|
||||
{/* require use of factory methods */
|
||||
AddToCache(this);
|
||||
@@ -287,15 +220,11 @@ namespace VEPROMS.CSLA.Library
|
||||
private static int _CountCreated = 0;
|
||||
private static int _CountDisposed = 0;
|
||||
private static int _CountFinalized = 0;
|
||||
private static int IncrementCountCreated
|
||||
{ get { return ++_CountCreated; } }
|
||||
private int _CountWhenCreated = IncrementCountCreated;
|
||||
public static int CountCreated
|
||||
{ get { return _CountCreated; } }
|
||||
public static int CountNotDisposed
|
||||
{ get { return _CountCreated - _CountDisposed; } }
|
||||
public static int CountNotFinalized
|
||||
{ get { return _CountCreated - _CountFinalized; } }
|
||||
private static int IncrementCountCreated => ++_CountCreated;
|
||||
private readonly int _CountWhenCreated = IncrementCountCreated;
|
||||
public static int CountCreated => _CountCreated;
|
||||
public static int CountNotDisposed => _CountCreated - _CountDisposed;
|
||||
public static int CountNotFinalized => _CountCreated - _CountFinalized;
|
||||
~ZTransition()
|
||||
{
|
||||
_CountFinalized++;
|
||||
@@ -320,8 +249,6 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public static ZTransition New()
|
||||
{
|
||||
if (!CanAddObject())
|
||||
throw new System.Security.SecurityException("User not authorized to add a ZTransition");
|
||||
try
|
||||
{
|
||||
return DataPortal.Create<ZTransition>();
|
||||
@@ -364,8 +291,6 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public static ZTransition Get(int transitionID)
|
||||
{
|
||||
if (!CanGetObject())
|
||||
throw new System.Security.SecurityException("User not authorized to view a ZTransition");
|
||||
try
|
||||
{
|
||||
ZTransition tmp = GetCachedByPrimaryKey(transitionID);
|
||||
@@ -386,19 +311,10 @@ namespace VEPROMS.CSLA.Library
|
||||
throw new DbCslaException("Error on ZTransition.Get", ex);
|
||||
}
|
||||
}
|
||||
public static ZTransition Get(SafeDataReader dr)
|
||||
{
|
||||
if (dr.Read()) return new ZTransition(dr);
|
||||
return null;
|
||||
}
|
||||
internal ZTransition(SafeDataReader dr)
|
||||
{
|
||||
ReadData(dr);
|
||||
}
|
||||
public static ZTransition Get(SafeDataReader dr) => dr.Read() ? new ZTransition(dr) : null;
|
||||
internal ZTransition(SafeDataReader dr) => ReadData(dr);
|
||||
public static void Delete(int transitionID)
|
||||
{
|
||||
if (!CanDeleteObject())
|
||||
throw new System.Security.SecurityException("User not authorized to remove a ZTransition");
|
||||
try
|
||||
{
|
||||
DataPortal.Delete(new PKCriteria(transitionID));
|
||||
@@ -410,12 +326,6 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public override ZTransition Save()
|
||||
{
|
||||
if (IsDeleted && !CanDeleteObject())
|
||||
throw new System.Security.SecurityException("User not authorized to remove a ZTransition");
|
||||
else if (IsNew && !CanAddObject())
|
||||
throw new System.Security.SecurityException("User not authorized to add a ZTransition");
|
||||
else if (!CanEditObject())
|
||||
throw new System.Security.SecurityException("User not authorized to update a ZTransition");
|
||||
try
|
||||
{
|
||||
BuildRefreshList();
|
||||
@@ -435,13 +345,9 @@ namespace VEPROMS.CSLA.Library
|
||||
[Serializable()]
|
||||
protected class PKCriteria
|
||||
{
|
||||
private int _TransitionID;
|
||||
public int TransitionID
|
||||
{ get { return _TransitionID; } }
|
||||
public PKCriteria(int transitionID)
|
||||
{
|
||||
_TransitionID = transitionID;
|
||||
}
|
||||
private readonly int _TransitionID;
|
||||
public int TransitionID => _TransitionID;
|
||||
public PKCriteria(int transitionID) => _TransitionID = transitionID;
|
||||
}
|
||||
// CSLATODO: If Create needs to access DB - It should not be marked RunLocal
|
||||
[RunLocal()]
|
||||
@@ -534,27 +440,32 @@ namespace VEPROMS.CSLA.Library
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
internal void SQLInsert()
|
||||
{
|
||||
if (!this.IsDirty) return;
|
||||
if (!IsDirty) return;
|
||||
try
|
||||
{
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
using (SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"])
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandTimeout = Database.SQLTimeout;
|
||||
cm.CommandText = "addZTransition";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@TransitionID", TransitionID);
|
||||
cm.Parameters.AddWithValue("@Oldto", _Oldto);
|
||||
// Output Calculated Columns
|
||||
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp);
|
||||
param_LastChanged.Direction = ParameterDirection.Output;
|
||||
cm.Parameters.Add(param_LastChanged);
|
||||
// CSLATODO: Define any additional output parameters
|
||||
cm.ExecuteNonQuery();
|
||||
// Save all values being returned from the Procedure
|
||||
_LastChanged = (byte[])cm.Parameters["@newLastChanged"].Value;
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandTimeout = Database.SQLTimeout;
|
||||
cm.CommandText = "addZTransition";
|
||||
// Input All Fields - Except Calculated Columns
|
||||
cm.Parameters.AddWithValue("@TransitionID", TransitionID);
|
||||
cm.Parameters.AddWithValue("@Oldto", _Oldto);
|
||||
// Output Calculated Columns
|
||||
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp)
|
||||
{
|
||||
Direction = ParameterDirection.Output
|
||||
};
|
||||
cm.Parameters.Add(param_LastChanged);
|
||||
// CSLATODO: Define any additional output parameters
|
||||
cm.ExecuteNonQuery();
|
||||
// Save all values being returned from the Procedure
|
||||
_LastChanged = (byte[])cm.Parameters["@newLastChanged"].Value;
|
||||
}
|
||||
}
|
||||
|
||||
MarkOld();
|
||||
// update child objects
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ZTransition.SQLInsert", GetHashCode());
|
||||
@@ -581,8 +492,10 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.Parameters.AddWithValue("@TransitionID", myTransition.TransitionID);
|
||||
cm.Parameters.AddWithValue("@Oldto", oldto);
|
||||
// Output Calculated Columns
|
||||
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp);
|
||||
param_LastChanged.Direction = ParameterDirection.Output;
|
||||
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp)
|
||||
{
|
||||
Direction = ParameterDirection.Output
|
||||
};
|
||||
cm.Parameters.Add(param_LastChanged);
|
||||
// CSLATODO: Define any additional output parameters
|
||||
cm.ExecuteNonQuery();
|
||||
@@ -626,28 +539,33 @@ namespace VEPROMS.CSLA.Library
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ZTransition.SQLUpdate", GetHashCode());
|
||||
try
|
||||
{
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
if (base.IsDirty)
|
||||
using (SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"])
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
if (base.IsDirty)
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandTimeout = Database.SQLTimeout;
|
||||
cm.CommandText = "updateZTransition";
|
||||
// All Fields including Calculated Fields
|
||||
cm.Parameters.AddWithValue("@TransitionID", TransitionID);
|
||||
cm.Parameters.AddWithValue("@Oldto", _Oldto);
|
||||
cm.Parameters.AddWithValue("@LastChanged", _LastChanged);
|
||||
// Output Calculated Columns
|
||||
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp);
|
||||
param_LastChanged.Direction = ParameterDirection.Output;
|
||||
cm.Parameters.Add(param_LastChanged);
|
||||
// CSLATODO: Define any additional output parameters
|
||||
cm.ExecuteNonQuery();
|
||||
// Save all values being returned from the Procedure
|
||||
_LastChanged = (byte[])cm.Parameters["@newLastChanged"].Value;
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandTimeout = Database.SQLTimeout;
|
||||
cm.CommandText = "updateZTransition";
|
||||
// All Fields including Calculated Fields
|
||||
cm.Parameters.AddWithValue("@TransitionID", TransitionID);
|
||||
cm.Parameters.AddWithValue("@Oldto", _Oldto);
|
||||
cm.Parameters.AddWithValue("@LastChanged", _LastChanged);
|
||||
// Output Calculated Columns
|
||||
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp)
|
||||
{
|
||||
Direction = ParameterDirection.Output
|
||||
};
|
||||
cm.Parameters.Add(param_LastChanged);
|
||||
// CSLATODO: Define any additional output parameters
|
||||
cm.ExecuteNonQuery();
|
||||
// Save all values being returned from the Procedure
|
||||
_LastChanged = (byte[])cm.Parameters["@newLastChanged"].Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MarkOld();
|
||||
// use the open connection to update child objects
|
||||
}
|
||||
@@ -660,14 +578,17 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
internal void Update(Transition transition)
|
||||
{
|
||||
if (!this.IsDirty) return;
|
||||
if (!IsDirty) return;
|
||||
if (base.IsDirty)
|
||||
{
|
||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
||||
if (IsNew)
|
||||
_LastChanged = ZTransition.Add(cn, transition, _Oldto);
|
||||
else
|
||||
_LastChanged = ZTransition.Update(cn, transition.TransitionID, _Oldto, ref _LastChanged);
|
||||
using (SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"])
|
||||
{
|
||||
if (IsNew)
|
||||
_LastChanged = ZTransition.Add(cn, transition, _Oldto);
|
||||
else
|
||||
_LastChanged = ZTransition.Update(cn, transition.TransitionID, _Oldto, ref _LastChanged);
|
||||
}
|
||||
|
||||
MarkOld();
|
||||
}
|
||||
}
|
||||
@@ -687,8 +608,10 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.Parameters.AddWithValue("@Oldto", oldto);
|
||||
cm.Parameters.AddWithValue("@LastChanged", lastChanged);
|
||||
// Output Calculated Columns
|
||||
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp);
|
||||
param_LastChanged.Direction = ParameterDirection.Output;
|
||||
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp)
|
||||
{
|
||||
Direction = ParameterDirection.Output
|
||||
};
|
||||
cm.Parameters.Add(param_LastChanged);
|
||||
// CSLATODO: Define any additional output parameters
|
||||
cm.ExecuteNonQuery();
|
||||
@@ -773,16 +696,10 @@ namespace VEPROMS.CSLA.Library
|
||||
[Serializable()]
|
||||
private class ExistsCommand : CommandBase
|
||||
{
|
||||
private int _TransitionID;
|
||||
private readonly int _TransitionID;
|
||||
private bool _exists;
|
||||
public bool Exists
|
||||
{
|
||||
get { return _exists; }
|
||||
}
|
||||
public ExistsCommand(int transitionID)
|
||||
{
|
||||
_TransitionID = transitionID;
|
||||
}
|
||||
public bool Exists => _exists;
|
||||
public ExistsCommand(int transitionID) => _TransitionID = transitionID;
|
||||
protected override void DataPortal_Execute()
|
||||
{
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ZTransition.DataPortal_Execute", GetHashCode());
|
||||
@@ -798,7 +715,7 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "existsZTransition";
|
||||
cm.Parameters.AddWithValue("@TransitionID", _TransitionID);
|
||||
int count = (int)cm.ExecuteScalar();
|
||||
_exists = (count > 0);
|
||||
_exists = count > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -812,7 +729,7 @@ namespace VEPROMS.CSLA.Library
|
||||
#endregion
|
||||
// Standard Default Code
|
||||
#region extension
|
||||
ZTransitionExtension _ZTransitionExtension = new ZTransitionExtension();
|
||||
readonly ZTransitionExtension _ZTransitionExtension = new ZTransitionExtension();
|
||||
[Serializable()]
|
||||
partial class ZTransitionExtension : extensionBase
|
||||
{
|
||||
@@ -849,49 +766,13 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
|
||||
{
|
||||
if (destType == typeof(string) && value is ZTransition)
|
||||
if (destType == typeof(string) && value is ZTransition mytransition)
|
||||
{
|
||||
// Return the ToString value
|
||||
return ((ZTransition)value).ToString();
|
||||
return mytransition.ToString();
|
||||
}
|
||||
return base.ConvertTo(context, culture, value, destType);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
} // Namespace
|
||||
|
||||
|
||||
//// The following is a sample Extension File. You can use it to create ZTransitionExt.cs
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Text;
|
||||
//using Csla;
|
||||
|
||||
//namespace VEPROMS.CSLA.Library
|
||||
//{
|
||||
// public partial class ZTransition
|
||||
// {
|
||||
// partial class ZTransitionExtension : extensionBase
|
||||
// {
|
||||
// // CSLATODO: Override automatic defaults
|
||||
// public new void AddAuthorizationRules(Csla.Security.AuthorizationRules rules)
|
||||
// {
|
||||
// //rules.AllowRead(Dbid, "<Role(s)>");
|
||||
// }
|
||||
// public new void AddInstanceAuthorizationRules(Csla.Security.AuthorizationRules rules)
|
||||
// {
|
||||
// //rules.AllowInstanceRead(Dbid, "<Role(s)>");
|
||||
// }
|
||||
// public new void AddValidationRules(Csla.Validation.ValidationRules rules)
|
||||
// {
|
||||
// rules.AddRule(
|
||||
// Csla.Validation.CommonRules.StringMaxLength,
|
||||
// new Csla.Validation.CommonRules.MaxLengthRuleArgs("Name", 100));
|
||||
// }
|
||||
// public new void AddInstanceValidationRules(Csla.Validation.ValidationRules rules)
|
||||
// {
|
||||
// rules.AddInstanceRule(/* Instance Validation Rule */);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user