| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523 |
- using Castle.ActiveRecord;
- using NHibernate.Criterion;
- using System;
- using System.Data;
- using System.Text;
- namespace BizCom
- {
- [ActiveRecord("CE_ErpProduct")]
- public class CeErpProduct : ComBase<CeErpProduct>
- {
- /// <summary>
- ///
- /// </summary>
- [PrimaryKey(PrimaryKeyType.Native)]
- public int ID { get; set; }
- private int _pCategory = 0;
- /// <summary>
- ///类别
- /// </summary>
- [Property]
- public int PCategory
- {
- get { return _pCategory; }
- set { _pCategory = value; }
- }
- private string _pCategoryText = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string PCategoryText
- {
- get { return _pCategoryText; }
- set { _pCategoryText = value; }
- }
- private string _pSupTypeId = "";
- /// <summary>
- ///一级分类ID
- /// </summary>
- [Property]
- public string PSupTypeId
- {
- get { return _pSupTypeId; }
- set { _pSupTypeId = value; }
- }
- private string _pSupType = "";
- /// <summary>
- ///一级分类
- /// </summary>
- [Property]
- public string PSupType
- {
- get { return _pSupType; }
- set { _pSupType = value; }
- }
- private string _pTypeId = "";
- /// <summary>
- ///类型ID
- /// </summary>
- [Property]
- public string PTypeId
- {
- get { return _pTypeId; }
- set { _pTypeId = value; }
- }
- private string _pType = "";
- /// <summary>
- ///类型名称
- /// </summary>
- [Property]
- public string PType
- {
- get { return _pType; }
- set { _pType = value; }
- }
- private string _spu = "";
- /// <summary>
- ///款式编码
- /// </summary>
- [Property]
- public string Spu
- {
- get { return _spu; }
- set { _spu = value; }
- }
- private string _pNo = "";
- /// <summary>
- ///编号
- /// </summary>
- [Property]
- public string PNo
- {
- get { return _pNo; }
- set { _pNo = value; }
- }
- private string _pName = "";
- /// <summary>
- ///商品名称
- /// </summary>
- [Property]
- public string PName
- {
- get { return _pName; }
- set { _pName = value; }
- }
- private string _shortName = "";
- /// <summary>
- ///短名称
- /// </summary>
- [Property]
- public string ShortName
- {
- get { return _shortName; }
- set { _shortName = value; }
- }
- private string _pNum = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string PNum
- {
- get { return _pNum; }
- set { _pNum = value; }
- }
- private string _pMaterial = "";
- /// <summary>
- ///材质
- /// </summary>
- [Property]
- public string PMaterial
- {
- get { return _pMaterial; }
- set { _pMaterial = value; }
- }
- private string _pCraft = "";
- /// <summary>
- ///工艺
- /// </summary>
- [Property]
- public string PCraft
- {
- get { return _pCraft; }
- set { _pCraft = value; }
- }
- private int _isAutoDistribute = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int IsAutoDistribute
- {
- get { return _isAutoDistribute; }
- set { _isAutoDistribute = value; }
- }
- private int _isNeedDesignPrice = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int IsNeedDesignPrice
- {
- get { return _isNeedDesignPrice; }
- set { _isNeedDesignPrice = value; }
- }
- private double _chang = 0;
- /// <summary>
- ///长
- /// </summary>
- [Property]
- public double Chang
- {
- get { return _chang; }
- set { _chang = value; }
- }
- private double _kuang = 0;
- /// <summary>
- ///宽
- /// </summary>
- [Property]
- public double Kuang
- {
- get { return _kuang; }
- set { _kuang = value; }
- }
- private double _gao = 0;
- /// <summary>
- ///高
- /// </summary>
- [Property]
- public double Gao
- {
- get { return _gao; }
- set { _gao = value; }
- }
- private string _chiCunUnit = "";
- /// <summary>
- ///尺寸单位
- /// </summary>
- [Property]
- public string ChiCunUnit
- {
- get { return _chiCunUnit; }
- set { _chiCunUnit = value; }
- }
- private double _mianJi = 0;
- /// <summary>
- ///面积
- /// </summary>
- [Property]
- public double MianJi
- {
- get { return _mianJi; }
- set { _mianJi = value; }
- }
- private string _mianJiUnit = "";
- /// <summary>
- ///面积单位
- /// </summary>
- [Property]
- public string MianJiUnit
- {
- get { return _mianJiUnit; }
- set { _mianJiUnit = value; }
- }
- private double _tiJi = 0;
- /// <summary>
- ///体积
- /// </summary>
- [Property]
- public double TiJi
- {
- get { return _tiJi; }
- set { _tiJi = value; }
- }
- private string _tiJiUnit = "";
- /// <summary>
- ///体积单位
- /// </summary>
- [Property]
- public string TiJiUnit
- {
- get { return _tiJiUnit; }
- set { _tiJiUnit = value; }
- }
- private double _weight = 0;
- /// <summary>
- ///重量
- /// </summary>
- [Property]
- public double Weight
- {
- get { return _weight; }
- set { _weight = value; }
- }
- private string _weightUnit = "";
- /// <summary>
- ///重量单位
- /// </summary>
- [Property]
- public string WeightUnit
- {
- get { return _weightUnit; }
- set { _weightUnit = value; }
- }
- private string _color = "";
- /// <summary>
- ///颜色
- /// </summary>
- [Property]
- public string Color
- {
- get { return _color; }
- set { _color = value; }
- }
- private string _spec = "";
- /// <summary>
- ///规格
- /// </summary>
- [Property]
- public string Spec
- {
- get { return _spec; }
- set { _spec = value; }
- }
- private string _stockUnit = "";
- /// <summary>
- ///库存数量基准单位
- /// </summary>
- [Property]
- public string StockUnit
- {
- get { return _stockUnit; }
- set { _stockUnit = value; }
- }
- private string _logoPicPath = "";
- /// <summary>
- ///Logo路径
- /// </summary>
- [Property]
- public string LogoPicPath
- {
- get { return _logoPicPath; }
- set { _logoPicPath = value; }
- }
- private string _picPath = "";
- /// <summary>
- ///大图路径
- /// </summary>
- [Property]
- public string PicPath
- {
- get { return _picPath; }
- set { _picPath = value; }
- }
- private double _jiZunPrice = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public double JiZunPrice
- {
- get { return _jiZunPrice; }
- set { _jiZunPrice = value; }
- }
- private double _chengBenPrice = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public double ChengBenPrice
- {
- get { return _chengBenPrice; }
- set { _chengBenPrice = value; }
- }
- private double _diaoPaiPrice = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public double DiaoPaiPrice
- {
- get { return _diaoPaiPrice; }
- set { _diaoPaiPrice = value; }
- }
- private int _isLock = 0;
- /// <summary>
- ///是否删除
- /// </summary>
- [Property]
- public int IsLock
- {
- get { return _isLock; }
- set { _isLock = value; }
- }
- private int _isDel = 0;
- /// <summary>
- ///是否停用
- /// </summary>
- [Property]
- public int IsDel
- {
- get { return _isDel; }
- set { _isDel = value; }
- }
- private string _remark = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string Remark
- {
- get { return _remark; }
- set { _remark = value; }
- }
- private int _createUid = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int CreateUid
- {
- get { return _createUid; }
- set { _createUid = value; }
- }
- private string _createUserName = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string CreateUserName
- {
- get { return _createUserName; }
- set { _createUserName = value; }
- }
- /// <summary>
- ///
- /// </summary>
- [Property]
- public DateTime CreateTime { get; set; }
- private int _updateUid = 0;
- /// <summary>
- ///
- /// </summary>
- [Property]
- public int UpdateUid
- {
- get { return _updateUid; }
- set { _updateUid = value; }
- }
- private string _updateUserName = "";
- /// <summary>
- ///
- /// </summary>
- [Property]
- public string UpdateUserName
- {
- get { return _updateUserName; }
- set { _updateUserName = value; }
- }
- /// <summary>
- ///
- /// </summary>
- [Property]
- public DateTime UpdateTime { get; set; }
- private int _isAllDesignerSelect = 0;
- /// <summary>
- ///
- /// </summary>
- [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 = "";
- /// <summary>
- /// uuid
- /// </summary>
- [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));
- }
- }
- }
|