' <fileinfo name="ProductsRow_Base.vb">
' <copyright>
' All rights reserved.
' </copyright>
' <remarks>
' Do not change this source code manually. Changes to this file may
' cause incorrect behavior and will be lost if the code is regenerated.
' </remarks>
' <generator rewritefile="True" infourl="http://www.SharpPower.com">RapTier</generator>
' </fileinfo>
Option Strict Off
Option Explicit On
Imports System
''' <summary>
''' The base class for <see cref="ProductsRow"/> that
''' represents a record in the <c>Products</c> table.
''' </summary>
''' <remarks>
''' Do not change this source code manually. Update the <see cref="ProductsRow"/>
''' class if you need to add or change some functionality.
''' </remarks>
Public MustInherit Class ProductsRow_Base
Private _productID As Integer
Private _productName As String
Private _supplierID As Integer
Private _supplierIDNull As Boolean = True
Private _categoryID As Integer
Private _categoryIDNull As Boolean = True
Private _quantityPerUnit As String
Private _unitPrice As Decimal
Private _unitPriceNull As Boolean = True
Private _unitsInStock As Short
Private _unitsInStockNull As Boolean = True
Private _unitsOnOrder As Short
Private _unitsOnOrderNull As Boolean = True
Private _reorderLevel As Short
Private _reorderLevelNull As Boolean = True
Private _discontinued As Boolean
''' <summary>
''' Initializes a new instance of the <see cref="ProductsRow_Base"/> class.
''' </summary>
Public Sub New()
MyBase.New()
' EMPTY
End Sub
''' <summary>
''' Gets or sets the <c>ProductID</c> column value.
''' </summary>
''' <value>The <c>ProductID</c> column value.</value>
Public Property ProductID As Integer
Get
Return _productID
End Get
Set
_productID = value
End Set
End Property
''' <summary>
''' Gets or sets the <c>ProductName</c> column value.
''' </summary>
''' <value>The <c>ProductName</c> column value.</value>
Public Property ProductName As String
Get
Return _productName
End Get
Set
_productName = value
End Set
End Property
''' <summary>
''' Gets or sets the <c>SupplierID</c> column value.
''' This column is nullable.
''' </summary>
''' <value>The <c>SupplierID</c> column value.</value>
Public Property SupplierID As Integer
Get
If IsSupplierIDNull Then
Throw New InvalidOperationException("Cannot get value because it is DBNull.")
End If
Return _supplierID
End Get
Set
_supplierIDNull = false
_supplierID = value
End Set
End Property
''' <summary>
''' Indicates whether the <see cref="SupplierID"/>
''' property value is null.
''' </summary>
''' <value>true if the property value is null, otherwise false.</value>
Public Property IsSupplierIDNull As Boolean
Get
Return _supplierIDNull
End Get
Set
_supplierIDNull = value
End Set
End Property
''' <summary>
''' Gets or sets the <c>CategoryID</c> column value.
''' This column is nullable.
''' </summary>
''' <value>The <c>CategoryID</c> column value.</value>
Public Property CategoryID As Integer
Get
If IsCategoryIDNull Then
Throw New InvalidOperationException("Cannot get value because it is DBNull.")
End If
Return _categoryID
End Get
Set
_categoryIDNull = false
_categoryID = value
End Set
End Property
''' <summary>
''' Indicates whether the <see cref="CategoryID"/>
''' property value is null.
''' </summary>
''' <value>true if the property value is null, otherwise false.</value>
Public Property IsCategoryIDNull As Boolean
Get
Return _categoryIDNull
End Get
Set
_categoryIDNull = value
End Set
End Property
''' <summary>
''' Gets or sets the <c>QuantityPerUnit</c> column value.
''' This column is nullable.
''' </summary>
''' <value>The <c>QuantityPerUnit</c> column value.</value>
Public Property QuantityPerUnit As String
Get
Return _quantityPerUnit
End Get
Set
_quantityPerUnit = value
End Set
End Property
''' <summary>
''' Gets or sets the <c>UnitPrice</c> column value.
''' This column is nullable.
''' </summary>
''' <value>The <c>UnitPrice</c> column value.</value>
Public Property UnitPrice As Decimal
Get
If IsUnitPriceNull Then
Throw New InvalidOperationException("Cannot get value because it is DBNull.")
End If
Return _unitPrice
End Get
Set
_unitPriceNull = false
_unitPrice = value
End Set
End Property
''' <summary>
''' Indicates whether the <see cref="UnitPrice"/>
''' property value is null.
''' </summary>
''' <value>true if the property value is null, otherwise false.</value>
Public Property IsUnitPriceNull As Boolean
Get
Return _unitPriceNull
End Get
Set
_unitPriceNull = value
End Set
End Property
''' <summary>
''' Gets or sets the <c>UnitsInStock</c> column value.
''' This column is nullable.
''' </summary>
''' <value>The <c>UnitsInStock</c> column value.</value>
Public Property UnitsInStock As Short
Get
If IsUnitsInStockNull Then
Throw New InvalidOperationException("Cannot get value because it is DBNull.")
End If
Return _unitsInStock
End Get
Set
_unitsInStockNull = false
_unitsInStock = value
End Set
End Property
''' <summary>
''' Indicates whether the <see cref="UnitsInStock"/>
''' property value is null.
''' </summary>
''' <value>true if the property value is null, otherwise false.</value>
Public Property IsUnitsInStockNull As Boolean
Get
Return _unitsInStockNull
End Get
Set
_unitsInStockNull = value
End Set
End Property
''' <summary>
''' Gets or sets the <c>UnitsOnOrder</c> column value.
''' This column is nullable.
''' </summary>
''' <value>The <c>UnitsOnOrder</c> column value.</value>
Public Property UnitsOnOrder As Short
Get
If IsUnitsOnOrderNull Then
Throw New InvalidOperationException("Cannot get value because it is DBNull.")
End If
Return _unitsOnOrder
End Get
Set
_unitsOnOrderNull = false
_unitsOnOrder = value
End Set
End Property
''' <summary>
''' Indicates whether the <see cref="UnitsOnOrder"/>
''' property value is null.
''' </summary>
''' <value>true if the property value is null, otherwise false.</value>
Public Property IsUnitsOnOrderNull As Boolean
Get
Return _unitsOnOrderNull
End Get
Set
_unitsOnOrderNull = value
End Set
End Property
''' <summary>
''' Gets or sets the <c>ReorderLevel</c> column value.
''' This column is nullable.
''' </summary>
''' <value>The <c>ReorderLevel</c> column value.</value>
Public Property ReorderLevel As Short
Get
If IsReorderLevelNull Then
Throw New InvalidOperationException("Cannot get value because it is DBNull.")
End If
Return _reorderLevel
End Get
Set
_reorderLevelNull = false
_reorderLevel = value
End Set
End Property
''' <summary>
''' Indicates whether the <see cref="ReorderLevel"/>
''' property value is null.
''' </summary>
''' <value>true if the property value is null, otherwise false.</value>
Public Property IsReorderLevelNull As Boolean
Get
Return _reorderLevelNull
End Get
Set
_reorderLevelNull = value
End Set
End Property
''' <summary>
''' Gets or sets the <c>Discontinued</c> column value.
''' </summary>
''' <value>The <c>Discontinued</c> column value.</value>
Public Property Discontinued As Boolean
Get
Return _discontinued
End Get
Set
_discontinued = value
End Set
End Property
''' <summary>
''' Returns the string representation of this instance.
''' </summary>
''' <returns>The string representation of this instance.</returns>
Public Overrides Function ToString() As String
Dim dynStr As System.Text.StringBuilder = New System.Text.StringBuilder(Me.GetType().Name)
dynStr.Append(":")
dynStr.Append(" ProductID=")
dynStr.Append(Me.ProductID)
dynStr.Append(" ProductName=")
dynStr.Append(Me.ProductName)
dynStr.Append(" SupplierID=")
If IsSupplierIDNull Then
dynStr.Append("<NULL>")
Else
dynStr.Append(Me.SupplierID)
End If
dynStr.Append(" CategoryID=")
If IsCategoryIDNull Then
dynStr.Append("<NULL>")
Else
dynStr.Append(Me.CategoryID)
End If
dynStr.Append(" QuantityPerUnit=")
dynStr.Append(Me.QuantityPerUnit)
dynStr.Append(" UnitPrice=")
If IsUnitPriceNull Then
dynStr.Append("<NULL>")
Else
dynStr.Append(Me.UnitPrice)
End If
dynStr.Append(" UnitsInStock=")
If IsUnitsInStockNull Then
dynStr.Append("<NULL>")
Else
dynStr.Append(Me.UnitsInStock)
End If
dynStr.Append(" UnitsOnOrder=")
If IsUnitsOnOrderNull Then
dynStr.Append("<NULL>")
Else
dynStr.Append(Me.UnitsOnOrder)
End If
dynStr.Append(" ReorderLevel=")
If IsReorderLevelNull Then
dynStr.Append("<NULL>")
Else
dynStr.Append(Me.ReorderLevel)
End If
dynStr.Append(" Discontinued=")
dynStr.Append(Me.Discontinued)
Return dynStr.ToString()
End Function
End Class