using Castle.ActiveRecord; using NHibernate.Criterion; using System; using System.Text; namespace BizCom { [ActiveRecord("CE_ErpPersuade")] public class CeErpPersuade : ComBase { /// /// /// [PrimaryKey(PrimaryKeyType.Native)] public int ID { get; set; } private string _ctid = ""; /// /// /// [Property] public string ctid { get { return _ctid; } set { _ctid = value; } } private string _rtype = ""; /// /// /// [Property] public string rtype { get { return _rtype; } set { _rtype = value; } } /// /// /// [Property] public DateTime? created { get; set; } private string _con = ""; /// /// /// [Property] public string con { get { return _con; } set { _con = value; } } private int _verifyuserid = 0; /// /// /// [Property] public int verifyuserid { get { return _verifyuserid; } set { _verifyuserid = value; } } private int _applyuserid = 0; /// /// /// [Property] public int applyuserid { get { return _applyuserid; } set { _applyuserid = value; } } private int _pstate = 0; /// /// /// [Property] public int pstate { get { return _pstate; } set { _pstate = value; } } /// /// /// [Property] public DateTime? verifytime { get; set; } private string _backreason = ""; /// /// /// [Property] public string backreason { get { return _backreason; } set { _backreason = value; } } private string _img = ""; /// /// /// [Property] public string img { get { return _img; } set { _img = value; } } public static CeErpPersuade GetByCtid(string ctid) { return FindFirst(Expression.Eq("ctid", ctid)); } public static void Del(object id) { StringBuilder sql = new StringBuilder(); sql.AppendFormat("delete from CE_ErpPersuade where id=" + id); ExecuteNonQuery(sql.ToString()); } } }