CeErpProductPrice.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. using Castle.ActiveRecord;
  2. using NHibernate.Criterion;
  3. using System.Text;
  4. namespace BizCom
  5. {
  6. [ActiveRecord("CE_ErpProductPrice")]
  7. public class CeErpProductPrice : ComBase<CeErpProductPrice>
  8. {
  9. /// <summary>
  10. ///
  11. /// </summary>
  12. [PrimaryKey(PrimaryKeyType.Native)]
  13. public int ID { get; set; }
  14. private int _pClass = 0;
  15. /// <summary>
  16. ///产品类别: 1设计 2现货 3电子稿
  17. /// </summary>
  18. [Property]
  19. public int pClass
  20. {
  21. get { return _pClass; }
  22. set { _pClass = value; }
  23. }
  24. private string _pClassText = "";
  25. /// <summary>
  26. ///产品类别
  27. /// </summary>
  28. [Property]
  29. public string pClassText
  30. {
  31. get { return _pClassText; }
  32. set { _pClassText = value; }
  33. }
  34. private int _pType = 0;
  35. /// <summary>
  36. ///产品类型
  37. /// </summary>
  38. [Property]
  39. public int pType
  40. {
  41. get { return _pType; }
  42. set { _pType = value; }
  43. }
  44. private string _pTypeText = "";
  45. /// <summary>
  46. ///产品类型
  47. /// </summary>
  48. [Property]
  49. public string pTypeText
  50. {
  51. get { return _pTypeText; }
  52. set { _pTypeText = value; }
  53. }
  54. private double _ws = 0;
  55. /// <summary>
  56. ///卡片位数
  57. /// </summary>
  58. [Property]
  59. public double ws
  60. {
  61. get { return _ws; }
  62. set { _ws = value; }
  63. }
  64. private string _pMaterial = "";
  65. /// <summary>
  66. ///材质
  67. /// </summary>
  68. [Property]
  69. public string pMaterial
  70. {
  71. get { return _pMaterial; }
  72. set { _pMaterial = value; }
  73. }
  74. private double _modifyPrice = 0;
  75. /// <summary>
  76. ///改稿费
  77. /// </summary>
  78. [Property]
  79. public double modifyPrice
  80. {
  81. get { return _modifyPrice; }
  82. set { _modifyPrice = value; }
  83. }
  84. private double _designPrice = 0;
  85. /// <summary>
  86. ///设计费
  87. /// </summary>
  88. [Property]
  89. public double designPrice
  90. {
  91. get { return _designPrice; }
  92. set { _designPrice = value; }
  93. }
  94. public static void Del(object id)
  95. {
  96. StringBuilder sql = new StringBuilder();
  97. sql.AppendFormat("delete from CE_ErpProductPrice where id=" + id);
  98. ExecuteNonQuery(sql.ToString());
  99. }
  100. internal static CeErpProductPrice GetByPType(int pid, double ws)
  101. {
  102. return FindFirst(Expression.Sql(string.Format("pType={0} and ws = {1}", pid, ws)));
  103. }
  104. internal static CeErpProductPrice GetByPType(int pid, string bz)
  105. {
  106. return FindFirst(Expression.Sql(string.Format("pType={0} and pMaterial like '%{1}%'", pid, bz)));
  107. }
  108. }
  109. }