CeErpStayGoods.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. using Castle.ActiveRecord;
  2. using NHibernate.Criterion;
  3. using System;
  4. using System.Text;
  5. namespace BizCom
  6. {
  7. [ActiveRecord("CE_ErpStayGoods")]
  8. public class CeErpStayGoods : ComBase<CeErpStayGoods>
  9. {
  10. /// <summary>
  11. /// 推多单号
  12. /// </summary>
  13. [PrimaryKey(PrimaryKeyType.Native)]
  14. public int stay_id { get; set; }
  15. private string _t_id = "";
  16. /// <summary>
  17. ///订单号
  18. /// </summary>
  19. [Property]
  20. public string t_id
  21. {
  22. get { return _t_id; }
  23. set { _t_id = value; }
  24. }
  25. private string _status = "";
  26. /// <summary>
  27. ///状态
  28. /// </summary>
  29. [Property]
  30. public string status
  31. {
  32. get { return _status; }
  33. set { _status = value; }
  34. }
  35. private string _stay_type = "";
  36. /// <summary>
  37. ///推多/推购
  38. /// </summary>
  39. [Property]
  40. public string stay_type
  41. {
  42. get { return _stay_type; }
  43. set { _stay_type = value; }
  44. }
  45. private string _shop_name = "";
  46. /// <summary>
  47. ///店铺名称
  48. /// </summary>
  49. [Property]
  50. public string shop_name
  51. {
  52. get { return _shop_name; }
  53. set { _shop_name = value; }
  54. }
  55. private string _wangwang = "";
  56. /// <summary>
  57. ///旺旺号
  58. /// </summary>
  59. [Property]
  60. public string wangwang
  61. {
  62. get { return _wangwang; }
  63. set { _wangwang = value; }
  64. }
  65. /// <summary>
  66. ///申请时间
  67. /// </summary>
  68. [Property]
  69. public DateTime? creata_time { get; set; }
  70. private string _create_u_name = "";
  71. /// <summary>
  72. ///申请人名称
  73. /// </summary>
  74. [Property]
  75. public string create_u_name
  76. {
  77. get { return _create_u_name; }
  78. set { _create_u_name = value; }
  79. }
  80. private int _audit_type = 0;
  81. /// <summary>
  82. ///审核状态 1审核中 2通过 3已退回
  83. /// </summary>
  84. [Property]
  85. public int audit_type
  86. {
  87. get { return _audit_type; }
  88. set { _audit_type = value; }
  89. }
  90. private int _create_u_id = 0;
  91. /// <summary>
  92. ///申请人用户id
  93. /// </summary>
  94. [Property]
  95. public int create_u_id
  96. {
  97. get { return _create_u_id; }
  98. set { _create_u_id = value; }
  99. }
  100. private int _audit_u_id = 0;
  101. /// <summary>
  102. ///审核人
  103. /// </summary>
  104. [Property]
  105. public int audit_u_id
  106. {
  107. get { return _audit_u_id; }
  108. set { _audit_u_id = value; }
  109. }
  110. private string _audit_u_name = "";
  111. /// <summary>
  112. ///审核人名称
  113. /// </summary>
  114. [Property]
  115. public string audit_u_name
  116. {
  117. get { return _audit_u_name; }
  118. set { _audit_u_name = value; }
  119. }
  120. /// <summary>
  121. ///
  122. /// </summary>
  123. [Property]
  124. public DateTime? audit_time { get; set; }
  125. private string _audit_text = "";
  126. /// <summary>
  127. ///
  128. /// </summary>
  129. [Property]
  130. public string audit_text
  131. {
  132. get { return _audit_text; }
  133. set { _audit_text = value; }
  134. }
  135. private int _product_id = 0;
  136. /// <summary>
  137. ///
  138. /// </summary>
  139. [Property]
  140. public int product_id
  141. {
  142. get { return _product_id; }
  143. set { _product_id = value; }
  144. }
  145. public static CeErpStayGoods GetByTid(string t_id)
  146. {
  147. return FindFirst(Expression.Eq("t_id", t_id));
  148. }
  149. public static void Del(object id)
  150. {
  151. StringBuilder sql = new StringBuilder();
  152. sql.AppendFormat("delete from CE_ErpStayGoods where id=" + id);
  153. ExecuteNonQuery(sql.ToString());
  154. }
  155. public static CeErpStayGoods GetStayId(int eid)
  156. {
  157. return FindFirst(Expression.Eq("stay_id", eid));
  158. }
  159. }
  160. }