/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
- using System;
- using System.Data;
- using System.Configuration;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- using System.Diagnostics;
- using System.ComponentModel;
- using System.IO;
- using PigeonCms;
- using System.Collections.Generic;
- using System.Threading;
-
-
-
- namespace PigeonCms
- {
- public class RoomItem: Item
- {
- [ItemFieldMapAttribute(ItemFieldMapAttribute.CustomFields.CustomBool1)]
- public bool ShowImages
- {
- [DebuggerStepThrough()]
- get { return base.CustomBool1; }
- [DebuggerStepThrough()]
- set { base.CustomBool1 = value; }
- }
-
- [ItemFieldMapAttribute(ItemFieldMapAttribute.CustomFields.CustomDecimal1)]
- public decimal Price
- {
- [DebuggerStepThrough()]
- get { return base.CustomDecimal1; }
- [DebuggerStepThrough()]
- set { base.CustomDecimal1 = value; }
- }
-
- [ItemFieldMapAttribute(ItemFieldMapAttribute.CustomFields.CustomDecimal2)]
- public decimal AdvanceValue
- {
- [DebuggerStepThrough()]
- get { return base.CustomDecimal2; }
- [DebuggerStepThrough()]
- set { base.CustomDecimal2 = value; }
- }
-
- [ItemFieldMapAttribute(ItemFieldMapAttribute.CustomFields.CustomInt1)]
- public int Beds
- {
- [DebuggerStepThrough()]
- get { return base.CustomInt1; }
- [DebuggerStepThrough()]
- set { base.CustomInt1 = value; }
- }
-
- [ItemFieldMapAttribute(ItemFieldMapAttribute.CustomFields.CustomInt2)]
- public int RoomType
- {
- [DebuggerStepThrough()]
- get { return base.CustomInt2; }
- [DebuggerStepThrough()]
- set { base.CustomInt2 = value; }
- }
-
- [ItemFieldMapAttribute(ItemFieldMapAttribute.CustomFields.CustomInt3)]
- public int AdvanceType
- {
- [DebuggerStepThrough()]
- get { return base.CustomInt3; }
- [DebuggerStepThrough()]
- set { base.CustomInt3 = value; }
- }
-
- [ItemFieldMapAttribute(ItemFieldMapAttribute.CustomFields.CustomDate1)]
- public DateTime LastReservation
- {
- [DebuggerStepThrough()]
- get { return base.CustomDate1; }
- [DebuggerStepThrough()]
- set { base.CustomDate1 = value; }
- }
-
- public RoomItem() { }
- }
-
- [Serializable]
- public class RoomItemFilter: ItemsFilter
- {
- public int Beds
- {
- [DebuggerStepThrough()]
- get { return base.CustomInt1; }
- [DebuggerStepThrough()]
- set { base.CustomInt1 = value; }
- }
- }
-
- public class RoomItemsManager : ItemsManager<RoomItem, RoomItemFilter>
- {
- public RoomItemsManager(bool checkUserContext)
- : base(checkUserContext, false)
- { }
-
- public override List<RoomItem> GetByFilter(RoomItemFilter filter, string sort)
- {
- filter.ItemType = "PigeonCms.RoomItem";
- return base.GetByFilter(filter, sort);
- }
- }
- }