/pigeoncms/App_Code/items/PigeonCms.RoomItem/RoomItem.cs

http://pigeoncms.googlecode.com/ · C# · 113 lines · 100 code · 13 blank · 0 comment · 0 complexity · 67a71824d766f65634df4e12653da5b3 MD5 · raw file

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Web;
  5. using System.Web.Security;
  6. using System.Web.UI;
  7. using System.Web.UI.WebControls;
  8. using System.Web.UI.WebControls.WebParts;
  9. using System.Web.UI.HtmlControls;
  10. using System.Diagnostics;
  11. using System.ComponentModel;
  12. using System.IO;
  13. using PigeonCms;
  14. using System.Collections.Generic;
  15. using System.Threading;
  16. namespace PigeonCms
  17. {
  18. public class RoomItem: Item
  19. {
  20. [ItemFieldMapAttribute(ItemFieldMapAttribute.CustomFields.CustomBool1)]
  21. public bool ShowImages
  22. {
  23. [DebuggerStepThrough()]
  24. get { return base.CustomBool1; }
  25. [DebuggerStepThrough()]
  26. set { base.CustomBool1 = value; }
  27. }
  28. [ItemFieldMapAttribute(ItemFieldMapAttribute.CustomFields.CustomDecimal1)]
  29. public decimal Price
  30. {
  31. [DebuggerStepThrough()]
  32. get { return base.CustomDecimal1; }
  33. [DebuggerStepThrough()]
  34. set { base.CustomDecimal1 = value; }
  35. }
  36. [ItemFieldMapAttribute(ItemFieldMapAttribute.CustomFields.CustomDecimal2)]
  37. public decimal AdvanceValue
  38. {
  39. [DebuggerStepThrough()]
  40. get { return base.CustomDecimal2; }
  41. [DebuggerStepThrough()]
  42. set { base.CustomDecimal2 = value; }
  43. }
  44. [ItemFieldMapAttribute(ItemFieldMapAttribute.CustomFields.CustomInt1)]
  45. public int Beds
  46. {
  47. [DebuggerStepThrough()]
  48. get { return base.CustomInt1; }
  49. [DebuggerStepThrough()]
  50. set { base.CustomInt1 = value; }
  51. }
  52. [ItemFieldMapAttribute(ItemFieldMapAttribute.CustomFields.CustomInt2)]
  53. public int RoomType
  54. {
  55. [DebuggerStepThrough()]
  56. get { return base.CustomInt2; }
  57. [DebuggerStepThrough()]
  58. set { base.CustomInt2 = value; }
  59. }
  60. [ItemFieldMapAttribute(ItemFieldMapAttribute.CustomFields.CustomInt3)]
  61. public int AdvanceType
  62. {
  63. [DebuggerStepThrough()]
  64. get { return base.CustomInt3; }
  65. [DebuggerStepThrough()]
  66. set { base.CustomInt3 = value; }
  67. }
  68. [ItemFieldMapAttribute(ItemFieldMapAttribute.CustomFields.CustomDate1)]
  69. public DateTime LastReservation
  70. {
  71. [DebuggerStepThrough()]
  72. get { return base.CustomDate1; }
  73. [DebuggerStepThrough()]
  74. set { base.CustomDate1 = value; }
  75. }
  76. public RoomItem() { }
  77. }
  78. [Serializable]
  79. public class RoomItemFilter: ItemsFilter
  80. {
  81. public int Beds
  82. {
  83. [DebuggerStepThrough()]
  84. get { return base.CustomInt1; }
  85. [DebuggerStepThrough()]
  86. set { base.CustomInt1 = value; }
  87. }
  88. }
  89. public class RoomItemsManager : ItemsManager<RoomItem, RoomItemFilter>
  90. {
  91. public RoomItemsManager(bool checkUserContext)
  92. : base(checkUserContext, false)
  93. { }
  94. public override List<RoomItem> GetByFilter(RoomItemFilter filter, string sort)
  95. {
  96. filter.ItemType = "PigeonCms.RoomItem";
  97. return base.GetByFilter(filter, sort);
  98. }
  99. }
  100. }