// <fileinfo name="EmployeesRow_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="EmployeesRow"/> that
/// represents a record in the <c>Employees</c> table.
/// </summary>
/// <remarks>
/// Do not change this source code manually. Update the <see cref="EmployeesRow"/>
/// class if you need to add or change some functionality.
/// </remarks>
public abstract class EmployeesRow_Base
{
private int _employeeID;
private string _lastName;
private string _firstName;
private string _title;
private string _titleOfCourtesy;
private System.DateTime _birthDate;
private bool _birthDateNull = true;
private System.DateTime _hireDate;
private bool _hireDateNull = true;
private string _address;
private string _city;
private string _region;
private string _postalCode;
private string _country;
private string _homePhone;
private string _extension;
private byte[] _photo;
private string _notes;
private int _reportsTo;
private bool _reportsToNull = true;
private string _photoPath;
/// <summary>
/// Initializes a new instance of the <see cref="EmployeesRow_Base"/> class.
/// </summary>
public EmployeesRow_Base()
{
// EMPTY
}
/// <summary>
/// Gets or sets the <c>EmployeeID</c> column value.
/// </summary>
/// <value>The <c>EmployeeID</c> column value.</value>
public int EmployeeID
{
get { return _employeeID; }
set { _employeeID = value; }
}
/// <summary>
/// Gets or sets the <c>LastName</c> column value.
/// </summary>
/// <value>The <c>LastName</c> column value.</value>
public string LastName
{
get { return _lastName; }
set { _lastName = value; }
}
/// <summary>
/// Gets or sets the <c>FirstName</c> column value.
/// </summary>
/// <value>The <c>FirstName</c> column value.</value>
public string FirstName
{
get { return _firstName; }
set { _firstName = value; }
}
/// <summary>
/// Gets or sets the <c>Title</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>Title</c> column value.</value>
public string Title
{
get { return _title; }
set { _title = value; }
}
/// <summary>
/// Gets or sets the <c>TitleOfCourtesy</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>TitleOfCourtesy</c> column value.</value>
public string TitleOfCourtesy
{
get { return _titleOfCourtesy; }
set { _titleOfCourtesy = value; }
}
/// <summary>
/// Gets or sets the <c>BirthDate</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>BirthDate</c> column value.</value>
public System.DateTime BirthDate
{
get
{
if(IsBirthDateNull)
throw new InvalidOperationException("Cannot get value because it is DBNull.");
return _birthDate;
}
set
{
_birthDateNull = false;
_birthDate = value;
}
}
/// <summary>
/// Indicates whether the <see cref="BirthDate"/>
/// property value is null.
/// </summary>
/// <value>true if the property value is null, otherwise false.</value>
public bool IsBirthDateNull
{
get { return _birthDateNull; }
set { _birthDateNull = value; }
}
/// <summary>
/// Gets or sets the <c>HireDate</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>HireDate</c> column value.</value>
public System.DateTime HireDate
{
get
{
if(IsHireDateNull)
throw new InvalidOperationException("Cannot get value because it is DBNull.");
return _hireDate;
}
set
{
_hireDateNull = false;
_hireDate = value;
}
}
/// <summary>
/// Indicates whether the <see cref="HireDate"/>
/// property value is null.
/// </summary>
/// <value>true if the property value is null, otherwise false.</value>
public bool IsHireDateNull
{
get { return _hireDateNull; }
set { _hireDateNull = value; }
}
/// <summary>
/// Gets or sets the <c>Address</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>Address</c> column value.</value>
public string Address
{
get { return _address; }
set { _address = value; }
}
/// <summary>
/// Gets or sets the <c>City</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>City</c> column value.</value>
public string City
{
get { return _city; }
set { _city = value; }
}
/// <summary>
/// Gets or sets the <c>Region</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>Region</c> column value.</value>
public string Region
{
get { return _region; }
set { _region = value; }
}
/// <summary>
/// Gets or sets the <c>PostalCode</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>PostalCode</c> column value.</value>
public string PostalCode
{
get { return _postalCode; }
set { _postalCode = value; }
}
/// <summary>
/// Gets or sets the <c>Country</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>Country</c> column value.</value>
public string Country
{
get { return _country; }
set { _country = value; }
}
/// <summary>
/// Gets or sets the <c>HomePhone</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>HomePhone</c> column value.</value>
public string HomePhone
{
get { return _homePhone; }
set { _homePhone = value; }
}
/// <summary>
/// Gets or sets the <c>Extension</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>Extension</c> column value.</value>
public string Extension
{
get { return _extension; }
set { _extension = value; }
}
/// <summary>
/// Gets or sets the <c>Photo</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>Photo</c> column value.</value>
public byte[] Photo
{
get { return _photo; }
set { _photo = value; }
}
/// <summary>
/// Gets or sets the <c>Notes</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>Notes</c> column value.</value>
public string Notes
{
get { return _notes; }
set { _notes = value; }
}
/// <summary>
/// Gets or sets the <c>ReportsTo</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>ReportsTo</c> column value.</value>
public int ReportsTo
{
get
{
if(IsReportsToNull)
throw new InvalidOperationException("Cannot get value because it is DBNull.");
return _reportsTo;
}
set
{
_reportsToNull = false;
_reportsTo = value;
}
}
/// <summary>
/// Indicates whether the <see cref="ReportsTo"/>
/// property value is null.
/// </summary>
/// <value>true if the property value is null, otherwise false.</value>
public bool IsReportsToNull
{
get { return _reportsToNull; }
set { _reportsToNull = value; }
}
/// <summary>
/// Gets or sets the <c>PhotoPath</c> column value.
/// This column is nullable.
/// </summary>
/// <value>The <c>PhotoPath</c> column value.</value>
public string PhotoPath
{
get { return _photoPath; }
set { _photoPath = 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(" EmployeeID=");
dynStr.Append(EmployeeID);
dynStr.Append(" LastName=");
dynStr.Append(LastName);
dynStr.Append(" FirstName=");
dynStr.Append(FirstName);
dynStr.Append(" Title=");
dynStr.Append(Title);
dynStr.Append(" TitleOfCourtesy=");
dynStr.Append(TitleOfCourtesy);
dynStr.Append(" BirthDate=");
dynStr.Append(IsBirthDateNull ? (object)"<NULL>" : BirthDate);
dynStr.Append(" HireDate=");
dynStr.Append(IsHireDateNull ? (object)"<NULL>" : HireDate);
dynStr.Append(" Address=");
dynStr.Append(Address);
dynStr.Append(" City=");
dynStr.Append(City);
dynStr.Append(" Region=");
dynStr.Append(Region);
dynStr.Append(" PostalCode=");
dynStr.Append(PostalCode);
dynStr.Append(" Country=");
dynStr.Append(Country);
dynStr.Append(" HomePhone=");
dynStr.Append(HomePhone);
dynStr.Append(" Extension=");
dynStr.Append(Extension);
dynStr.Append(" Notes=");
dynStr.Append(Notes);
dynStr.Append(" ReportsTo=");
dynStr.Append(IsReportsToNull ? (object)"<NULL>" : ReportsTo);
dynStr.Append(" PhotoPath=");
dynStr.Append(PhotoPath);
return dynStr.ToString();
}
} // End of EmployeesRow_Base class
} // End of namespace