internal PublicItem(int mId, int mType, string mCaption, string mDescription, string mImage, PublicImageType mImageType, uint mRoomId, int mCategoryId, int mParentId, Boolean mRecommand, int mTypeOfData, string mTags) { BannerId = mId; Type = mType; Caption = mCaption; Description = mDescription; Image = mImage; ImageType = mImageType; RoomId = mRoomId; ParentId = mParentId; CategoryId = mCategoryId; Recommended = mRecommand; TagsToSearch = mTags; if (mTypeOfData == 1) { itemType = PublicItemType.TAG; } else if (mTypeOfData == 2) { itemType = PublicItemType.FLAT; } else if (mTypeOfData == 3) { itemType = PublicItemType.PUBLIC_FLAT; } else if (mTypeOfData == 4) { itemType = PublicItemType.CATEGORY; } else { itemType = PublicItemType.NONE; } }
internal PublicItem(int mId, int mType, string mCaption, string mDescription, string mImage, PublicImageType mImageType, uint mRoomId, int mCategoryId, int mParentId, bool mRecommand, int mTypeOfData, string mTags) { this.BannerId = mId; this.Type = mType; this.Caption = mCaption; this.Description = mDescription; this.Image = mImage; this.ImageType = mImageType; this.RoomId = mRoomId; this.ParentId = mParentId; this.CategoryId = mCategoryId; this.Recommended = mRecommand; if (mTypeOfData == 1) { this.itemType = PublicItemType.TAG; return; } if (mTypeOfData == 2) { this.itemType = PublicItemType.FLAT; return; } if (mTypeOfData == 3) { this.itemType = PublicItemType.PUBLIC_FLAT; return; } if (mTypeOfData == 4) { this.itemType = PublicItemType.CATEGORY; return; } this.itemType = PublicItemType.NONE; }
internal PublicItem(int mId, int mType, string mCaption, string mDescription, string mImage, PublicImageType mImageType, uint mRoomId, int mCategoryId, int mParentId, bool mRecommand, int mTypeOfData, string mTags) { this.BannerId = mId; this.Type = mType; this.Caption = mCaption; this.Description = mDescription; this.Image = mImage; this.ImageType = mImageType; this.RoomId = mRoomId; this.ParentId = mParentId; this.CategoryId = mCategoryId; this.Recommended = mRecommand; if (mTypeOfData == 1) { this.itemType = PublicItemType.TAG; } else if (mTypeOfData == 2) { this.itemType = PublicItemType.FLAT; } else if (mTypeOfData == 3) { this.itemType = PublicItemType.PUBLIC_FLAT; } else if (mTypeOfData == 4) { this.itemType = PublicItemType.CATEGORY; } else { this.itemType = PublicItemType.NONE; } }
internal PublicItem(int mId, int mType, string mCaption, string mDescription, string mImage, PublicImageType mImageType, uint mRoomId, int mCategoryId, int mParentId, Boolean mRecommand, int mTypeOfData, string mTags) { BannerId = mId; Type = mType; Caption = mCaption; Description = mDescription; Image = mImage; ImageType = mImageType; RoomId = mRoomId; ParentId = mParentId; CategoryId = mCategoryId; Recommended = mRecommand; TagsToSearch = mTags; if (mTypeOfData == 1) itemType = PublicItemType.TAG; else if (mTypeOfData == 2) itemType = PublicItemType.FLAT; else if (mTypeOfData == 3) itemType = PublicItemType.PUBLIC_FLAT; else if (mTypeOfData == 4) itemType = PublicItemType.CATEGORY; else itemType = PublicItemType.NONE; }
public PublicItem(int id, int bannerType, string caption, string image, string imageType, string type, uint roomId, int parentCategoryId) { this.ID = id; this.BannerType = bannerType == 0 ? PublicItemBannerType.BIG : PublicItemBannerType.SMALL; this.Caption = caption; this.Image = image; this.ImageType = imageType; this.Type = type == "TAG" ? PublicItemType.TAG : type == "FLAT" ? PublicItemType.FLAT : type == "PUBLIC_FLAT" ? PublicItemType.PUBLIC_FLAT : PublicItemType.CATEGORY; this.RoomID = roomId; this.ParentCategoryID = parentCategoryId; }
/// <summary> /// Initializes a new instance of the <see cref="PublicItem"/> class. /// </summary> /// <param name="id">The identifier.</param> /// <param name="type">The type.</param> /// <param name="caption">The caption.</param> /// <param name="desc">The desc.</param> /// <param name="image">The image.</param> /// <param name="imageType">Type of the image.</param> /// <param name="roomId">The room identifier.</param> /// <param name="categoryId">The category identifier.</param> /// <param name="parentId">The parent identifier.</param> /// <param name="recommand">if set to <c>true</c> [recommand].</param> /// <param name="typeOfData">The type of data.</param> /// <param name="tags">The tags.</param> internal PublicItem(int id, int type, string caption, string desc, string image, PublicImageType imageType, uint roomId, int categoryId, int parentId, bool recommand, int typeOfData, string tags) { Id = id; Type = type; Caption = caption; Description = desc; Image = image; ImageType = imageType; RoomId = roomId; CategoryId = categoryId; ParentId = parentId; Recommended = recommand; switch (typeOfData) { case 1: { ItemType = PublicItemType.Tag; break; } case 2: { ItemType = PublicItemType.Flat; break; } case 3: { ItemType = PublicItemType.PublicFlat; break; } case 4: { ItemType = PublicItemType.Category; break; } default: { ItemType = PublicItemType.None; break; } } }
/// <summary> /// Initializes a new instance of the <see cref="PublicItem"/> class. /// </summary> /// <param name="id">The identifier.</param> /// <param name="type">The type.</param> /// <param name="caption">The caption.</param> /// <param name="desc">The desc.</param> /// <param name="image">The image.</param> /// <param name="imageType">Type of the image.</param> /// <param name="roomId">The room identifier.</param> /// <param name="categoryId">The category identifier.</param> /// <param name="parentId">The parent identifier.</param> /// <param name="recommand">if set to <c>true</c> [recommand].</param> /// <param name="typeOfData">The type of data.</param> /// <param name="tags">The tags.</param> internal PublicItem(uint id, int type, string caption, string desc, string image, PublicImageType imageType, uint roomId, int categoryId, int parentId, bool recommand, int typeOfData, string tags) { Id = id; Type = type; Caption = caption; Description = desc; Image = image; ImageType = imageType; RoomId = roomId; CategoryId = categoryId; ParentId = parentId; Recommended = recommand; switch (typeOfData) { case 1: { ItemType = PublicItemType.Tag; break; } case 2: { ItemType = PublicItemType.Flat; break; } case 3: { ItemType = PublicItemType.PublicFlat; break; } case 4: { ItemType = PublicItemType.Category; break; } default: { ItemType = PublicItemType.None; break; } } }