| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- using Castle.ActiveRecord;
- using NHibernate.Criterion;
- using System.Text;
- namespace BizCom
- {
- [ActiveRecord("CE_ErpProductPrice")]
- public class CeErpProductPrice : ComBase<CeErpProductPrice>
- {
- /// <summary>
- ///
- /// </summary>
- [PrimaryKey(PrimaryKeyType.Native)]
- public int ID { get; set; }
- private int _pClass = 0;
- /// <summary>
- ///产品类别: 1设计 2现货 3电子稿
- /// </summary>
- [Property]
- public int pClass
- {
- get { return _pClass; }
- set { _pClass = value; }
- }
- private string _pClassText = "";
- /// <summary>
- ///产品类别
- /// </summary>
- [Property]
- public string pClassText
- {
- get { return _pClassText; }
- set { _pClassText = value; }
- }
- private int _pType = 0;
- /// <summary>
- ///产品类型
- /// </summary>
- [Property]
- public int pType
- {
- get { return _pType; }
- set { _pType = value; }
- }
- private string _pTypeText = "";
- /// <summary>
- ///产品类型
- /// </summary>
- [Property]
- public string pTypeText
- {
- get { return _pTypeText; }
- set { _pTypeText = value; }
- }
- private double _ws = 0;
- /// <summary>
- ///卡片位数
- /// </summary>
- [Property]
- public double ws
- {
- get { return _ws; }
- set { _ws = value; }
- }
- private string _pMaterial = "";
- /// <summary>
- ///材质
- /// </summary>
- [Property]
- public string pMaterial
- {
- get { return _pMaterial; }
- set { _pMaterial = value; }
- }
- private double _modifyPrice = 0;
- /// <summary>
- ///改稿费
- /// </summary>
- [Property]
- public double modifyPrice
- {
- get { return _modifyPrice; }
- set { _modifyPrice = value; }
- }
- private double _designPrice = 0;
- /// <summary>
- ///设计费
- /// </summary>
- [Property]
- public double designPrice
- {
- get { return _designPrice; }
- set { _designPrice = value; }
- }
- public static void Del(object id)
- {
- StringBuilder sql = new StringBuilder();
- sql.AppendFormat("delete from CE_ErpProductPrice where id=" + id);
- ExecuteNonQuery(sql.ToString());
- }
- internal static CeErpProductPrice GetByPType(int pid, double ws)
- {
- return FindFirst(Expression.Sql(string.Format("pType={0} and ws = {1}", pid, ws)));
- }
- internal static CeErpProductPrice GetByPType(int pid, string bz)
- {
- return FindFirst(Expression.Sql(string.Format("pType={0} and pMaterial like '%{1}%'", pid, bz)));
- }
- }
- }
|