CeErpNoticeCell.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. using Castle.ActiveRecord;
  2. using System;
  3. using System.Text;
  4. namespace BizCom
  5. {
  6. [ActiveRecord("CE_ErpNoticeCell")]
  7. public class CeErpNoticeCell : ComBase<CeErpNoticeCell>
  8. {
  9. /// <summary>
  10. ///
  11. /// </summary>
  12. [PrimaryKey(PrimaryKeyType.Native)]
  13. public int ID { get; set; }
  14. private int _nid = 0;
  15. /// <summary>
  16. ///
  17. /// </summary>
  18. [Property]
  19. public int nid
  20. {
  21. get { return _nid; }
  22. set { _nid = value; }
  23. }
  24. private int _isRead = 0;
  25. /// <summary>
  26. ///
  27. /// </summary>
  28. [Property]
  29. public int IsRead
  30. {
  31. get { return _isRead; }
  32. set { _isRead = value; }
  33. }
  34. /// <summary>
  35. ///
  36. /// </summary>
  37. [Property]
  38. public DateTime? ReadTime { get; set; }
  39. private int _uid = 0;
  40. /// <summary>
  41. ///
  42. /// </summary>
  43. [Property]
  44. public int uid
  45. {
  46. get { return _uid; }
  47. set { _uid = value; }
  48. }
  49. public static void DelByNid(object id)
  50. {
  51. StringBuilder sql = new StringBuilder();
  52. sql.AppendFormat("delete from CE_ErpNoticeCell where nid=" + id);
  53. ExecuteNonQuery(sql.ToString());
  54. }
  55. public static void Del(object id)
  56. {
  57. StringBuilder sql = new StringBuilder();
  58. sql.AppendFormat("delete from CE_ErpNoticeCell where id=" + id);
  59. ExecuteNonQuery(sql.ToString());
  60. }
  61. }
  62. }