// Copyright (c) 2006 Nicholas Blumhardt <nicholas.blumhardt@gmail.com>
// Unauthorised use or reproduction in any form prohibited.
using System;
using System.Collections.Generic;
using System.Text;
using Ubik.Engine.Client;
using System.ComponentModel;
namespace StoresAndStockPricing.Model{
/// <summary>
/// Manufacturers create a variety of products grouped into brands.
/// </summary>
public class Manufacturer : Individual
{
NonEmptyTrackedString _name;
TrackedString _notes;
VirtualCollection<Brand> _brands;
protected Manufacturer(Session session)
: base(session)
{
_name = new NonEmptyTrackedString(this, "Name");
_notes = new TrackedString(this, "Notes", StandardFieldLengths.NotesLength);
_brands = new VirtualCollection<Brand>(this, "Manufacturer", VirtualCollectionMultiplicity.OneToMany);
}
public Manufacturer(Session session, string name)
: this(session)
{
_name.Reset(name);
}
public string Name
{
get
{
return _name.Value;
}
set
{
_name.Value = value;
}
}
public string Notes
{
get
{
return _notes.Value;
}
set
{
_notes.Value = value;
}
}
public ICollection<Brand> Brands
{
get
{
return _brands;
}
}
}
}
|