keywords: column,real,virtual,parameter, MarkParameterColumns
Name in Migrated Code: Columns.Add / BindParameter
Location in Migrated Class: InitializeDataView / Run method
readonly TextColumn OkButton = new TextColumn("Ok Button", "10");
void InitializeDataView()
{
From = Products;
OrderBy = Products.SortByPK_Products;
#region Column Selection
Columns.Add(pi_ProdID);
+ Columns.Add(Products.ProductID);
Columns.Add(Products.ProductName);
Columns.Add(Products.UnitPrice);
+ Columns.Add(OkButton).BindValue(() => "Ok");
#endregion
}
- Column (Real) - Columns.Add(Products.ProductID); notice that the column is based on ProductID column from the Products table
- Local Column (Virtual) - Columns.Add(OkButton) - Since this is not a database column it is declared above the constructor inside the Columns #region
public void Run(NumberParameter ppi_ProdID = null)
{
+ BindParameter(pi_ProdID, ppi_ProdID);
Execute();
}
- Parameter - BindParameter(pi_ProdID, ppi_ProdID);
The parameter is received via the Run method where a variable with the same type is declared (ppi_ProdID)
See Also:
It exists for backward compatibility only and you do not need to add it in new code that you write.
It's only purpose is that when you'll use the function VarName
it'll prefix the column's name with the word Parameter
instead of Virtual