SupplierLog.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using Castle.ActiveRecord;
  2. using System;
  3. using System.Text;
  4. namespace BizCom
  5. {
  6. [ActiveRecord("SupplierLog")]
  7. public class SupplierLog : ComBase<SupplierLog>
  8. {
  9. /// <summary>
  10. ///
  11. /// </summary>
  12. [PrimaryKey(PrimaryKeyType.Native)]
  13. public int ID { get; set; }
  14. private int _userID = 0;
  15. /// <summary>
  16. ///用户id
  17. /// </summary>
  18. [Property]
  19. public int UserID
  20. {
  21. get { return _userID; }
  22. set { _userID = value; }
  23. }
  24. private string _userName = "";
  25. /// <summary>
  26. ///用户名称
  27. /// </summary>
  28. [Property]
  29. public string UserName
  30. {
  31. get { return _userName; }
  32. set { _userName = value; }
  33. }
  34. private string _oldContent = "";
  35. /// <summary>
  36. ///修改前内容
  37. /// </summary>
  38. [Property]
  39. public string OldContent
  40. {
  41. get { return _oldContent; }
  42. set { _oldContent = value; }
  43. }
  44. private string _newContent = "";
  45. /// <summary>
  46. ///修改后内容
  47. /// </summary>
  48. [Property]
  49. public string NewContent
  50. {
  51. get { return _newContent; }
  52. set { _newContent = value; }
  53. }
  54. /// <summary>
  55. ///修改时间
  56. /// </summary>
  57. [Property]
  58. public DateTime? ModifyTime { get; set; }
  59. public static void Del(object id)
  60. {
  61. StringBuilder sql = new StringBuilder();
  62. sql.AppendFormat("delete from SupplierLog where id=" + id);
  63. ExecuteNonQuery(sql.ToString());
  64. }
  65. }
  66. }