PageRenderTime 37ms CodeModel.GetById 21ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 0ms

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