ORM Sample Class Library

DataManager.GetScheduleFromDataSet Method 

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

[Visual Basic]
Public Function GetScheduleFromDataSet( _
   ByVal ID As Integer _
) As Schedule
[C#]
public Schedule GetScheduleFromDataSet(
   int ID
);

Parameters

ID
Primary key of the data row to retrieve.

Return Value

A Schedule, or null if not found

Remarks

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

Example

This example shows a reason to use this method.

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

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

See Also

DataManager Class | OleroTrainingBiz Namespace


29993]

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