10using System.ComponentModel;
11using System.Reflection;
22 [DisplayName(
"CslaDataSource")]
23 [Description(
"CSLA .NET Data Source Control")]
24 [ToolboxData(
"<{0}:CslaDataSource runat=\"server\"></{0}:CslaDataSource>")]
69 protected override DataSourceView
GetView(
string viewName)
71 if (_defaultView ==
null)
123 private static System.Collections.Generic.Dictionary<string,Type> _typeCache =
124 new System.Collections.Generic.Dictionary<string,Type>();
134 internal static Type GetType(
135 string typeAssemblyName,
string typeName)
138 if (!
string.IsNullOrEmpty(typeAssemblyName))
141 result = Type.GetType(
string.Format(
142 "{0}, {1}", typeName, typeAssemblyName),
true,
true);
144 else if (typeName.IndexOf(
",") > 0)
147 result = Type.GetType(typeName,
true,
true);
152 result = _typeCache[typeName];
154 foreach (Assembly
asm in AppDomain.CurrentDomain.GetAssemblies())
156 result =
asm.GetType(typeName,
false,
true);
159 _typeCache.Add(typeName, result);
177 return new string[] {
"Default" };
192 internal void OnInsertObject(InsertObjectArgs e)
201 internal void OnUpdateObject(UpdateObjectArgs e)
210 internal void OnDeleteObject(DeleteObjectArgs e)
A strongly-typed resource class, for looking up localized strings, etc.
static string TypeLoadException
Looks up a localized string similar to Failed to load type '{0}'.
A Web Forms data binding control designed to support CSLA .NET business objects as data sources.
string TypeName
Get or set the full type name of the business object class to be used as a data source.
EventHandler< DeleteObjectArgs > DeleteObject
Event raised when an object is to be deleted.
EventHandler< SelectObjectArgs > SelectObject
Event raised when an object is to be created and populated with data.
string TypeAssemblyName
Get or set the name of the assembly (no longer used).
EventHandler< InsertObjectArgs > InsertObject
Event raised when an object is to be populated with data and inserted.
bool TypeSupportsSorting
Get or set a value indicating whether the business object data source supports sorting.
bool TypeSupportsPaging
Get or set a value indicating whether the business object data source supports paging.
override DataSourceView GetView(string viewName)
Returns the default view for this data control.
EventHandler< UpdateObjectArgs > UpdateObject
Event raised when an object is to be updated.
override System.Collections.ICollection GetViewNames()
Returns a list of views available for this control.
The object responsible for managing data binding to a specific CSLA .NET object.
Implements designer support for CslaDataSource.
Argument object used in the SelectObject event.