📄 orders.cs
字号:
using System;
using System.Collections.Generic;
using System.Web;
using Castle.ActiveRecord;
namespace DNNLite.DesktopModules.Shop.Orders
{
/// <summary>
/// 订单
/// </summary>
[ActiveRecord("DNNLite_Orders")]
public class Orders: ActiveRecordBase<Orders>
{
private int _OrderID;
///<summary>
///订单ID
///</summary>
[PrimaryKey( PrimaryKeyType.Native )]
public int ID
{
get { return _OrderID; }
set { _OrderID = value; }
}
private string _OrderNum;
///<summary>
///订单编号
///</summary>
[Property("[OrderNum]",Unique=true )]
public string OrderNum
{
get { return _OrderNum; }
set { _OrderNum = value; }
}
private string _UserName;
///<summary>
///用户名
///</summary>
[Property("[UserName]")]
public string UserName
{
get { return _UserName; }
set { _UserName = value; }
}
private string _AgentName;
///<summary>
///代理商名
///</summary>
[Property("[AgentName]")]
public string AgentName
{
get { return _AgentName; }
set { _AgentName = value; }
}
private string _Functionary;
///<summary>
///跟单员
///</summary>
[Property("[Functionary]")]
public string Functionary
{
get { return _Functionary; }
set { _Functionary = value; }
}
private int _ClientID;
///<summary>
///客户ID
///</summary>
[Property("[ClientID]")]
public int ClientID
{
get { return _ClientID; }
set { _ClientID = value; }
}
private decimal _MoneyTotal;
///<summary>
///订单总金额
///</summary>
[Property("[MoneyTotal]")]
public decimal MoneyTotal
{
get { return _MoneyTotal; }
set { _MoneyTotal = value; }
}
private decimal _MoneyGoods;
///<summary>
///购买商品合计金额
///</summary>
[Property("[MoneyGoods]")]
public decimal MoneyGoods
{
get { return _MoneyGoods; }
set { _MoneyGoods = value; }
}
private bool _NeedInvoice;
///<summary>
///是否需要开发票
///</summary>
[Property("[NeedInvoice]")]
public bool NeedInvoice
{
get { return _NeedInvoice; }
set { _NeedInvoice = value; }
}
private string _InvoiceContent;
///<summary>
///发表内容,包括抬头、商品名称、金额等
///</summary>
[Property("[InvoiceContent]")]
public string InvoiceContent
{
get { return _InvoiceContent; }
set { _InvoiceContent = value; }
}
private bool _Invoiced;
///<summary>
///是否已开发票
///</summary>
[Property("[Invoiced]")]
public bool Invoiced
{
get { return _Invoiced; }
set { _Invoiced = value; }
}
private string _Remark;
///<summary>
///备注
///</summary>
[Property("[Remark]")]
public string Remark
{
get { return _Remark; }
set { _Remark = value; }
}
private decimal _MoneyReceipt;
///<summary>
///已收款
///</summary>
[Property("[MoneyReceipt]")]
public decimal MoneyReceipt
{
get { return _MoneyReceipt; }
set { _MoneyReceipt = value; }
}
private DateTime? _BeginDate;
///<summary>
///开始服务日期
///</summary>
[Property("[BeginDate]")]
public DateTime? BeginDate
{
get { return _BeginDate; }
set { _BeginDate = value; }
}
private DateTime _InputTime;
///<summary>
///录入时间
///</summary>
[Property("[InputTime]")]
public DateTime InputTime
{
get { return _InputTime; }
set { _InputTime = value; }
}
private string _ContacterName;
///<summary>
///受货人姓名
///</summary>
[Property("[ContacterName]")]
public string ContacterName
{
get { return _ContacterName; }
set { _ContacterName = value; }
}
private string _Address;
///<summary>
///收货人地址
///</summary>
[Property("[Address]")]
public string Address
{
get { return _Address; }
set { _Address = value; }
}
private string _ZipCode;
///<summary>
///邮编
///</summary>
[Property("[ZipCode]")]
public string ZipCode
{
get { return _ZipCode; }
set { _ZipCode = value; }
}
private string _Mobile;
///<summary>
///手机
///</summary>
[Property("[Mobile]")]
public string Mobile
{
get { return _Mobile; }
set { _Mobile = value; }
}
private string _Phone;
///<summary>
///联系电话
///</summary>
[Property("[Phone]")]
public string Phone
{
get { return _Phone; }
set { _Phone = value; }
}
private string _Email;
///<summary>
///Email
///</summary>
[Property("[Email]")]
public string Email
{
get { return _Email; }
set { _Email = value; }
}
private string _PaymentType;
///<summary>
///付款方式
///</summary>
[Property("[PaymentType]")]
public string PaymentType
{
get { return _PaymentType; }
set { _PaymentType = value; }
}
private int _DeliverType;
///<summary>
///送货方式
///</summary>
[Property("[DeliverType]")]
public int DeliverType
{
get { return _DeliverType; }
set { _DeliverType = value; }
}
private EnumOrderState _Status;
///<summary>
///订单状态
///</summary>
[Property("[Status]")]
public EnumOrderState Status
{
get { return _Status; }
set { _Status = value; }
}
private int _DeliverStatus;
///<summary>
///物流状态
///</summary>
[Property("[DeliverStatus]")]
public int DeliverStatus
{
get { return _DeliverStatus; }
set { _DeliverStatus = value; }
}
private bool _EnableDownload;
///<summary>
///是否开通下载
///</summary>
[Property("EnableDownload")]
public bool EnableDownload
{
get { return _EnableDownload; }
set { _EnableDownload = value; }
}
private decimal _PresentMoney;
///<summary>
///返还的现金券
///</summary>
[Property("PresentMoney")]
public decimal PresentMoney
{
get { return _PresentMoney; }
set { _PresentMoney = value; }
}
private int _PresentPoint;
///<summary>
///赠送点券
///</summary>
[Property("PresentPoint")]
public int PresentPoint
{
get { return _PresentPoint; }
set { _PresentPoint = value; }
}
private int _PresentExp;
///<summary>
///得到的积分
///</summary>
[Property("PresentExp")]
public int PresentExp
{
get { return _PresentExp; }
set { _PresentExp = value; }
}
private float _Discount_Payment;
///<summary>
///付款方式的折扣
///</summary>
[Property("Discount_Payment")]
public float Discount_Payment
{
get { return _Discount_Payment; }
set { _Discount_Payment = value; }
}
private decimal _Charge_Deliver;
///<summary>
///运费
///</summary>
[Property("Charge_Deliver")]
public decimal Charge_Deliver
{
get { return _Charge_Deliver; }
set { _Charge_Deliver = value; }
}
private string _Memo;
///<summary>
///内部记录
///</summary>
[Property("[Memo]")]
public string Memo
{
get { return _Memo; }
set { _Memo = value; }
}
private int _OutOfStockProject;
///<summary>
///商品脱销处理方案
///</summary>
[Property("OutOfStockProject")]
public int OutOfStockProject
{
get { return _OutOfStockProject; }
set { _OutOfStockProject = value; }
}
private string _OrderType;
///<summary>
///订单类型
///</summary>
[Property("OrderType")]
public string OrderType
{
get { return _OrderType; }
set { _OrderType = value; }
}
private int _CouponID;
///<summary>
///优惠券
///</summary>
[Property("CouponID")]
public int CouponID
{
get { return _CouponID; }
set { _CouponID = value; }
}
private string _DeliveryTime;
///<summary>
///对配送时间的要求
///</summary>
[Property("DeliveryTime")]
public string DeliveryTime
{
get { return _DeliveryTime; }
set { _DeliveryTime = value; }
}
/// <summary>
/// 返回新订单号
/// </summary>
/// <returns></returns>
public static string NewOrderNum()
{
long seq = DNNLite.Service.Sequence.SequenceService.Next("order");
string head = "OD";
string body = DateTime.Today.ToString("yyyyMMdd");
string bottom = seq.ToString("000000");
return head + body + bottom;
}
}
/// <summary>
/// 订单状态
/// </summary>
public enum EnumOrderState
{
已付款=100,
未付款=10,
已取消=0
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -