using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Windows.Media;

namespace BS.Shared.DataContracts
{
	[DataContract]
	public class EmployeeDC : PersonDC, IDataContract
	{
		private List<ValueListEntryDC> _Focuses;

		private List<ValueListEntryDC> _Qualifications;

		[DataMember]
		public List<AbsenceTimeDC> AbsenceTimes { get; set; }

		[DataMember]
		public List<ContractDC> Contracts { get; set; }

		//[DataMember]
		//public int CancellationPeriod { get; set; }

		[DataMember]
		public long? EmployeeOid { get; set; }

		[DataMember]
		public long? EmployeeVersion { get; set; }

		//[DataMember]
		//public ValueListEntryDC EmploymentType { get; set; }

		//[DataMember]
		//public DateTime? EntryDate { get; set; }

		[DataMember]
		public List<ValueListEntryDC> Focuses
		{
			get { return _Focuses ?? (_Focuses = new List<ValueListEntryDC>()); }

			set { _Focuses = value; }
		}

		[DataMember]
		public string HealthInsurance { get; set; }

		//[DataMember]
		//public decimal? HourlyRate { get; set; }

		[DataMember]
		public string InsuranceNumber { get; set; }

		[DataMember]
		public bool? IsQualified { get; set; }

		//[DataMember]
		//public decimal? LeaveDays { get; set; }

		[DataMember]
		public string PersonnelNumber { get; set; }

		//[DataMember]
		//public int ProbationPeriod { get; set; }

		[DataMember]
		public List<ValueListEntryDC> Qualifications
		{
			get { return _Qualifications ?? (_Qualifications = new List<ValueListEntryDC>()); }

			set { _Qualifications = value; }
		}

		[DataMember]
		public List<CustomerEmployeeRelationDC> RelatedCustomers { get; set; }

		[DataMember]
		public string TaxNumber { get; set; }

		//[DataMember]
		//public decimal? WeeklyFLS { get; set; }

		//[DataMember]
		//public decimal? WeeklyTotalHours { get; set; }

		[DataMember]
		public string Text1 { get; set; }

		[DataMember]
		public string Text2 { get; set; }

		[DataMember]
		public string Text3 { get; set; }

		[DataMember]
		public string Text4 { get; set; }

		[DataMember]
		public string Text5 { get; set; }

		[DataMember]
		public string Notice2 { get; set; }

		[DataMember]
		public List<OvertimeDC> Overtimes { get; set; }

        [DataMember]
        public String EmployeeColor { get; set; }

        public SolidColorBrush GetBrush()
        {
            return new SolidColorBrush((Color) ColorConverter.ConvertFromString(EmployeeColor));
        }
	}
}