// <fileinfo name="AlphabeticallistofproductsRow_Base.cs">
// <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>
using System;
namespace MyCompany.MyProject.Db
{
/// <summary>
/// The base class for <see cref="AlphabeticallistofproductsRow"/> that
/// represents a record in the <c>Alphabetical list of products</c> view.
/// </summary>
/// <remarks>
/// Do not change this source code manually. Update the <see cref="AlphabeticallistofproductsRow"/>
/// class if you need to add or change some functionality.
/// </remarks>
public abstract class AlphabeticallistofproductsRow_Base
{
private int _productID;
private string _productName;
private int _supplierID;
private bool _supplierIDNull = true;
private int _categoryID;
private bool _categoryIDNull = true;
private string _quantityPerUnit;
private decimal _unitPrice;
private bool _unitPriceNull = true;
private short _unitsInStock;
private bool _unitsInStockNull = true;
private short _unitsOnOrder;
private bool _unitsOnOrderNull = true;
private short _reorderLevel;
private bool _reorderLevelNull = true;
private bool _discontinued;
private string _categoryName;
/// <summary>
/// Initializes a new instance of the <see cref="AlphabeticallistofproductsRow_Base"/> class.
/// </summary>
public AlphabeticallistofproductsRow_Base()
{
// EMPTY
}
/// <summary>
/// Gets or sets the <c>ProductID</c> column value.
/// </summary>
/// <value>The <c>ProductID</c> column value.</value>
public int ProductID
{
get { return _productID; }
set { _productID = value; }
}
/// <summary>
/// Gets or sets the <c>ProductName</c> column value.
/// </summary>
/// <value>The <c>ProductName</c> column value.</value>
public string ProductName
{
get { return _productName; }
set { _productName = value; }
}
/// <summary>
/// Gets or sets the <c>SupplierID</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>SupplierID</c> column value.</value>
public int SupplierID
{
get
{
if(IsSupplierIDNull)
throw new InvalidOperationException("Cannot get value because it is DBNull.");
return _supplierID;
}
set
{
_supplierIDNull = false;
_supplierID = value;
}
}
/// <summary>
/// Indicates whether the <see cref="SupplierID"/>
/// property value is null.
/// </summary>
/// <value>true if the property value is null, otherwise false.</value>
public bool IsSupplierIDNull
{
get { return _supplierIDNull; }
set { _supplierIDNull = value; }
}
/// <summary>
/// Gets or sets the <c>CategoryID</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>CategoryID</c> column value.</value>
public int CategoryID
{
get
{
if(IsCategoryIDNull)
throw new InvalidOperationException("Cannot get value because it is DBNull.");
return _categoryID;
}
set
{
_categoryIDNull = false;
_categoryID = value;
}
}
/// <summary>
/// Indicates whether the <see cref="CategoryID"/>
/// property value is null.
/// </summary>
/// <value>true if the property value is null, otherwise false.</value>
public bool IsCategoryIDNull
{
get { return _categoryIDNull; }
set { _categoryIDNull = value; }
}
/// <summary>
/// Gets or sets the <c>QuantityPerUnit</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>QuantityPerUnit</c> column value.</value>
public string QuantityPerUnit
{
get { return _quantityPerUnit; }
set { _quantityPerUnit = value; }
}
/// <summary>
/// Gets or sets the <c>UnitPrice</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>UnitPrice</c> column value.</value>
public decimal UnitPrice
{
get
{
if(IsUnitPriceNull)
throw new InvalidOperationException("Cannot get value because it is DBNull.");
return _unitPrice;
}
set
{
_unitPriceNull = false;
_unitPrice = value;
}
}
/// <summary>
/// Indicates whether the <see cref="UnitPrice"/>
/// property value is null.
/// </summary>
/// <value>true if the property value is null, otherwise false.</value>
public bool IsUnitPriceNull
{
get { return _unitPriceNull; }
set { _unitPriceNull = value; }
}
/// <summary>
/// Gets or sets the <c>UnitsInStock</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>UnitsInStock</c> column value.</value>
public short UnitsInStock
{
get
{
if(IsUnitsInStockNull)
throw new InvalidOperationException("Cannot get value because it is DBNull.");
return _unitsInStock;
}
set
{
_unitsInStockNull = false;
_unitsInStock = value;
}
}
/// <summary>
/// Indicates whether the <see cref="UnitsInStock"/>
/// property value is null.
/// </summary>
/// <value>true if the property value is null, otherwise false.</value>
public bool IsUnitsInStockNull
{
get { return _unitsInStockNull; }
set { _unitsInStockNull = value; }
}
/// <summary>
/// Gets or sets the <c>UnitsOnOrder</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>UnitsOnOrder</c> column value.</value>
public short UnitsOnOrder
{
get
{
if(IsUnitsOnOrderNull)
throw new InvalidOperationException("Cannot get value because it is DBNull.");
return _unitsOnOrder;
}
set
{
_unitsOnOrderNull = false;
_unitsOnOrder = value;
}
}
/// <summary>
/// Indicates whether the <see cref="UnitsOnOrder"/>
/// property value is null.
/// </summary>
/// <value>true if the property value is null, otherwise false.</value>
public bool IsUnitsOnOrderNull
{
get { return _unitsOnOrderNull; }
set { _unitsOnOrderNull = value; }
}
/// <summary>
/// Gets or sets the <c>ReorderLevel</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>ReorderLevel</c> column value.</value>
public short ReorderLevel
{
get
{
if(IsReorderLevelNull)
throw new InvalidOperationException("Cannot get value because it is DBNull.");
return _reorderLevel;
}
set
{
_reorderLevelNull = false;
_reorderLevel = value;
}
}
/// <summary>
/// Indicates whether the <see cref="ReorderLevel"/>
/// property value is null.
/// </summary>
/// <value>true if the property value is null, otherwise false.</value>
public bool IsReorderLevelNull
{
get { return _reorderLevelNull; }
set { _reorderLevelNull = value; }
}
/// <summary>
/// Gets or sets the <c>Discontinued</c> column value.
/// </summary>
/// <value>The <c>Discontinued</c> column value.</value>
public bool Discontinued
{
get { return _discontinued; }
set { _discontinued = value; }
}
/// <summary>
/// Gets or sets the <c>CategoryName</c> column value.
/// </summary>
/// <value>The <c>CategoryName</c> column value.</value>
public string CategoryName
{
get { return _categoryName; }
set { _categoryName = value; }
}
/// <summary>
/// Returns the string representation of this instance.
/// </summary>
/// <returns>The string representation of this instance.</returns>
public override string ToString()
{
System.Text.StringBuilder dynStr = new System.Text.StringBuilder(GetType().Name);
dynStr.Append(':');
dynStr.Append(" ProductID=");
dynStr.Append(ProductID);
dynStr.Append(" ProductName=");
dynStr.Append(ProductName);
dynStr.Append(" SupplierID=");
dynStr.Append(IsSupplierIDNull ? (object)"<NULL>" : SupplierID);
dynStr.Append(" CategoryID=");
dynStr.Append(IsCategoryIDNull ? (object)"<NULL>" : CategoryID);
dynStr.Append(" QuantityPerUnit=");
dynStr.Append(QuantityPerUnit);
dynStr.Append(" UnitPrice=");
dynStr.Append(IsUnitPriceNull ? (object)"<NULL>" : UnitPrice);
dynStr.Append(" UnitsInStock=");
dynStr.Append(IsUnitsInStockNull ? (object)"<NULL>" : UnitsInStock);
dynStr.Append(" UnitsOnOrder=");
dynStr.Append(IsUnitsOnOrderNull ? (object)"<NULL>" : UnitsOnOrder);
dynStr.Append(" ReorderLevel=");
dynStr.Append(IsReorderLevelNull ? (object)"<NULL>" : ReorderLevel);
dynStr.Append(" Discontinued=");
dynStr.Append(Discontinued);
dynStr.Append(" CategoryName=");
dynStr.Append(CategoryName);
return dynStr.ToString();
}
} // End of AlphabeticallistofproductsRow_Base class
} // End of namespace