rowCurrentOrder is a DataRow set to a row of a DataTable of a DataSet like
this:
rowCurrentOrder = dsChapter13.Orders[0];
Sample code below:
if (rowCurrentOrder != null)
{
txtOrderID.Text = rowCurrentOrder.OrderID.ToString();
if (rowCurrentOrder.IsCustomerIDNull())
txtCustomerID.Text = strNull;
else
txtCustomerID.Text = rowCurrentOrder.CustomerID;
if (rowCurrentOrder.IsEmployeeIDNull())
cboEmployee.SelectedIndex = -1;
else
cboEmployee.SelectedValue = rowCurrentOrder.EmployeeID;
if (rowCurrentOrder.IsOrderDateNull())
txtOrderDate.Text = strNull;
else
txtOrderDate.Text = rowCurrentOrder.OrderDate.ToShortDateString();
lblOrdersPosition.Text = "Order " + (intOrderPosition + 1) + " of " +
vueOrders.Count;
vueDetails.RowFilter = "OrderID = " + rowCurrentOrder.OrderID;
}
else
{
txtOrderID.Clear();
txtCustomerID.Clear();
txtOrderDate.Clear();
lblOrdersPosition.Text = "No Orders";
vueDetails.RowFilter = "False";
}