order.cs

来自「微软的行业应用解决方案实例!非常优秀的Windows Mobile开发案例」· CS 代码 · 共 109 行

CS
109
字号
using System;
using System.Collections.Generic;
using System.Text;

namespace HardwareDistributor.Business
{
    public class Order
    {
        private int _orderId;
        private int _customerId;
        private string _customerName;
        private DateTime _deliveryDate;
        private string _orderState;

        public Order() { }

        public Order(int orderId, int customerId, string customerName, 
                     DateTime deliveryDate, string orderState)
        {
            this._orderId = orderId;
            this._customerId = customerId;
            this._customerName = customerName;
            this._deliveryDate = deliveryDate;
            this._orderState = orderState;
        }


        /// <summary>
        /// Unique Order Id
        /// </summary>
        public int OrderId
        {
            get
            {
                return _orderId;
            }
            set
            {
                _orderId = value;
            }
        }


        /// <summary>
        /// Unique Customer Id
        /// </summary>
        public int CustomerId
        {
            get
            {
                return _customerId;
            }
            set
            {
                _customerId = value;
            }
        }


        /// <summary>
        /// Customer's company name
        /// </summary>
        public string CustomerName
        {
            get
            {
                return _customerName;
            }
            set
            {
                _customerName = value;
            }
        }


        /// <summary>
        /// Date the order will be delivered
        /// </summary>
        public DateTime DeliveryDate
        {
            get
            {
                return _deliveryDate;
            }
            set
            {
                _deliveryDate = value;
            }
        }


        /// <summary>
        /// Current state of the order as it
        /// moves through the production process
        /// </summary>
        public string OrderState
        {
            get
            {
                return _orderState;
            }
            set
            {
                _orderState = value;
            }
        }
    }
}

⌨️ 快捷键说明

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