using Castle.ActiveRecord; using NHibernate.Criterion; using System; using System.Text; namespace BizCom { [ActiveRecord("CE_ErpTradeSample")] public class CeErpTradeSample : ComBase { /// /// /// [PrimaryKey(PrimaryKeyType.Native)] public int ID { get; set; } private string _ctid = ""; /// ///订单号 /// [Property] public string ctid { get { return _ctid; } set { _ctid = value; } } /// ///接单时间 /// [Property] public DateTime? ReceiveDate { get; set; } private double _advanceFee = 0; /// ///垫付金额 /// [Property] public double AdvanceFee { get { return _advanceFee; } set { _advanceFee = value; } } private double _refund = 0; /// ///返款金额 /// [Property] public double Refund { get { return _refund; } set { _refund = value; } } private double _commission = 0; /// ///佣金 /// [Property] public double Commission { get { return _commission; } set { _commission = value; } } private double _serviceFee = 0; /// ///平台服务费 /// [Property] public double ServiceFee { get { return _serviceFee; } set { _serviceFee = value; } } private double _logisticsFee = 0; /// ///快递费 /// [Property] public double LogisticsFee { get { return _logisticsFee; } set { _logisticsFee = value; } } /// ///标记日期 /// [Property] public DateTime? SampleDate { get; set; } private int _sampleUserId = 0; /// ///标记人员ID /// [Property] public int SampleUserId { get { return _sampleUserId; } set { _sampleUserId = value; } } public static void Del(object id) { StringBuilder sql = new StringBuilder(); sql.AppendFormat("delete from CE_ErpTradeSample where id=" + id); ExecuteNonQuery(sql.ToString()); } public static CeErpTradeSample GetBytid(string tid) { return FindFirst(Expression.Eq("ctid", tid)); } } }