ORM Sample Class Library

DataManager.GetEnrollmentFromDataSet Method 

Gets a OleroTrainingBiz.Enrollment from the already loaded records in this DataManager, by primary key.

[Visual Basic]
Public Function GetEnrollmentFromDataSet( _
   ByVal ID As Integer _
) As Enrollment
public Enrollment GetEnrollmentFromDataSet(
   int ID


Primary key of the data row to retrieve.

Return Value

A Enrollment, or null if not found


This method is made available for when the dataset has been serialized from session state or disk.


This example shows a reason to use this method.

/* first web page - save dataset and primary keys */
Session["DataSet"] = dm.DataSet;
Session["EnrollmentID"] = _Enrollment.ID;

/* second web page - need to get currend contact */
DataManager dm = new DataManager(Config.Dsn);
dm.DataSet = (DataSet)Session["DataSet"];
_Enrollment = dm.GetContactFromDataSet((System.Int32)Session["EnrollmentID"]);

See Also

DataManager Class | OleroTrainingBiz Namespace

delICustomTypeDescriptorGetClassName.html">ICustomTypeDescriptor.GetClassName (inherited from BusinessBase)GetClassName