Changed TODO comment to CSLATODO
Corrected logic for IsValidList to use IsValidList rather than IsValid
This commit is contained in:
@@ -193,7 +193,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (_StartDate != tmp.ToString())
|
||||
{
|
||||
_StartDate = tmp.ToString();
|
||||
// TODO: Any Cross Property Validation
|
||||
// CSLATODO: Any Cross Property Validation
|
||||
}
|
||||
}
|
||||
catch
|
||||
@@ -223,7 +223,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (_EndDate != tmp.ToString())
|
||||
{
|
||||
_EndDate = tmp.ToString();
|
||||
// TODO: Any Cross Property Validation
|
||||
// CSLATODO: Any Cross Property Validation
|
||||
}
|
||||
}
|
||||
catch
|
||||
@@ -320,9 +320,9 @@ namespace VEPROMS.CSLA.Library
|
||||
if(list.Contains(this))
|
||||
return (IsNew && !IsDirty) ? true : base.IsValid;
|
||||
list.Add(this);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyGroup == null ? true : _MyGroup.IsValid) && (_MyUser == null ? true : _MyUser.IsValid);
|
||||
return ((IsNew && !IsDirty) ? true : base.IsValid) && (_MyGroup == null ? true : _MyGroup.IsValidList(list)) && (_MyUser == null ? true : _MyUser.IsValidList(list));
|
||||
}
|
||||
// TODO: Replace base Membership.ToString function as necessary
|
||||
// CSLATODO: Replace base Membership.ToString function as necessary
|
||||
/// <summary>
|
||||
/// Overrides Base ToString
|
||||
/// </summary>
|
||||
@@ -331,7 +331,7 @@ namespace VEPROMS.CSLA.Library
|
||||
//{
|
||||
// return base.ToString();
|
||||
//}
|
||||
// TODO: Check Membership.GetIdValue to assure that the ID returned is unique
|
||||
// CSLATODO: Check Membership.GetIdValue to assure that the ID returned is unique
|
||||
/// <summary>
|
||||
/// Overrides Base GetIdValue - Used internally by CSLA to determine equality
|
||||
/// </summary>
|
||||
@@ -391,12 +391,12 @@ namespace VEPROMS.CSLA.Library
|
||||
new Csla.Validation.CommonRules.MaxLengthRuleArgs("UsrID", 100));
|
||||
//ValidationRules.AddDependantProperty("x", "y");
|
||||
_MembershipExtension.AddValidationRules(ValidationRules);
|
||||
// TODO: Add other validation rules
|
||||
// CSLATODO: Add other validation rules
|
||||
}
|
||||
protected override void AddInstanceBusinessRules()
|
||||
{
|
||||
_MembershipExtension.AddInstanceValidationRules(ValidationRules);
|
||||
// TODO: Add other validation rules
|
||||
// CSLATODO: Add other validation rules
|
||||
}
|
||||
private static bool StartDateValid(Membership target, Csla.Validation.RuleArgs e)
|
||||
{
|
||||
@@ -457,7 +457,7 @@ namespace VEPROMS.CSLA.Library
|
||||
#region Authorization Rules
|
||||
protected override void AddAuthorizationRules()
|
||||
{
|
||||
//TODO: Who can read/write which fields
|
||||
//CSLATODO: Who can read/write which fields
|
||||
//AuthorizationRules.AllowRead(UGID, "<Role(s)>");
|
||||
//AuthorizationRules.AllowRead(UID, "<Role(s)>");
|
||||
//AuthorizationRules.AllowRead(GID, "<Role(s)>");
|
||||
@@ -477,23 +477,23 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
protected override void AddInstanceAuthorizationRules()
|
||||
{
|
||||
//TODO: Who can read/write which fields
|
||||
//CSLATODO: Who can read/write which fields
|
||||
_MembershipExtension.AddInstanceAuthorizationRules(AuthorizationRules);
|
||||
}
|
||||
public static bool CanAddObject()
|
||||
{
|
||||
// TODO: Can Add Authorization
|
||||
// CSLATODO: Can Add Authorization
|
||||
//return Csla.ApplicationContext.User.IsInRole("ProjectManager");
|
||||
return true;
|
||||
}
|
||||
public static bool CanGetObject()
|
||||
{
|
||||
// TODO: CanGet Authorization
|
||||
// CSLATODO: CanGet Authorization
|
||||
return true;
|
||||
}
|
||||
public static bool CanDeleteObject()
|
||||
{
|
||||
// TODO: CanDelete Authorization
|
||||
// CSLATODO: CanDelete Authorization
|
||||
//bool result = false;
|
||||
//if (Csla.ApplicationContext.User.IsInRole("ProjectManager"))result = true;
|
||||
//if (Csla.ApplicationContext.User.IsInRole("Administrator"))result = true;
|
||||
@@ -502,7 +502,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public static bool CanEditObject()
|
||||
{
|
||||
// TODO: CanEdit Authorization
|
||||
// CSLATODO: CanEdit Authorization
|
||||
//return Csla.ApplicationContext.User.IsInRole("ProjectManager");
|
||||
return true;
|
||||
}
|
||||
@@ -697,7 +697,7 @@ namespace VEPROMS.CSLA.Library
|
||||
_UGID = ugid;
|
||||
}
|
||||
}
|
||||
// TODO: If Create needs to access DB - It should not be marked RunLocal
|
||||
// CSLATODO: If Create needs to access DB - It should not be marked RunLocal
|
||||
[RunLocal()]
|
||||
private new void DataPortal_Create()
|
||||
{
|
||||
@@ -706,7 +706,7 @@ namespace VEPROMS.CSLA.Library
|
||||
_StartDate = _MembershipExtension.DefaultStartDate;
|
||||
_DTS = _MembershipExtension.DefaultDTS;
|
||||
_UsrID = _MembershipExtension.DefaultUsrID;
|
||||
// TODO: Add any defaults that are necessary
|
||||
// CSLATODO: Add any defaults that are necessary
|
||||
ValidationRules.CheckRules();
|
||||
}
|
||||
private void ReadData(SafeDataReader dr)
|
||||
@@ -820,7 +820,7 @@ namespace VEPROMS.CSLA.Library
|
||||
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp);
|
||||
param_LastChanged.Direction = ParameterDirection.Output;
|
||||
cm.Parameters.Add(param_LastChanged);
|
||||
// TODO: Define any additional output parameters
|
||||
// CSLATODO: Define any additional output parameters
|
||||
cm.ExecuteNonQuery();
|
||||
// Save all values being returned from the Procedure
|
||||
_UGID = (int)cm.Parameters["@newUGID"].Value;
|
||||
@@ -862,7 +862,7 @@ namespace VEPROMS.CSLA.Library
|
||||
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp);
|
||||
param_LastChanged.Direction = ParameterDirection.Output;
|
||||
cm.Parameters.Add(param_LastChanged);
|
||||
// TODO: Define any additional output parameters
|
||||
// CSLATODO: Define any additional output parameters
|
||||
cm.ExecuteNonQuery();
|
||||
// Save all values being returned from the Procedure
|
||||
ugid = (int)cm.Parameters["@newUGID"].Value;
|
||||
@@ -928,7 +928,7 @@ namespace VEPROMS.CSLA.Library
|
||||
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp);
|
||||
param_LastChanged.Direction = ParameterDirection.Output;
|
||||
cm.Parameters.Add(param_LastChanged);
|
||||
// TODO: Define any additional output parameters
|
||||
// CSLATODO: Define any additional output parameters
|
||||
cm.ExecuteNonQuery();
|
||||
// Save all values being returned from the Procedure
|
||||
_LastChanged = (byte[])cm.Parameters["@newLastChanged"].Value;
|
||||
@@ -981,7 +981,7 @@ namespace VEPROMS.CSLA.Library
|
||||
SqlParameter param_LastChanged = new SqlParameter("@newLastChanged", SqlDbType.Timestamp);
|
||||
param_LastChanged.Direction = ParameterDirection.Output;
|
||||
cm.Parameters.Add(param_LastChanged);
|
||||
// TODO: Define any additional output parameters
|
||||
// CSLATODO: Define any additional output parameters
|
||||
cm.ExecuteNonQuery();
|
||||
// Save all values being returned from the Procedure
|
||||
return (byte[])cm.Parameters["@newLastChanged"].Value;
|
||||
@@ -1034,7 +1034,7 @@ namespace VEPROMS.CSLA.Library
|
||||
cm.CommandText = "deleteMembership";
|
||||
// Input PK Fields
|
||||
cm.Parameters.AddWithValue("@UGID", ugid);
|
||||
// TODO: Define any additional output parameters
|
||||
// CSLATODO: Define any additional output parameters
|
||||
cm.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
@@ -1173,7 +1173,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// {
|
||||
// partial class MembershipExtension : extensionBase
|
||||
// {
|
||||
// // TODO: Override automatic defaults
|
||||
// // CSLATODO: Override automatic defaults
|
||||
// public virtual SmartDate DefaultStartDate
|
||||
// {
|
||||
// get { return DateTime.Now.ToShortDateString(); }
|
||||
|
Reference in New Issue
Block a user