CeErpZhangDan.cs 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. using Castle.ActiveRecord;
  2. using NHibernate.Criterion;
  3. using System;
  4. using System.Text;
  5. namespace BizCom
  6. {
  7. [ActiveRecord("CE_ErpZhangDan")]
  8. public class CeErpZhangDan : ComBase<CeErpZhangDan>, ICloneable
  9. {
  10. /// <summary>
  11. ///
  12. /// </summary>
  13. [PrimaryKey(PrimaryKeyType.Native)]
  14. public int ID { get; set; }
  15. private string _tid = "";
  16. /// <summary>
  17. ///订单tid
  18. /// </summary>
  19. [Property]
  20. public string tid
  21. {
  22. get { return _tid; }
  23. set { _tid = value; }
  24. }
  25. private int _num = 0;
  26. /// <summary>
  27. ///数量
  28. /// </summary>
  29. [Property]
  30. public int num
  31. {
  32. get { return _num; }
  33. set { _num = value; }
  34. }
  35. private double _price = 0;
  36. /// <summary>
  37. ///单价
  38. /// </summary>
  39. [Property]
  40. public double price
  41. {
  42. get { return _price; }
  43. set { _price = value; }
  44. }
  45. private double _total = 0;
  46. /// <summary>
  47. ///总价
  48. /// </summary>
  49. [Property]
  50. public double total
  51. {
  52. get { return _total; }
  53. set { _total = value; }
  54. }
  55. private string _batchNo = "";
  56. /// <summary>
  57. ///批次号
  58. /// </summary>
  59. [Property]
  60. public string batchNo
  61. {
  62. get { return _batchNo; }
  63. set { _batchNo = value; }
  64. }
  65. private string _logistics = "";
  66. /// <summary>
  67. ///物流
  68. /// </summary>
  69. [Property]
  70. public string logistics
  71. {
  72. get { return _logistics; }
  73. set { _logistics = value; }
  74. }
  75. private string _logisticsNo = "";
  76. /// <summary>
  77. ///运单号
  78. /// </summary>
  79. [Property]
  80. public string logisticsNo
  81. {
  82. get { return _logisticsNo; }
  83. set { _logisticsNo = value; }
  84. }
  85. private double _logisticsAmount = 0;
  86. /// <summary>
  87. ///快递金额
  88. /// </summary>
  89. [Property]
  90. public double logisticsAmount
  91. {
  92. get { return _logisticsAmount; }
  93. set { _logisticsAmount = value; }
  94. }
  95. private double _weight = 0;
  96. /// <summary>
  97. ///重量
  98. /// </summary>
  99. [Property]
  100. public double weight
  101. {
  102. get { return _weight; }
  103. set { _weight = value; }
  104. }
  105. private string _fileName = "";
  106. /// <summary>
  107. ///文件名
  108. /// </summary>
  109. [Property]
  110. public string fileName
  111. {
  112. get { return _fileName; }
  113. set { _fileName = value; }
  114. }
  115. private string _province = "";
  116. /// <summary>
  117. ///计费省份
  118. /// </summary>
  119. [Property]
  120. public string province
  121. {
  122. get { return _province; }
  123. set { _province = value; }
  124. }
  125. private string _supplierName = "";
  126. /// <summary>
  127. ///供应商名称
  128. /// </summary>
  129. [Property]
  130. public string supplierName
  131. {
  132. get { return _supplierName; }
  133. set { _supplierName = value; }
  134. }
  135. private string _unusual = "";
  136. /// <summary>
  137. ///异常
  138. /// </summary>
  139. [Property]
  140. public string unusual
  141. {
  142. get { return _unusual; }
  143. set { _unusual = value; }
  144. }
  145. private string _explain = "";
  146. /// <summary>
  147. ///说明
  148. /// </summary>
  149. [Property]
  150. public string explain
  151. {
  152. get { return _explain; }
  153. set { _explain = value; }
  154. }
  155. /// <summary>
  156. ///导入日期
  157. /// </summary>
  158. [Property]
  159. public DateTime? importDate { get; set; }
  160. /// <summary>
  161. ///入账日期
  162. /// </summary>
  163. [Property]
  164. public DateTime? accountedDate { get; set; }
  165. private int _importUserId = 0;
  166. /// <summary>
  167. ///导入人员ID
  168. /// </summary>
  169. [Property]
  170. public int importUserId { get; set; }
  171. private int _shopId = 0;
  172. /// <summary>
  173. ///店铺ID
  174. /// </summary>
  175. [Property]
  176. public int shopId
  177. {
  178. get { return _shopId; }
  179. set { _shopId = value; }
  180. }
  181. private int _state = 0;
  182. /// <summary>
  183. ///状态
  184. /// </summary>
  185. [Property]
  186. public int state
  187. {
  188. get { return _state; }
  189. set { _state = value; }
  190. }
  191. /// <summary>
  192. ///完成日期
  193. /// </summary>
  194. [Property]
  195. public DateTime? finishDate { get; set; }
  196. public static void Del(object id)
  197. {
  198. StringBuilder sql = new StringBuilder();
  199. sql.AppendFormat("delete from CE_ErpZhangDan where id=" + id);
  200. ExecuteNonQuery(sql.ToString());
  201. }
  202. public static CeErpZhangDan GetById(int id)
  203. {
  204. return FindFirst(Expression.Eq("ID", id));
  205. }
  206. public static CeErpZhangDan GetBytid(string tid)
  207. {
  208. return FindFirst(Expression.Eq("tid", tid));
  209. }
  210. public object Clone()
  211. {
  212. return this.MemberwiseClone();
  213. }
  214. }
  215. }