using Castle.ActiveRecord; using System; using System.Text; namespace BizCom { [ActiveRecord("S_ZcItem")] public class SZcItem : ComBase { /// /// /// [PrimaryKey(PrimaryKeyType.Native)] public int ID { get; set; } private int _userID = 0; /// /// /// [Property] public int UserID { get { return _userID; } set { _userID = value; } } private string _name = ""; /// /// /// [Property] public string Name { get { return _name; } set { _name = value; } } private string _code = ""; /// /// /// [Property] public string Code { get { return _code; } set { _code = value; } } private string _model = ""; /// /// /// [Property] public string Model { get { return _model; } set { _model = value; } } private string _dept = ""; /// /// /// [Property] public string Dept { get { return _dept; } set { _dept = value; } } /// /// /// [Property] public DateTime? GetTime { get; set; } /// /// /// [Property] public DateTime? LastTerm { get; set; } private int _state = 0; /// /// /// [Property] public int State { get { return _state; } set { _state = value; } } /// /// /// [Property] public DateTime? AddTime { get; set; } private double _amount = 0; /// /// /// [Property] public double Amount { get { return _amount; } set { _amount = value; } } public static void Del(object id) { StringBuilder sql = new StringBuilder(); sql.AppendFormat("delete from S_ZcItem where id=" + id); ExecuteNonQuery(sql.ToString()); } } }