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

📄 dinnerorder.cs

📁 该源代码用 C# 写成
💻 CS
字号:
using System;

namespace Org.InteliIM.Activities.Dinner
{
	/// <summary>
	/// 餐饮订单
	/// </summary>
	public class DinnerOrder: Order
	{
		/// <summary>
		/// 构造函数
		/// </summary>
		public DinnerOrder()
		{
			
		}
		
		private string purchaserId;
		
		/// <summary>
		/// 购买者编号
		/// </summary>
		public string PurchaserId
		{
			get
			{
				if(this.purchaserId == null)
					this.purchaserId = "";
				
				return this.purchaserId;
			}
			set
			{
				this.purchaserId = value;
			}
		}
		
		private string delivererId;
		
		/// <summary>
		/// 送货员编号
		/// </summary>
		public string DelivererId
		{
			get
			{
				if(this.delivererId == null)
					this.delivererId = "";
				
				return this.delivererId;
			}
			set
			{
				this.delivererId = value;
			}
		}

		private DinnerOrderEntryCollection entries;

		/// <summary>
		/// 项集合
		/// </summary>
		public DinnerOrderEntryCollection Entries
		{
			get
			{
				if(this.entries == null)
					this.entries = new DinnerOrderEntryCollection();

				return this.entries;
			}
			set
			{
				this.entries = value;
			}
		}
		
		private DateTime orderTime;
		
		/// <summary>
		/// 下单时间
		/// </summary>
		public DateTime OrderTime
		{
			get
			{
				return this.orderTime;
			}
			set
			{
				this.orderTime = value;
			}
		}
		
		private DateTime shipTime;
		
		/// <summary>
		/// 发货时间
		/// </summary>
		public DateTime ShipTime
		{
			get
			{
				return this.shipTime;
			}
			set
			{
				this.shipTime = value;
			}
		}
		
		private DinnerOrderStatus status = DinnerOrderStatus.Purchasing;
		
		/// <summary>
		/// 状态
		/// </summary>
		public DinnerOrderStatus Status
		{
			get
			{
				return this.status;
			}
			set
			{
				this.status = value;
			}
		}
		
		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 + -