' <fileinfo name="SalesTotalsbyAmountRow_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="SalesTotalsbyAmountRow"/> that
''' represents a record in the <c>Sales Totals by Amount</c> view.
''' </summary>
''' <remarks>
''' Do not change this source code manually. Update the <see cref="SalesTotalsbyAmountRow"/>
''' class if you need to add or change some functionality.
''' </remarks>
Public MustInherit Class SalesTotalsbyAmountRow_Base
Private _saleAmount As Decimal
Private _saleAmountNull As Boolean = True
Private _orderID As Integer
Private _companyName As String
Private _shippedDate As Date
Private _shippedDateNull As Boolean = True
''' <summary>
''' Initializes a new instance of the <see cref="SalesTotalsbyAmountRow_Base"/> class.
''' </summary>
Public Sub New()
MyBase.New()
' EMPTY
End Sub
''' <summary>
''' Gets or sets the <c>SaleAmount</c> column value.
''' This column is nullable.
''' </summary>
''' <value>The <c>SaleAmount</c> column value.</value>
Public Property SaleAmount As Decimal
Get
If IsSaleAmountNull Then
Throw New InvalidOperationException("Cannot get value because it is DBNull.")
End If
Return _saleAmount
End Get
Set
_saleAmountNull = false
_saleAmount = value
End Set
End Property
''' <summary>
''' Indicates whether the <see cref="SaleAmount"/>
''' property value is null.
''' </summary>
''' <value>true if the property value is null, otherwise false.</value>
Public Property IsSaleAmountNull As Boolean
Get
Return _saleAmountNull
End Get
Set
_saleAmountNull = value
End Set
End Property
''' <summary>
''' Gets or sets the <c>OrderID</c> column value.
''' </summary>
''' <value>The <c>OrderID</c> column value.</value>
Public Property OrderID As Integer
Get
Return _orderID
End Get
Set
_orderID = value
End Set
End Property
''' <summary>
''' Gets or sets the <c>CompanyName</c> column value.
''' </summary>
''' <value>The <c>CompanyName</c> column value.</value>
Public Property CompanyName As String
Get
Return _companyName
End Get
Set
_companyName = value
End Set
End Property
''' <summary>
''' Gets or sets the <c>ShippedDate</c> column value.
''' This column is nullable.
''' </summary>
''' <value>The <c>ShippedDate</c> column value.</value>
Public Property ShippedDate As Date
Get
If IsShippedDateNull Then
Throw New InvalidOperationException("Cannot get value because it is DBNull.")
End If
Return _shippedDate
End Get
Set
_shippedDateNull = false
_shippedDate = value
End Set
End Property
''' <summary>
''' Indicates whether the <see cref="ShippedDate"/>
''' property value is null.
''' </summary>
''' <value>true if the property value is null, otherwise false.</value>
Public Property IsShippedDateNull As Boolean
Get
Return _shippedDateNull
End Get
Set
_shippedDateNull = 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(" SaleAmount=")
If IsSaleAmountNull Then
dynStr.Append("<NULL>")
Else
dynStr.Append(Me.SaleAmount)
End If
dynStr.Append(" OrderID=")
dynStr.Append(Me.OrderID)
dynStr.Append(" CompanyName=")
dynStr.Append(Me.CompanyName)
dynStr.Append(" ShippedDate=")
If IsShippedDateNull Then
dynStr.Append("<NULL>")
Else
dynStr.Append(Me.ShippedDate)
End If
Return dynStr.ToString()
End Function
End Class