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

📄 dinnerorderinfo.cs

📁 这个版本(InteliIM Open Kernel Release 2)是目前最新的(首次公开)
💻 CS
字号:
#region Using Directives

using System;
using System.Collections.Generic; 

#endregion

namespace Org.InteliIM.Applications.Tourism.Dinner
{
	/// <summary>
	/// Represents a dinner order.
	/// </summary>
	public class DinnerOrderInfo: OrderInfo
	{
		/// <summary>
		/// Initializes a new instance of the DinnerOrder class.
		/// </summary>
		public DinnerOrderInfo()
		{
			
		}
		
		private string purchaserId;
		
		/// <summary>
		/// Gets or sets the purchaser's id.
		/// </summary>
		public string PurchaserId
		{
			get
			{
				if(this.purchaserId == null)
					this.purchaserId = "";
				
				return this.purchaserId;
			}
			set
			{
				this.purchaserId = value;
			}
		}
		
		private string delivererId;
		
		/// <summary>
		/// Gets or sets the deliverer's id.
		/// </summary>
		public string DelivererId
		{
			get
			{
				if(this.delivererId == null)
					this.delivererId = "";
				
				return this.delivererId;
			}
			set
			{
				this.delivererId = value;
			}
		}

		private Collection<DinnerOrderEntry> entries;

		/// <summary>
		/// Gets or sets the dinner order entries.
		/// </summary>
		public Collection<DinnerOrderEntry> Entries
		{
			get
			{
				if(this.entries == null)
					this.entries = new Collection<DinnerOrderEntry>();

				return this.entries;
			}
			set
			{
				this.entries = value;
			}
		}
		
		private DateTime orderTime;
		
		/// <summary>
		/// Gets or sets the order time.
		/// </summary>
		public DateTime OrderTime
		{
			get
			{
				return this.orderTime;
			}
			set
			{
				this.orderTime = value;
			}
		}
		
		private DateTime shipTime;
		
		/// <summary>
		/// Gets or sets the ship time.
		/// </summary>
		public DateTime ShipTime
		{
			get
			{
				return this.shipTime;
			}
			set
			{
				this.shipTime = value;
			}
		}
		
		private DinnerOrderStatus status = DinnerOrderStatus.Purchasing;
		
		/// <summary>
		/// Gets or sets the dinner order status.
		/// </summary>
		public DinnerOrderStatus Status
		{
			get
			{
				return this.status;
			}
			set
			{
				this.status = value;
			}
		}
		
		/// <summary>
		/// Gets or sets the price.
		/// </summary>
		public decimal Price
		{
			get
			{
				decimal price = 0;
				
				foreach(DinnerOrderEntry entry in this.entries)
				{
					price += entry.Price;
				}
				
				return price;
			}
		}
	}
}

⌨️ 快捷键说明

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