using System.Collections.Generic;

namespace ComboBox_MissingValuesOnScroll
{
	public class Exposition
	{
		private ExpositionType _expositionType;
		private decimal _netto;

		public ExpositionType Type
		{
			get 
			{
				return this._expositionType;
			}
			set 
			{
				this._expositionType = value;
			}
		}

		public decimal Netto
		{
			get
			{
				return _netto;
			}
			set 
			{
				this._netto = value;
			}
		}
		public int SelectedExpositionType
		{
			get;
			set;
		}

	}

	public class ExpositionType
	{
		public  string _name;
		public int _numerator;

		public ExpositionType()
		{}

		public ExpositionType(string name)
		{
			this._name = name;
		}

		public override string ToString()
		{
			return this.Name;
		}

		public virtual string Name
		{
			get
			{
				return _name;
			}
			set
			{
				this._name = value;
			}
		}

		public virtual int Numerator
		{
			get
			{
				return _numerator;
			}
			set
			{
				_numerator = value;
			}
		}

		private List<ExpositionType> expossitionTypes;

		public List<ExpositionType> ExpositionTypes
		{
			get
			{
				if (this.expossitionTypes == null)
				{
					this.expossitionTypes = this.GetTypes();
				}

				return this.expossitionTypes;
			}
		}

		public List<ExpositionType> GetTypes()
		{
			var types = new List<ExpositionType>();
			//
			types.Add(new ExpositionType("Number1") { Numerator = 1 });
			types.Add(new ExpositionType("Number2") { Numerator = 2 });
			types.Add(new ExpositionType("Number3") { Numerator = 3 });
			types.Add(new ExpositionType("Number4") { Numerator = 4 });
			types.Add(new ExpositionType("Number5") { Numerator = 5 });
			//
			return types;
		}
	}
}
