9using System.Collections.Generic;
12using System.Data.SqlClient;
19 #region "Business methods"
23 private string _notUndoable;
27 get {
return _notUndoable; }
28 set { _notUndoable = value; }
35 private set { LoadProperty(
IDProperty, value); }
47 get {
return _children; }
54 return base.IsDirty || _children.
IsDirty;
66 #region "constructors"
86 private class Criteria
90 public Criteria(
int id)
106 _children = dataPortal.CreateChild();
107 BusinessRules.CheckRules();
108 Console.WriteLine(
"DataPortal_Create");
114 _children = dataPortal.CreateChild();
115 Console.WriteLine(
"DataPortal_Fetch");
118 BusinessRules.CheckRules();
126 Console.WriteLine(
"DataPortal_Insert");
132 Console.WriteLine(
"DataPortal_Update");
140 Console.WriteLine(
"DataPortal_DeleteSelf");
148 Console.WriteLine(
"DataPortal_Delete");
This is the base class from which most business objects will be derived.
bool IsDirty
Gets a value indicating whether this object's data has been changed.
Maintains metadata about a property.
override void AddBusinessRules()
static PropertyInfo< int > IDProperty
static PropertyInfo< string > DataProperty
void DataPortal_Fetch(object criteria, [Inject] IChildDataPortal< ChildEntityList > dataPortal)
ParentEntity()
DO NOT USE in UI - use the factory method instead
void DataPortal_DeleteSelf()
void DataPortal_Create([Inject] IChildDataPortal< ChildEntityList > dataPortal)
void DataPortal_Delete(object criteria)
Static dictionary-like class that offers similar functionality to GlobalContext This is used in tests...
static void Reinitialise()
Reinitialise the dictionary, clearing any existing results, ready for the next test
static void Add(string key, string value)
Add an item to the test results, to indicate an outcome of a particular operation
Interface defining the members of the child data portal type.
@ Serializable
Prevents updating or inserting until the transaction is complete.
@ Update
Update operation (includes insert, update and delete self).
@ Create
Create operation.
@ Delete
Delete operation.