CeErpTradeCellFile.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. using BizCom.Enum;
  2. using Castle.ActiveRecord;
  3. using NHibernate.Criterion;
  4. using System;
  5. using System.Text;
  6. namespace BizCom
  7. {
  8. [ActiveRecord("CE_ErpTradeCellFile")]
  9. public class CeErpTradeCellFile : ComBase<CeErpTradeCellFile>
  10. {
  11. /// <summary>
  12. ///
  13. /// </summary>
  14. [PrimaryKey(PrimaryKeyType.Native)]
  15. public int ID { get; set; }
  16. private string _tid = "";
  17. [Property]
  18. public string tid
  19. {
  20. get { return _tid; }
  21. set { _tid = value; }
  22. }
  23. private string _ctid = "";
  24. [Property]
  25. public string ctid
  26. {
  27. get { return _ctid; }
  28. set { _ctid = value; }
  29. }
  30. private bool _isDel = false;
  31. /// <summary>
  32. /// ÊÇ·ñɾ³ý
  33. /// </summary>
  34. [Property]
  35. public bool isDel
  36. {
  37. get { return _isDel; }
  38. set { _isDel = value; }
  39. }
  40. private string _url = "";
  41. /// <summary>
  42. /// µØÖ·
  43. /// </summary>
  44. [Property]
  45. public string url
  46. {
  47. get { return _url; }
  48. set { _url = value; }
  49. }
  50. private DateTime _createtime;
  51. [Property]
  52. public DateTime createtime
  53. {
  54. get { return _createtime; }
  55. set { _createtime = value; }
  56. }
  57. private string _type;
  58. /// <summary>
  59. /// ÀàÐÍ
  60. /// </summary>
  61. [Property]
  62. public string type
  63. {
  64. get { return _type; }
  65. set { _type = value; }
  66. }
  67. public CeErpTradeCellFile() { }
  68. public CeErpTradeCellFile(string tid, string ctid, string url, string type)
  69. {
  70. _tid = tid;
  71. _ctid = ctid;
  72. _url = url;
  73. _type = type;
  74. _createtime = DateTime.Now;
  75. }
  76. public static void delByCtid(string tid, string ctid, string type)
  77. {
  78. StringBuilder sql = new StringBuilder();
  79. sql.AppendFormat("update CE_ErpTradeCellFile set isDel=1 where tid='{0}' and ctid='{1}' and type='{2}';", tid, ctid, type);
  80. ExecuteNonQuery(sql.ToString());
  81. }
  82. public static void delByID(string ID)
  83. {
  84. StringBuilder sql = new StringBuilder();
  85. sql.AppendFormat("update CE_ErpTradeCellFile set isDel=1 where ID='{0}';", ID);
  86. ExecuteNonQuery(sql.ToString());
  87. }
  88. }
  89. }