using Castle.ActiveRecord; using NHibernate.Criterion; using System; using System.Text; namespace BizCom { [ActiveRecord("CE_ErpBill")] public class CeErpBill : ComBase { /// /// /// [PrimaryKey(PrimaryKeyType.Native)] public int ID { get; set; } private string _tid = ""; /// ///订单tid /// [Property] public string tid { get { return _tid; } set { _tid = value; } } private string _title = ""; /// ///发票抬头 /// [Property] public string title { get { return _title; } set { _title = value; } } private string _tax = ""; /// ///发票税号 /// [Property] public string tax { get { return _tax; } set { _tax = value; } } private string _bank = ""; /// ///开户行 /// [Property] public string bank { get { return _bank; } set { _bank = value; } } private string _bankac = ""; /// ///账号 /// [Property] public string bankac { get { return _bankac; } set { _bankac = value; } } private string _address = ""; /// ///地址 /// [Property] public string address { get { return _address; } set { _address = value; } } private string _phone = ""; /// ///电话 /// [Property] public string phone { get { return _phone; } set { _phone = value; } } private string _price = ""; /// ///总价 /// [Property] public string price { get { return _price; } set { _price = value; } } private int _productId = 0; /// /// /// [Property] public int productId { get { return _productId; } set { _productId = value; } } private int _num = 0; /// ///数量 /// [Property] public int num { get { return _num; } set { _num = value; } } private string _type = ""; /// ///发票规格类型 /// [Property] public string type { get { return _type; } set { _type = value; } } private string _sendType = ""; /// ///寄送类型 /// [Property] public string sendType { get { return _sendType; } set { _sendType = value; } } private string _email = ""; /// ///邮箱地址 /// [Property] public string email { get { return _email; } set { _email = value; } } private string _shopName = ""; /// ///店铺 /// [Property] public string shopName { get { return _shopName; } set { _shopName = value; } } private string _buyer_nick = ""; /// ///买家旺旺 /// [Property] public string buyer_nick { get { return _buyer_nick; } set { _buyer_nick = value; } } /// ///申请时间 /// [Property] public DateTime? createTime { get; set; } /// ///开具时间 /// [Property] public DateTime? executeTime { get; set; } private int _state = 0; /// ///当前状态 /// [Property] public int state { get { return _state; } set { _state = value; } } private int _userId = 0; /// ///申请人 /// [Property] public int userId { get { return _userId; } set { _userId = value; } } private string _returnReason = ""; /// ///驳回原因 /// [Property] public string returnReason { get { return _returnReason; } set { _returnReason = value; } } /// ///修改时间 /// [Property] public DateTime? modifyTime { get; set; } private int _comId = 0; /// ///开票公司ID /// [Property] public int comId { get { return _comId; } set { _comId = value; } } private string _fplsh = ""; /// ///发票流水号 /// [Property] public string fplsh { get { return _fplsh; } set { _fplsh = value; } } private string _fpdm = ""; /// ///发票代码 /// [Property] public string fpdm { get { return _fpdm; } set { _fpdm = value; } } private string _fphm = ""; /// ///发票号码 /// [Property] public string fphm { get { return _fphm; } set { _fphm = value; } } private string _failerror = ""; /// ///开票失败错误解释 /// [Property] public string failerror { get { return _failerror; } set { _failerror = value; } } private string _img = ""; /// ///纸质发票图片 /// [Property] public string img { get { return _img; } set { _img = value; } } private string _applymemo = ""; /// ///客服申请时备注 /// [Property] public string applymemo { get { return _applymemo; } set { _applymemo = value; } } private string _executeUser = ""; /// ///开具发票的人 /// [Property] public string executeUser { get { return _executeUser; } set { _executeUser = value; } } private string _billOrderId = ""; /// ///发票的订单编号 /// [Property] public string billOrderId { get { return _billOrderId; } set { _billOrderId = value; } } private string _unit = ""; /// ///单位 /// [Property] public string unit { get { return _unit; } set { _unit = value; } } public static CeErpBill GetByTid(string tid) { return FindFirst(Expression.Eq("tid", tid)); } public static void DelByTid(object tid) { StringBuilder sql = new StringBuilder(); sql.AppendFormat("delete from CE_ErpBill where tid='" + tid + "'"); ExecuteNonQuery(sql.ToString()); } public static void Del(object id) { StringBuilder sql = new StringBuilder(); sql.AppendFormat("delete from CE_ErpBill where id=" + id); ExecuteNonQuery(sql.ToString()); } } }