using Castle.ActiveRecord; using NHibernate.Criterion; using System; using System.Data; using System.Text; namespace BizCom { [ActiveRecord("CE_ErpProduct")] public class CeErpProduct : ComBase { /// /// /// [PrimaryKey(PrimaryKeyType.Native)] public int ID { get; set; } private int _pCategory = 0; /// ///类别 /// [Property] public int PCategory { get { return _pCategory; } set { _pCategory = value; } } private string _pCategoryText = ""; /// /// /// [Property] public string PCategoryText { get { return _pCategoryText; } set { _pCategoryText = value; } } private string _pSupTypeId = ""; /// ///一级分类ID /// [Property] public string PSupTypeId { get { return _pSupTypeId; } set { _pSupTypeId = value; } } private string _pSupType = ""; /// ///一级分类 /// [Property] public string PSupType { get { return _pSupType; } set { _pSupType = value; } } private string _pTypeId = ""; /// ///类型ID /// [Property] public string PTypeId { get { return _pTypeId; } set { _pTypeId = value; } } private string _pType = ""; /// ///类型名称 /// [Property] public string PType { get { return _pType; } set { _pType = value; } } private string _spu = ""; /// ///款式编码 /// [Property] public string Spu { get { return _spu; } set { _spu = value; } } private string _pNo = ""; /// ///编号 /// [Property] public string PNo { get { return _pNo; } set { _pNo = value; } } private string _pName = ""; /// ///商品名称 /// [Property] public string PName { get { return _pName; } set { _pName = value; } } private string _shortName = ""; /// ///短名称 /// [Property] public string ShortName { get { return _shortName; } set { _shortName = value; } } private string _pNum = ""; /// /// /// [Property] public string PNum { get { return _pNum; } set { _pNum = value; } } private string _pMaterial = ""; /// ///材质 /// [Property] public string PMaterial { get { return _pMaterial; } set { _pMaterial = value; } } private string _pCraft = ""; /// ///工艺 /// [Property] public string PCraft { get { return _pCraft; } set { _pCraft = value; } } private int _isAutoDistribute = 0; /// /// /// [Property] public int IsAutoDistribute { get { return _isAutoDistribute; } set { _isAutoDistribute = value; } } private int _isNeedDesignPrice = 0; /// /// /// [Property] public int IsNeedDesignPrice { get { return _isNeedDesignPrice; } set { _isNeedDesignPrice = value; } } private double _chang = 0; /// ///长 /// [Property] public double Chang { get { return _chang; } set { _chang = value; } } private double _kuang = 0; /// ///宽 /// [Property] public double Kuang { get { return _kuang; } set { _kuang = value; } } private double _gao = 0; /// ///高 /// [Property] public double Gao { get { return _gao; } set { _gao = value; } } private string _chiCunUnit = ""; /// ///尺寸单位 /// [Property] public string ChiCunUnit { get { return _chiCunUnit; } set { _chiCunUnit = value; } } private double _mianJi = 0; /// ///面积 /// [Property] public double MianJi { get { return _mianJi; } set { _mianJi = value; } } private string _mianJiUnit = ""; /// ///面积单位 /// [Property] public string MianJiUnit { get { return _mianJiUnit; } set { _mianJiUnit = value; } } private double _tiJi = 0; /// ///体积 /// [Property] public double TiJi { get { return _tiJi; } set { _tiJi = value; } } private string _tiJiUnit = ""; /// ///体积单位 /// [Property] public string TiJiUnit { get { return _tiJiUnit; } set { _tiJiUnit = value; } } private double _weight = 0; /// ///重量 /// [Property] public double Weight { get { return _weight; } set { _weight = value; } } private string _weightUnit = ""; /// ///重量单位 /// [Property] public string WeightUnit { get { return _weightUnit; } set { _weightUnit = value; } } private string _color = ""; /// ///颜色 /// [Property] public string Color { get { return _color; } set { _color = value; } } private string _spec = ""; /// ///规格 /// [Property] public string Spec { get { return _spec; } set { _spec = value; } } private string _stockUnit = ""; /// ///库存数量基准单位 /// [Property] public string StockUnit { get { return _stockUnit; } set { _stockUnit = value; } } private string _logoPicPath = ""; /// ///Logo路径 /// [Property] public string LogoPicPath { get { return _logoPicPath; } set { _logoPicPath = value; } } private string _picPath = ""; /// ///大图路径 /// [Property] public string PicPath { get { return _picPath; } set { _picPath = value; } } private double _jiZunPrice = 0; /// /// /// [Property] public double JiZunPrice { get { return _jiZunPrice; } set { _jiZunPrice = value; } } private double _chengBenPrice = 0; /// /// /// [Property] public double ChengBenPrice { get { return _chengBenPrice; } set { _chengBenPrice = value; } } private double _diaoPaiPrice = 0; /// /// /// [Property] public double DiaoPaiPrice { get { return _diaoPaiPrice; } set { _diaoPaiPrice = value; } } private int _isLock = 0; /// ///是否删除 /// [Property] public int IsLock { get { return _isLock; } set { _isLock = value; } } private int _isDel = 0; /// ///是否停用 /// [Property] public int IsDel { get { return _isDel; } set { _isDel = value; } } private string _remark = ""; /// /// /// [Property] public string Remark { get { return _remark; } set { _remark = value; } } private int _createUid = 0; /// /// /// [Property] public int CreateUid { get { return _createUid; } set { _createUid = value; } } private string _createUserName = ""; /// /// /// [Property] public string CreateUserName { get { return _createUserName; } set { _createUserName = value; } } /// /// /// [Property] public DateTime CreateTime { get; set; } private int _updateUid = 0; /// /// /// [Property] public int UpdateUid { get { return _updateUid; } set { _updateUid = value; } } private string _updateUserName = ""; /// /// /// [Property] public string UpdateUserName { get { return _updateUserName; } set { _updateUserName = value; } } /// /// /// [Property] public DateTime UpdateTime { get; set; } private int _isAllDesignerSelect = 0; /// /// /// [Property] public int IsAllDesignerSelect { get { return _isAllDesignerSelect; } set { _isAllDesignerSelect = value; } } //表单json private string _formJson = ""; [Property] public string FormJson { get { return _formJson; } set { _formJson = value; } } private string _uuid = ""; /// /// uuid /// [Property] public string uuid { get { return _uuid; } set { _uuid = value; } } public static void Del(object id) { StringBuilder sql = new StringBuilder(); sql.AppendFormat("delete from CE_ErpProduct where id=" + id); ExecuteNonQuery(sql.ToString()); } public static CeErpProduct GetById(int id) { return FindFirst(Expression.Eq("ID", id)); } public static DataTable Get() { string sql = "select * from CE_ErpProduct order by PTypeId,ID asc"; return DbConn.ExecuteDataset(sql).Tables[0]; } public static CeErpProduct GetByName(string name) { return FindFirst(Expression.Eq("uuid", name)); } } }