SaleDestLog_info.cs 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  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 SaleDestLog
  10. public class SaleDestLog_info : ITableInfo
  11. {
  12. #region SaleDestLog表 字段信息
  13. /// <summary>
  14. /// 为关键字段: N ;
  15. /// 自动增长: N;
  16. /// 数据类型: varchar;
  17. /// 数据长度: 200;
  18. /// 是否允许为空: N;
  19. /// 默认值: ;
  20. /// 描述: 销售去向;
  21. /// </summary>
  22. public const string cDestination = "Destination";
  23. /// <summary>
  24. /// 为关键字段: N ;
  25. /// 自动增长: N;
  26. /// 数据类型: varchar;
  27. /// 数据长度: 100;
  28. /// 是否允许为空: Y;
  29. /// 默认值: ;
  30. /// 描述: 记录人;
  31. /// </summary>
  32. public const string cExecutor = "Executor";
  33. /// <summary>
  34. /// 为关键字段: N ;
  35. /// 自动增长: N;
  36. /// 数据类型: varchar;
  37. /// 数据长度: 100;
  38. /// 是否允许为空: N;
  39. /// 默认值: ;
  40. /// 描述: 商品名称;
  41. /// </summary>
  42. public const string cGoodsName = "GoodsName";
  43. /// <summary>
  44. /// 为关键字段: Y --- PrimaryKey;
  45. /// 自动增长: Y;
  46. /// 数据类型: int;
  47. /// 数据长度: 4;
  48. /// 是否允许为空: N;
  49. /// 默认值: ;
  50. /// 描述: 编号;
  51. /// </summary>
  52. public const string cID = "ID";
  53. /// <summary>
  54. /// 为关键字段: N ;
  55. /// 自动增长: N;
  56. /// 数据类型: char;
  57. /// 数据长度: 10;
  58. /// 是否允许为空: N;
  59. /// 默认值: ;
  60. /// 描述: 市场编号;
  61. /// </summary>
  62. public const string cMarketID = "MarketID";
  63. /// <summary>
  64. /// 为关键字段: N ;
  65. /// 自动增长: N;
  66. /// 数据类型: varchar;
  67. /// 数据长度: 100;
  68. /// 是否允许为空: Y;
  69. /// 默认值: ;
  70. /// 描述: 规格类型;
  71. /// </summary>
  72. public const string cModelType = "ModelType";
  73. /// <summary>
  74. /// 为关键字段: N ;
  75. /// 自动增长: N;
  76. /// 数据类型: varchar;
  77. /// 数据长度: 200;
  78. /// 是否允许为空: Y;
  79. /// 默认值: ;
  80. /// 描述: 备注;
  81. /// </summary>
  82. public const string cNotes = "Notes";
  83. /// <summary>
  84. /// 为关键字段: N ;
  85. /// 自动增长: N;
  86. /// 数据类型: varchar;
  87. /// 数据长度: 100;
  88. /// 是否允许为空: Y;
  89. /// 默认值: ;
  90. /// 描述: 生产批号;
  91. /// </summary>
  92. public const string cProduceBatch = "ProduceBatch";
  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. /// 数据类型: datetime;
  127. /// 数据长度: 8;
  128. /// 是否允许为空: Y;
  129. /// 默认值: ;
  130. /// 描述: 进货时间;
  131. /// </summary>
  132. public const string cStockTime = "StockTime";
  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. /// 数据类型: datetime;
  147. /// 数据长度: 8;
  148. /// 是否允许为空: Y;
  149. /// 默认值: ;
  150. /// 描述: 更新时间;
  151. /// </summary>
  152. public const string cUpdateTime = "UpdateTime";
  153. /// <summary>
  154. /// 为关键字段: N ;
  155. /// 自动增长: N;
  156. /// 数据类型: varchar;
  157. /// 数据长度: 30;
  158. /// 是否允许为空: N;
  159. /// 默认值: ;
  160. /// 描述: 用户编号;
  161. /// </summary>
  162. public const string cUserID = "UserID";
  163. #endregion
  164. public SaleDestLog_info(){}
  165. public SaleDestLog_info(DataRow poRow)
  166. {
  167. CreateTableInfo(poRow);
  168. }
  169. public void CreateTableInfo(DataRow poRow)
  170. {
  171. _Destination=UtilStr.StrFromObj(poRow[cDestination]);
  172. _Executor=UtilStr.StrFromObj(poRow[cExecutor]);
  173. _GoodsName=UtilStr.StrFromObj(poRow[cGoodsName]);
  174. _ID=UtilStr.StrFromObj(poRow[cID]);
  175. _MarketID=UtilStr.StrFromObj(poRow[cMarketID]);
  176. _ModelType=UtilStr.StrFromObj(poRow[cModelType]);
  177. _Notes=UtilStr.StrFromObj(poRow[cNotes]);
  178. _ProduceBatch=UtilStr.StrFromObj(poRow[cProduceBatch]);
  179. _SaleCount=UtilStr.StrFromObj(poRow[cSaleCount]);
  180. _SaleTime=UtilStr.StrFromObj(poRow[cSaleTime]);
  181. _SellerID=UtilStr.StrFromObj(poRow[cSellerID]);
  182. _StockTime=UtilStr.StrFromObj(poRow[cStockTime]);
  183. _TradeMark=UtilStr.StrFromObj(poRow[cTradeMark]);
  184. _UpdateTime=UtilStr.StrFromObj(poRow[cUpdateTime]);
  185. _UserID=UtilStr.StrFromObj(poRow[cUserID]);
  186. }
  187. public SaleDestLog_info( string pcID, DBConnSql poDBConn)
  188. {
  189. if ( pcID.Trim().Length > 0 && poDBConn != null)
  190. {
  191. string lcSql = "select * from " + Tn.SaleDestLog + " where ID='"+pcID+"'";
  192. rsQuery loQuery = poDBConn.OpenQuery(lcSql);
  193. if (loQuery != null && loQuery.IsOpened && loQuery.RecCount == 1)
  194. {
  195. loQuery.MoveFirst();
  196. CreateTableInfo(loQuery.CurrentRow);
  197. }
  198. }
  199. }
  200. private string _Destination="";
  201. public string Destination
  202. {
  203. get { return _Destination; }
  204. set { _Destination = value; }
  205. }
  206. private string _Executor="";
  207. public string Executor
  208. {
  209. get { return _Executor; }
  210. set { _Executor = value; }
  211. }
  212. private string _GoodsName="";
  213. public string GoodsName
  214. {
  215. get { return _GoodsName; }
  216. set { _GoodsName = value; }
  217. }
  218. private string _ID="";
  219. public string ID
  220. {
  221. get { return _ID; }
  222. set { _ID = value; }
  223. }
  224. private string _MarketID="";
  225. public string MarketID
  226. {
  227. get { return _MarketID; }
  228. set { _MarketID = value; }
  229. }
  230. private string _ModelType="";
  231. public string ModelType
  232. {
  233. get { return _ModelType; }
  234. set { _ModelType = value; }
  235. }
  236. private string _Notes="";
  237. public string Notes
  238. {
  239. get { return _Notes; }
  240. set { _Notes = value; }
  241. }
  242. private string _ProduceBatch="";
  243. public string ProduceBatch
  244. {
  245. get { return _ProduceBatch; }
  246. set { _ProduceBatch = value; }
  247. }
  248. private string _SaleCount="";
  249. public string SaleCount
  250. {
  251. get { return _SaleCount; }
  252. set { _SaleCount = value; }
  253. }
  254. private string _SaleTime="";
  255. public string SaleTime
  256. {
  257. get { return _SaleTime; }
  258. set { _SaleTime = value; }
  259. }
  260. private string _SellerID="";
  261. public string SellerID
  262. {
  263. get { return _SellerID; }
  264. set { _SellerID = value; }
  265. }
  266. private string _StockTime="";
  267. public string StockTime
  268. {
  269. get { return _StockTime; }
  270. set { _StockTime = value; }
  271. }
  272. private string _TradeMark="";
  273. public string TradeMark
  274. {
  275. get { return _TradeMark; }
  276. set { _TradeMark = value; }
  277. }
  278. private string _UpdateTime="";
  279. public string UpdateTime
  280. {
  281. get { return _UpdateTime; }
  282. set { _UpdateTime = value; }
  283. }
  284. private string _UserID="";
  285. public string UserID
  286. {
  287. get { return _UserID; }
  288. set { _UserID = value; }
  289. }
  290. [ScriptIgnore]
  291. public rsXmlNode DataXMLNode
  292. {
  293. get
  294. {
  295. rsXmlNode loMainNode = new rsXmlNode("SaleDestLogRecord", "");
  296. rsXmlNode loNode =null;
  297. loNode = new rsXmlNode(cDestination, Destination);
  298. loMainNode.AddChild(loNode);
  299. loNode = new rsXmlNode(cExecutor, Executor);
  300. loMainNode.AddChild(loNode);
  301. loNode = new rsXmlNode(cGoodsName, GoodsName);
  302. loMainNode.AddChild(loNode);
  303. loNode = new rsXmlNode(cID, ID);
  304. loMainNode.AddChild(loNode);
  305. loNode = new rsXmlNode(cMarketID, MarketID);
  306. loMainNode.AddChild(loNode);
  307. loNode = new rsXmlNode(cModelType, ModelType);
  308. loMainNode.AddChild(loNode);
  309. loNode = new rsXmlNode(cNotes, Notes);
  310. loMainNode.AddChild(loNode);
  311. loNode = new rsXmlNode(cProduceBatch, ProduceBatch);
  312. loMainNode.AddChild(loNode);
  313. loNode = new rsXmlNode(cSaleCount, SaleCount);
  314. loMainNode.AddChild(loNode);
  315. loNode = new rsXmlNode(cSaleTime, SaleTime);
  316. loMainNode.AddChild(loNode);
  317. loNode = new rsXmlNode(cSellerID, SellerID);
  318. loMainNode.AddChild(loNode);
  319. loNode = new rsXmlNode(cStockTime, StockTime);
  320. loMainNode.AddChild(loNode);
  321. loNode = new rsXmlNode(cTradeMark, TradeMark);
  322. loMainNode.AddChild(loNode);
  323. loNode = new rsXmlNode(cUpdateTime, UpdateTime);
  324. loMainNode.AddChild(loNode);
  325. loNode = new rsXmlNode(cUserID, UserID);
  326. loMainNode.AddChild(loNode);
  327. return loMainNode ;
  328. }
  329. }
  330. public string InsertSql()
  331. {
  332. return " insert into "+Tn.SaleDestLog+" "+
  333. " ("+cDestination+","+cExecutor+","+cGoodsName+","+cMarketID+","+cModelType+","+cNotes+","+cProduceBatch+","+cSaleCount+","+cSaleTime+","+cSellerID+","+cStockTime+","+cTradeMark+","+cUpdateTime+","+cUserID+") "+
  334. " values ('"+_Destination+"','"+_Executor+"','"+_GoodsName+"','"+_MarketID+"','"+_ModelType+"','"+_Notes+"','"+_ProduceBatch+"',"+_SaleCount+",'"+_SaleTime+"',"+_SellerID+",'"+_StockTime+"','"+_TradeMark+"','"+_UpdateTime+"','"+_UserID+"') " ;
  335. }
  336. public string UpdateSql()
  337. {
  338. return " update "+Tn.SaleDestLog+" "+
  339. " set "+cDestination+"='"+_Destination+"',"+cExecutor+"='"+_Executor+"',"+cGoodsName+"='"+_GoodsName+"',"+cMarketID+"='"+_MarketID+"',"+cModelType+"='"+_ModelType+"',"+cNotes+"='"+_Notes+"',"+cProduceBatch+"='"+_ProduceBatch+"',"+cSaleCount+"="+_SaleCount+","+cSaleTime+"='"+_SaleTime+"',"+cSellerID+"="+_SellerID+","+cStockTime+"='"+_StockTime+"',"+cTradeMark+"='"+_TradeMark+"',"+cUpdateTime+"='"+_UpdateTime+"',"+cUserID+"='"+_UserID+"' "+
  340. " where "+cID+"="+_ID+"" ;
  341. }
  342. public string DeleteSql()
  343. {
  344. return "Delete "+Tn.SaleDestLog+" where "+cID+"="+_ID+"" ;
  345. }
  346. }
  347. #endregion
  348. #region
  349. public class SaleDestLog_Qry : rsQuery
  350. {
  351. public String Destination
  352. {
  353. get { return GetString(SaleDestLog_info.cDestination); }
  354. // set { SetField(SaleDestLog_info.cDestination, value); }
  355. }
  356. public String Executor
  357. {
  358. get { return GetString(SaleDestLog_info.cExecutor); }
  359. // set { SetField(SaleDestLog_info.cExecutor, value); }
  360. }
  361. public String GoodsName
  362. {
  363. get { return GetString(SaleDestLog_info.cGoodsName); }
  364. // set { SetField(SaleDestLog_info.cGoodsName, value); }
  365. }
  366. public Int64 ID
  367. {
  368. get { return GetInt(SaleDestLog_info.cID); }
  369. // set { SetField(SaleDestLog_info.cID, value); }
  370. }
  371. public String MarketID
  372. {
  373. get { return GetString(SaleDestLog_info.cMarketID); }
  374. // set { SetField(SaleDestLog_info.cMarketID, value); }
  375. }
  376. public String ModelType
  377. {
  378. get { return GetString(SaleDestLog_info.cModelType); }
  379. // set { SetField(SaleDestLog_info.cModelType, value); }
  380. }
  381. public String Notes
  382. {
  383. get { return GetString(SaleDestLog_info.cNotes); }
  384. // set { SetField(SaleDestLog_info.cNotes, value); }
  385. }
  386. public String ProduceBatch
  387. {
  388. get { return GetString(SaleDestLog_info.cProduceBatch); }
  389. // set { SetField(SaleDestLog_info.cProduceBatch, value); }
  390. }
  391. public Int64 SaleCount
  392. {
  393. get { return GetInt(SaleDestLog_info.cSaleCount); }
  394. // set { SetField(SaleDestLog_info.cSaleCount, value); }
  395. }
  396. public DateTime SaleTime
  397. {
  398. get { return GetDateTime(SaleDestLog_info.cSaleTime); }
  399. // set { SetField(SaleDestLog_info.cSaleTime, value); }
  400. }
  401. public Int64 SellerID
  402. {
  403. get { return GetInt(SaleDestLog_info.cSellerID); }
  404. // set { SetField(SaleDestLog_info.cSellerID, value); }
  405. }
  406. public DateTime StockTime
  407. {
  408. get { return GetDateTime(SaleDestLog_info.cStockTime); }
  409. // set { SetField(SaleDestLog_info.cStockTime, value); }
  410. }
  411. public String TradeMark
  412. {
  413. get { return GetString(SaleDestLog_info.cTradeMark); }
  414. // set { SetField(SaleDestLog_info.cTradeMark, value); }
  415. }
  416. public DateTime UpdateTime
  417. {
  418. get { return GetDateTime(SaleDestLog_info.cUpdateTime); }
  419. // set { SetField(SaleDestLog_info.cUpdateTime, value); }
  420. }
  421. public String UserID
  422. {
  423. get { return GetString(SaleDestLog_info.cUserID); }
  424. // set { SetField(SaleDestLog_info.cUserID, value); }
  425. }
  426. }
  427. #endregion
  428. }