using BizCom.Enum; using Castle.ActiveRecord; using NHibernate.Criterion; using System; using System.Text; namespace BizCom { [ActiveRecord("CE_ErpTradeCellFile")] public class CeErpTradeCellFile : ComBase { /// /// /// [PrimaryKey(PrimaryKeyType.Native)] public int ID { get; set; } private string _tid = ""; [Property] public string tid { get { return _tid; } set { _tid = value; } } private string _ctid = ""; [Property] public string ctid { get { return _ctid; } set { _ctid = value; } } private bool _isDel = false; /// /// ÊÇ·ñɾ³ý /// [Property] public bool isDel { get { return _isDel; } set { _isDel = value; } } private string _url = ""; /// /// µØÖ· /// [Property] public string url { get { return _url; } set { _url = value; } } private DateTime _createtime; [Property] public DateTime createtime { get { return _createtime; } set { _createtime = value; } } private string _type; /// /// ÀàÐÍ /// [Property] public string type { get { return _type; } set { _type = value; } } public CeErpTradeCellFile() { } public CeErpTradeCellFile(string tid, string ctid, string url, string type) { _tid = tid; _ctid = ctid; _url = url; _type = type; _createtime = DateTime.Now; } public static void delByCtid(string tid, string ctid, string type) { StringBuilder sql = new StringBuilder(); sql.AppendFormat("update CE_ErpTradeCellFile set isDel=1 where tid='{0}' and ctid='{1}' and type='{2}';", tid, ctid, type); ExecuteNonQuery(sql.ToString()); } public static void delByID(string ID) { StringBuilder sql = new StringBuilder(); sql.AppendFormat("update CE_ErpTradeCellFile set isDel=1 where ID='{0}';", ID); ExecuteNonQuery(sql.ToString()); } } }