GoodsRecallLog_info.cs 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Data;
  5. using SysBaseLibs;
  6. using System.Web.Script.Serialization;
  7. namespace SysDataLibs.TableClass
  8. {
  9. #region GoodsRecallLog
  10. public class GoodsRecallLog_info : ITableInfo
  11. {
  12. #region GoodsRecallLog表 字段信息
  13. /// <summary>
  14. /// 为关键字段: N ;
  15. /// 自动增长: N;
  16. /// 数据类型: varchar;
  17. /// 数据长度: 100;
  18. /// 是否允许为空: Y;
  19. /// 默认值: ;
  20. /// 描述: 执行人;
  21. /// </summary>
  22. public const string cExecutor = "Executor";
  23. /// <summary>
  24. /// 为关键字段: N ;
  25. /// 自动增长: N;
  26. /// 数据类型: varchar;
  27. /// 数据长度: 100;
  28. /// 是否允许为空: N;
  29. /// 默认值: ;
  30. /// 描述: 商品名称;
  31. /// </summary>
  32. public const string cGoodsName = "GoodsName";
  33. /// <summary>
  34. /// 为关键字段: Y --- PrimaryKey;
  35. /// 自动增长: Y;
  36. /// 数据类型: int;
  37. /// 数据长度: 4;
  38. /// 是否允许为空: N;
  39. /// 默认值: ;
  40. /// 描述: 编号;
  41. /// </summary>
  42. public const string cID = "ID";
  43. /// <summary>
  44. /// 为关键字段: N ;
  45. /// 自动增长: N;
  46. /// 数据类型: char;
  47. /// 数据长度: 10;
  48. /// 是否允许为空: N;
  49. /// 默认值: ;
  50. /// 描述: 市场编号;
  51. /// </summary>
  52. public const string cMarketID = "MarketID";
  53. /// <summary>
  54. /// 为关键字段: N ;
  55. /// 自动增长: N;
  56. /// 数据类型: varchar;
  57. /// 数据长度: 100;
  58. /// 是否允许为空: Y;
  59. /// 默认值: ;
  60. /// 描述: 规格类型;
  61. /// </summary>
  62. public const string cModelType = "ModelType";
  63. /// <summary>
  64. /// 为关键字段: N ;
  65. /// 自动增长: N;
  66. /// 数据类型: varchar;
  67. /// 数据长度: 100;
  68. /// 是否允许为空: Y;
  69. /// 默认值: ;
  70. /// 描述: 批号;
  71. /// </summary>
  72. public const string cProduceBatch = "ProduceBatch";
  73. /// <summary>
  74. /// 为关键字段: N ;
  75. /// 自动增长: N;
  76. /// 数据类型: varchar;
  77. /// 数据长度: 200;
  78. /// 是否允许为空: N;
  79. /// 默认值: ;
  80. /// 描述: 不合格原因;
  81. /// </summary>
  82. public const string cRecallReason = "RecallReason";
  83. /// <summary>
  84. /// 为关键字段: N ;
  85. /// 自动增长: N;
  86. /// 数据类型: varchar;
  87. /// 数据长度: 200;
  88. /// 是否允许为空: Y;
  89. /// 默认值: ;
  90. /// 描述: 处理方式及结果;
  91. /// </summary>
  92. public const string cResult = "Result";
  93. /// <summary>
  94. /// 为关键字段: N ;
  95. /// 自动增长: N;
  96. /// 数据类型: int;
  97. /// 数据长度: 4;
  98. /// 是否允许为空: Y;
  99. /// 默认值: ((0));
  100. /// 描述: 数量;
  101. /// </summary>
  102. public const string cSaleCount = "SaleCount";
  103. /// <summary>
  104. /// 为关键字段: N ;
  105. /// 自动增长: N;
  106. /// 数据类型: datetime;
  107. /// 数据长度: 8;
  108. /// 是否允许为空: Y;
  109. /// 默认值: ;
  110. /// 描述: 销售时间;
  111. /// </summary>
  112. public const string cSaleTime = "SaleTime";
  113. /// <summary>
  114. /// 为关键字段: N ;
  115. /// 自动增长: N;
  116. /// 数据类型: int;
  117. /// 数据长度: 4;
  118. /// 是否允许为空: N;
  119. /// 默认值: ;
  120. /// 描述: 摊户编号;
  121. /// </summary>
  122. public const string cSellerID = "SellerID";
  123. /// <summary>
  124. /// 为关键字段: N ;
  125. /// 自动增长: N;
  126. /// 数据类型: nvarchar;
  127. /// 数据长度: 400;
  128. /// 是否允许为空: Y;
  129. /// 默认值: ;
  130. /// 描述: 商品来源;
  131. /// </summary>
  132. public const string cSupplier = "Supplier";
  133. /// <summary>
  134. /// 为关键字段: N ;
  135. /// 自动增长: N;
  136. /// 数据类型: varchar;
  137. /// 数据长度: 100;
  138. /// 是否允许为空: Y;
  139. /// 默认值: ;
  140. /// 描述: 商标;
  141. /// </summary>
  142. public const string cTradeMark = "TradeMark";
  143. /// <summary>
  144. /// 为关键字段: N ;
  145. /// 自动增长: N;
  146. /// 数据类型: nvarchar;
  147. /// 数据长度: 10;
  148. /// 是否允许为空: Y;
  149. /// 默认值: ;
  150. /// 描述: 公斤、斤、吨、只、头;
  151. /// </summary>
  152. public const string cUnitID = "UnitID";
  153. /// <summary>
  154. /// 为关键字段: N ;
  155. /// 自动增长: N;
  156. /// 数据类型: datetime;
  157. /// 数据长度: 8;
  158. /// 是否允许为空: Y;
  159. /// 默认值: ;
  160. /// 描述: 更新时间;
  161. /// </summary>
  162. public const string cUpdateTime = "UpdateTime";
  163. /// <summary>
  164. /// 为关键字段: N ;
  165. /// 自动增长: N;
  166. /// 数据类型: varchar;
  167. /// 数据长度: 30;
  168. /// 是否允许为空: N;
  169. /// 默认值: ;
  170. /// 描述: 用户编号;
  171. /// </summary>
  172. public const string cUserID = "UserID";
  173. #endregion
  174. public GoodsRecallLog_info(){}
  175. public GoodsRecallLog_info(DataRow poRow)
  176. {
  177. CreateTableInfo(poRow);
  178. }
  179. public void CreateTableInfo(DataRow poRow)
  180. {
  181. _Executor=UtilStr.StrFromObj(poRow[cExecutor]);
  182. _GoodsName=UtilStr.StrFromObj(poRow[cGoodsName]);
  183. _ID=UtilStr.StrFromObj(poRow[cID]);
  184. _MarketID=UtilStr.StrFromObj(poRow[cMarketID]);
  185. _ModelType=UtilStr.StrFromObj(poRow[cModelType]);
  186. _ProduceBatch=UtilStr.StrFromObj(poRow[cProduceBatch]);
  187. _RecallReason=UtilStr.StrFromObj(poRow[cRecallReason]);
  188. _Result=UtilStr.StrFromObj(poRow[cResult]);
  189. _SaleCount=UtilStr.StrFromObj(poRow[cSaleCount]);
  190. _SaleTime=UtilStr.StrFromObj(poRow[cSaleTime]);
  191. _SellerID=UtilStr.StrFromObj(poRow[cSellerID]);
  192. _Supplier=UtilStr.StrFromObj(poRow[cSupplier]);
  193. _TradeMark=UtilStr.StrFromObj(poRow[cTradeMark]);
  194. _UnitID=UtilStr.StrFromObj(poRow[cUnitID]);
  195. _UpdateTime=UtilStr.StrFromObj(poRow[cUpdateTime]);
  196. _UserID=UtilStr.StrFromObj(poRow[cUserID]);
  197. }
  198. public GoodsRecallLog_info( string pcID, DBConnSql poDBConn)
  199. {
  200. if ( pcID.Trim().Length > 0 && poDBConn != null)
  201. {
  202. string lcSql = "select * from " + Tn.GoodsRecallLog + " where ID='"+pcID+"'";
  203. rsQuery loQuery = poDBConn.OpenQuery(lcSql);
  204. if (loQuery != null && loQuery.IsOpened && loQuery.RecCount == 1)
  205. {
  206. loQuery.MoveFirst();
  207. CreateTableInfo(loQuery.CurrentRow);
  208. }
  209. }
  210. }
  211. private string _Executor="";
  212. public string Executor
  213. {
  214. get { return _Executor; }
  215. set { _Executor = value; }
  216. }
  217. private string _GoodsName="";
  218. public string GoodsName
  219. {
  220. get { return _GoodsName; }
  221. set { _GoodsName = value; }
  222. }
  223. private string _ID="";
  224. public string ID
  225. {
  226. get { return _ID; }
  227. set { _ID = value; }
  228. }
  229. private string _MarketID="";
  230. public string MarketID
  231. {
  232. get { return _MarketID; }
  233. set { _MarketID = value; }
  234. }
  235. private string _ModelType="";
  236. public string ModelType
  237. {
  238. get { return _ModelType; }
  239. set { _ModelType = value; }
  240. }
  241. private string _ProduceBatch="";
  242. public string ProduceBatch
  243. {
  244. get { return _ProduceBatch; }
  245. set { _ProduceBatch = value; }
  246. }
  247. private string _RecallReason="";
  248. public string RecallReason
  249. {
  250. get { return _RecallReason; }
  251. set { _RecallReason = value; }
  252. }
  253. private string _Result="";
  254. public string Result
  255. {
  256. get { return _Result; }
  257. set { _Result = value; }
  258. }
  259. private string _SaleCount="";
  260. public string SaleCount
  261. {
  262. get { return _SaleCount; }
  263. set { _SaleCount = value; }
  264. }
  265. private string _SaleTime="";
  266. public string SaleTime
  267. {
  268. get { return _SaleTime; }
  269. set { _SaleTime = value; }
  270. }
  271. private string _SellerID="";
  272. public string SellerID
  273. {
  274. get { return _SellerID; }
  275. set { _SellerID = value; }
  276. }
  277. private string _Supplier="";
  278. public string Supplier
  279. {
  280. get { return _Supplier; }
  281. set { _Supplier = value; }
  282. }
  283. private string _TradeMark="";
  284. public string TradeMark
  285. {
  286. get { return _TradeMark; }
  287. set { _TradeMark = value; }
  288. }
  289. private string _UnitID="";
  290. public string UnitID
  291. {
  292. get { return _UnitID; }
  293. set { _UnitID = value; }
  294. }
  295. private string _UpdateTime="";
  296. public string UpdateTime
  297. {
  298. get { return _UpdateTime; }
  299. set { _UpdateTime = value; }
  300. }
  301. private string _UserID="";
  302. public string UserID
  303. {
  304. get { return _UserID; }
  305. set { _UserID = value; }
  306. }
  307. [ScriptIgnore]
  308. public rsXmlNode DataXMLNode
  309. {
  310. get
  311. {
  312. rsXmlNode loMainNode = new rsXmlNode("GoodsRecallLogRecord", "");
  313. rsXmlNode loNode =null;
  314. loNode = new rsXmlNode(cExecutor, Executor);
  315. loMainNode.AddChild(loNode);
  316. loNode = new rsXmlNode(cGoodsName, GoodsName);
  317. loMainNode.AddChild(loNode);
  318. loNode = new rsXmlNode(cID, ID);
  319. loMainNode.AddChild(loNode);
  320. loNode = new rsXmlNode(cMarketID, MarketID);
  321. loMainNode.AddChild(loNode);
  322. loNode = new rsXmlNode(cModelType, ModelType);
  323. loMainNode.AddChild(loNode);
  324. loNode = new rsXmlNode(cProduceBatch, ProduceBatch);
  325. loMainNode.AddChild(loNode);
  326. loNode = new rsXmlNode(cRecallReason, RecallReason);
  327. loMainNode.AddChild(loNode);
  328. loNode = new rsXmlNode(cResult, Result);
  329. loMainNode.AddChild(loNode);
  330. loNode = new rsXmlNode(cSaleCount, SaleCount);
  331. loMainNode.AddChild(loNode);
  332. loNode = new rsXmlNode(cSaleTime, SaleTime);
  333. loMainNode.AddChild(loNode);
  334. loNode = new rsXmlNode(cSellerID, SellerID);
  335. loMainNode.AddChild(loNode);
  336. loNode = new rsXmlNode(cSupplier, Supplier);
  337. loMainNode.AddChild(loNode);
  338. loNode = new rsXmlNode(cTradeMark, TradeMark);
  339. loMainNode.AddChild(loNode);
  340. loNode = new rsXmlNode(cUnitID, UnitID);
  341. loMainNode.AddChild(loNode);
  342. loNode = new rsXmlNode(cUpdateTime, UpdateTime);
  343. loMainNode.AddChild(loNode);
  344. loNode = new rsXmlNode(cUserID, UserID);
  345. loMainNode.AddChild(loNode);
  346. return loMainNode ;
  347. }
  348. }
  349. public string InsertSql()
  350. {
  351. return " insert into "+Tn.GoodsRecallLog+" "+
  352. " ("+cExecutor+","+cGoodsName+","+cMarketID+","+cModelType+","+cProduceBatch+","+cRecallReason+","+cResult+","+cSaleCount+","+cSaleTime+","+cSellerID+","+cSupplier+","+cTradeMark+","+cUnitID+","+cUpdateTime+","+cUserID+") "+
  353. " values ('"+_Executor+"','"+_GoodsName+"','"+_MarketID+"','"+_ModelType+"','"+_ProduceBatch+"','"+_RecallReason+"','"+_Result+"',"+_SaleCount+",'"+_SaleTime+"',"+_SellerID+",'"+_Supplier+"','"+_TradeMark+"','"+_UnitID+"','"+_UpdateTime+"','"+_UserID+"') " ;
  354. }
  355. public string UpdateSql()
  356. {
  357. return " update "+Tn.GoodsRecallLog+" "+
  358. " set "+cExecutor+"='"+_Executor+"',"+cGoodsName+"='"+_GoodsName+"',"+cMarketID+"='"+_MarketID+"',"+cModelType+"='"+_ModelType+"',"+cProduceBatch+"='"+_ProduceBatch+"',"+cRecallReason+"='"+_RecallReason+"',"+cResult+"='"+_Result+"',"+cSaleCount+"="+_SaleCount+","+cSaleTime+"='"+_SaleTime+"',"+cSellerID+"="+_SellerID+","+cSupplier+"='"+_Supplier+"',"+cTradeMark+"='"+_TradeMark+"',"+cUnitID+"='"+_UnitID+"',"+cUpdateTime+"='"+_UpdateTime+"',"+cUserID+"='"+_UserID+"' "+
  359. " where "+cID+"="+_ID+"" ;
  360. }
  361. public string DeleteSql()
  362. {
  363. return "Delete "+Tn.GoodsRecallLog+" where "+cID+"="+_ID+"" ;
  364. }
  365. }
  366. #endregion
  367. #region
  368. public class GoodsRecallLog_Qry : rsQuery
  369. {
  370. public String Executor
  371. {
  372. get { return GetString(GoodsRecallLog_info.cExecutor); }
  373. // set { SetField(GoodsRecallLog_info.cExecutor, value); }
  374. }
  375. public String GoodsName
  376. {
  377. get { return GetString(GoodsRecallLog_info.cGoodsName); }
  378. // set { SetField(GoodsRecallLog_info.cGoodsName, value); }
  379. }
  380. public Int64 ID
  381. {
  382. get { return GetInt(GoodsRecallLog_info.cID); }
  383. // set { SetField(GoodsRecallLog_info.cID, value); }
  384. }
  385. public String MarketID
  386. {
  387. get { return GetString(GoodsRecallLog_info.cMarketID); }
  388. // set { SetField(GoodsRecallLog_info.cMarketID, value); }
  389. }
  390. public String ModelType
  391. {
  392. get { return GetString(GoodsRecallLog_info.cModelType); }
  393. // set { SetField(GoodsRecallLog_info.cModelType, value); }
  394. }
  395. public String ProduceBatch
  396. {
  397. get { return GetString(GoodsRecallLog_info.cProduceBatch); }
  398. // set { SetField(GoodsRecallLog_info.cProduceBatch, value); }
  399. }
  400. public String RecallReason
  401. {
  402. get { return GetString(GoodsRecallLog_info.cRecallReason); }
  403. // set { SetField(GoodsRecallLog_info.cRecallReason, value); }
  404. }
  405. public String Result
  406. {
  407. get { return GetString(GoodsRecallLog_info.cResult); }
  408. // set { SetField(GoodsRecallLog_info.cResult, value); }
  409. }
  410. public Int64 SaleCount
  411. {
  412. get { return GetInt(GoodsRecallLog_info.cSaleCount); }
  413. // set { SetField(GoodsRecallLog_info.cSaleCount, value); }
  414. }
  415. public DateTime SaleTime
  416. {
  417. get { return GetDateTime(GoodsRecallLog_info.cSaleTime); }
  418. // set { SetField(GoodsRecallLog_info.cSaleTime, value); }
  419. }
  420. public Int64 SellerID
  421. {
  422. get { return GetInt(GoodsRecallLog_info.cSellerID); }
  423. // set { SetField(GoodsRecallLog_info.cSellerID, value); }
  424. }
  425. public String Supplier
  426. {
  427. get { return GetString(GoodsRecallLog_info.cSupplier); }
  428. // set { SetField(GoodsRecallLog_info.cSupplier, value); }
  429. }
  430. public String TradeMark
  431. {
  432. get { return GetString(GoodsRecallLog_info.cTradeMark); }
  433. // set { SetField(GoodsRecallLog_info.cTradeMark, value); }
  434. }
  435. public String UnitID
  436. {
  437. get { return GetString(GoodsRecallLog_info.cUnitID); }
  438. // set { SetField(GoodsRecallLog_info.cUnitID, value); }
  439. }
  440. public DateTime UpdateTime
  441. {
  442. get { return GetDateTime(GoodsRecallLog_info.cUpdateTime); }
  443. // set { SetField(GoodsRecallLog_info.cUpdateTime, value); }
  444. }
  445. public String UserID
  446. {
  447. get { return GetString(GoodsRecallLog_info.cUserID); }
  448. // set { SetField(GoodsRecallLog_info.cUserID, value); }
  449. }
  450. }
  451. #endregion
  452. }