⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flight.cs

📁 根据起降城市,查询到起降时间,以及航次的具体信息.
💻 CS
字号:
using System;
using System.Collections;

namespace BusinessEntity
{
	/// <summary>
	/// Flight 的摘要说明。
	/// </summary>
	public class Flight
	{
		private int id;
		private string flightName;
		private City fromCity;
		private City toCity;
		private CabinCollection items;
		private DateTime startTime;
		private DateTime endTime;

		public int Id
		{
			get
			{
				return id;
			}
			set{
				id = value;
			}
		}

		public string FlightName
		{
			get
			{
				return flightName;
			}
			set
			{
				flightName = value;
			}
		}


		public CabinCollection Items
		{
			get
			{
				return items;
			}
			set
			{
				items = value;
			}
		}

		public City FromCity
		{
			get
			{
				return this.fromCity;
			}
			set
			{
				this.fromCity = value;
			}
		}

		public City ToCity
		{
			get
			{
				return this.toCity;
			}
			set
			{
				this.toCity = value;
			}
		}

		public DateTime StartTime 
		{
			get
			{
				return startTime;
			}
			set
			{
				startTime = value;
			}
		}

		public DateTime EndTime
		{
			get
			{
				return endTime;
			}
			set
			{
				endTime = value;
			}
		}

		public Flight()
		{
		}

		public Flight(int id, string name, City fromCity, City toCity, DateTime startTime, DateTime endTime)
		{
			this.id = id;
			this.flightName = name;
			this.fromCity = fromCity;
			this.toCity = toCity;
			this.startTime = startTime;
			this.endTime = endTime;
		}
	}

	public class FlightCollection : System.Collections.CollectionBase
	{
		public Flight this[int index]
		{
			get
			{
				return (Flight)this.List[index];
			}
			set
			{
				this.List[index] = (Flight)value;
			}
		}

		public int Add(Flight item)
		{
			return this.List.Add(item);
		}

		public void Remove(Flight item)
		{
			this.List.Remove(item);
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -