Apress Expert C sharp 2005 (Phần 1) ppsx
... impact on whether users can be authenticated or authorized, but physical tiers can be used to increase or decrease physical access to the machines on which the application executes. For instance, ... data access code into a specific layer, the impact of these changes is limited to a smaller part of the application. Data access mechanisms are typically implemented as a set of services, with ea...
Ngày tải lên: 06/07/2014, 00:20
... UI consisting of a DataGridView control that displays a collection of Contact objects. If the root object is a collection of child Contact objects, the UI developer can simply bind the collection ... exceptions: • Dual criteria objects • Dual create and fetch factory methods • Dual create and fetch data access methods Let’s discuss each change in turn. Dual Criteria Classes The object’s cri...
Ngày tải lên: 06/07/2014, 00:20
... to accept the changes to the item, or Esc to undo them. However, even if the user chooses to accept changes to some LineItem objects, they can still choose to cancel the changes on the Invoice ... object that owns the Component. The user might accept changes to a Component, but cancel the changes to its parent LineItem object, thereby forcing an undo operation to reverse accepted changes .....
Ngày tải lên: 06/07/2014, 00:20
Apress Expert C sharp 2005 (Phần 3) pdf
... Csla.Core.IUndoableObject. Cascading the Call to Child Objects or Collections If the field is a reference to a Csla.Core.IUndoableObject, the CopyState() call must be cascaded to that object, ... object in the same manner as CopyState(). When the code encounters a child business object that implements Csla.Core.IEditable➥ Object, it cascades the UndoChanges() call to that child object ......
Ngày tải lên: 06/07/2014, 00:20
Apress Expert C sharp 2005 (Phần 4) potx
... the collection contains a specific deleted object. BindingList<T> already includes a Contains() method so that the UI code can ask the collec- tion if it contains a specific item. Since ... BusinessBase class implements the System.ICloneable interface. This interface defines a Clone() method that can be called to create a clone, or copy, of an object. The Csla.Core.ObjectCloner class im...
Ngày tải lên: 06/07/2014, 00:20
Apress Expert C sharp 2005 (Phần 5) pdf
... the class within which the criteria class is nested. Csla.Server.CallMethodException The MethodCaller class throws a custom Csla.Server.CallMethodException in the case that an exception occurs ... ex) { _innerStackTrace = ex.StackTrace; } Then in the StackTrace property of CallMethodException, the stack trace for the CallMethod➥ Exception itself is combined with the stack trace from the origi...
Ngày tải lên: 06/07/2014, 00:20
Apress Expert C sharp 2005 (Phần 7) docx
... instance, a SelectObject event handler may look like this: protected void CustomerDataSource_SelectObject( object sender, Csla.Web.SelectObjectArgs e) { e.BusinessObject = Customer.NewCustomer(); } Notice ... the counterpart to CslaDataSource. Like CslaDataSource, CslaDataSourceDesigner is little more than a switchboard, routing calls to the CslaDesignerData➥ SourceView object where the real...
Ngày tải lên: 06/07/2014, 00:20
Apress Expert C sharp 2005 (Phần 8) pdf
... 371 Child Object Creation Child objects are usually created when the UI code calls an Add() method on the collection object that contains the child object. Ideally, the child class and the collection ... for each record. a. The child collection creates a child object by calling a factory method on the child class, passing the data reader as a parameter. b. The child object’s factory method ca...
Ngày tải lên: 06/07/2014, 00:20
Apress Expert C sharp 2005 (Phần 10) ppt
... DataPortal_Execute() { using (SqlConnection cn = new SqlConnection(Database.PTrackerConnection)) { cn.Open(); using (SqlCommand cm = cn.CreateCommand()) { cm.CommandType = CommandType.StoredProcedure; cm.CommandText ... follows: [Transactional(TransactionalTypes.TransactionScope)] private void DataPortal_Delete(Criteria criteria) { using (SqlConnection cn = new SqlConnection(Database.PTracker...
Ngày tải lên: 06/07/2014, 00:20
Apress Expert C sharp 2005 (Phần 11) potx
... click OK, or click Cancel. Either way, the DialogResult property is set and the form is closed. For instance, here’s the code for the Cancel button: private void Cancel_Button_Click(object sender, ... ProjectEdit(Project.NewProject())); } } Project.NewProject() is called to create the new Project object, and it is then passed to the con- structor of a ProjectEdit user control. That user con...
Ngày tải lên: 06/07/2014, 00:20