/// <summary>
 /// Initializes a new instance of the <see cref="ProductItemViewModel"/> class.
 /// </summary>
 /// <param name="contentItem">The content item.</param>
 /// <param name="provider">The provider.</param>
 public ProductItemViewModel(ProductItem contentItem, ContentDataProviderBase provider)
     : base(contentItem, provider)
 {
     this.price = contentItem.Price;
     this.quantityInStock = contentItem.QuantityInStock;
     this.whatIsInThebox = contentItem.WhatIsInTheBox;
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProductItemViewModel"/> class.
 /// </summary>
 /// <param name="contentItem">The content item.</param>
 /// <param name="provider">The provider.</param>
 public ProductItemViewModel(ProductItem contentItem, ContentDataProviderBase provider)
     : base(contentItem, provider)
 {
     this.price           = contentItem.Price;
     this.quantityInStock = contentItem.QuantityInStock;
     this.whatIsInThebox  = contentItem.WhatIsInTheBox;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="LocationItemViewModel"/> class.
 /// </summary>
 /// <param name="location">The location item.</param>
 /// <param name="provider">The provider.</param>
 public LocationItemViewModel(LocationItem location, ContentDataProviderBase provider)
     : base(location, provider)
 {
     this.Address    = location.Address;
     this.City       = location.City;
     this.Region     = location.Region;
     this.PostalCode = location.PostalCode;
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AgentItemViewModel"/> class.
 /// </summary>
 /// <param name="contentItem">The content item.</param>
 /// <param name="provider">The provider.</param>
 public AgentItemViewModel(AgentItem contentItem, ContentDataProviderBase provider)
     : base(contentItem, provider)
 {
     this.agentEmail       = contentItem.Email;
     this.agentPhoneNumber = contentItem.PhoneNumber;
     this.agentAddress     = contentItem.Address;
     this.agentPostalCode  = contentItem.PostalCode;
 }
		/// <summary>
		/// Initializes a new instance of the <see cref="LocationItemViewModel"/> class.
		/// </summary>
		/// <param name="location">The location item.</param>
		/// <param name="provider">The provider.</param>
		public LocationItemViewModel(LocationItem location, ContentDataProviderBase provider)
			: base(location, provider)
		{
			this.Address = location.Address;
			this.City = location.City;
			this.Region = location.Region;
			this.PostalCode = location.PostalCode;
		}
Example #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProjectItemViewModel"/> class.
 /// </summary>
 /// <param name="Project">The Project item.</param>
 /// <param name="provider">The provider.</param>
 public ProjectItemViewModel(ProjectItem Project, ContentDataProviderBase provider)
     : base(Project, provider)
 {
     this.Address = Project.Address;
     this.City = Project.City;
     this.Region = Project.Region;
     this.PostalCode = Project.PostalCode;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AgentItemViewModel"/> class.
 /// </summary>
 /// <param name="contentItem">The content item.</param>
 /// <param name="provider">The provider.</param>
 public AgentItemViewModel(AgentItem contentItem, ContentDataProviderBase provider)
     : base(contentItem, provider)
 {
     this.agentEmail = contentItem.Email;
     this.agentPhoneNumber = contentItem.PhoneNumber;
     this.agentAddress = contentItem.Address;
     this.agentPostalCode = contentItem.PostalCode;
     
 }
 public JobApplicationViewModel(JobApplication contentItem, ContentDataProviderBase provider)
     : base(contentItem, provider)
 {
     this.Phone     = contentItem.Phone;
     this.FirstName = contentItem.FirstName;
     this.LastName  = contentItem.LastName;
     this.Text      = contentItem.Text;
     this.Referral  = contentItem.Referral;
 }
 public JobApplicationViewModel(JobApplication contentItem, ContentDataProviderBase provider)
     : base(contentItem, provider)
 {
     this.Phone = contentItem.Phone;
     this.FirstName = contentItem.FirstName;
     this.LastName = contentItem.LastName;
     this.Text = contentItem.Text;
     this.Referral = contentItem.Referral;
 }
Example #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RealEstateItemViewModel"/> class.
 /// </summary>
 /// <param name="contentItem">The content item.</param>
 /// <param name="provider">The provider.</param>
 public RealEstateItemViewModel(RealEstateItem contentItem, ContentDataProviderBase provider)
     : base(contentItem, provider)
 {
     this.itemNumber       = contentItem.ItemNumber;
     this.address          = contentItem.Address;
     this.postalCode       = contentItem.PostalCode;
     this.housing          = contentItem.Housing;
     this.numberOfRooms    = contentItem.NumberOfRooms;
     this.numberOfFloors   = contentItem.NumberOfFloors;
     this.yearBuilt        = contentItem.YearBuilt;
     this.price            = contentItem.Price;
     this.payment          = contentItem.Payment;
     this.monthlyRate      = contentItem.MonthlyRate;
     this.net              = contentItem.Net;
     this.priceSquareMeter = contentItem.PriceSquareMeter;
     this.agentId          = contentItem.AgentId;
 }
        public override IEnumerable <JobApplicationViewModel> GetViewModelList(IEnumerable <JobApplication> contentList, ContentDataProviderBase dataProvider)
        {
            var viewModelList = new List <JobApplicationViewModel>();

            foreach (var product in contentList)
            {
                viewModelList.Add(new JobApplicationViewModel(product, dataProvider));
            }
            return(viewModelList);
        }
Example #12
0
        /// <summary>
        /// Convert a list of model items into a list of viewmodel items
        /// </summary>
        /// <param name="contentList">List of agent items</param>
        /// <param name="dataProvider">Provider to use</param>
        /// <returns>List of view model items</returns>
        public override IEnumerable <AgentItemViewModel> GetViewModelList(IEnumerable <AgentItem> contentList, ContentDataProviderBase dataProvider)
        {
            var viewModelList = new List <AgentItemViewModel>();

            foreach (var agent in contentList)
            {
                viewModelList.Add(new AgentItemViewModel(agent, dataProvider));
            }

            return(viewModelList);
        }
        /// <summary>
        /// Gets the view model list.
        /// </summary>
        /// <param name="contentList">The content list.</param>
        /// <param name="dataProvider">The data provider.</param>
        /// <returns></returns>
        public override IEnumerable <LocationItemViewModel> GetViewModelList(IEnumerable <LocationItem> contentList, ContentDataProviderBase dataProvider)
        {
            var list = new List <LocationItemViewModel>();

            foreach (var location in contentList)
            {
                list.Add(new LocationItemViewModel(location, dataProvider));
            }

            return(list);
        }
Example #14
0
        /// <summary>
        /// Convert a list of model items into a list of viewmodel items
        /// </summary>
        /// <param name="contentList">List of items</param>
        /// <param name="dataProvider">Provider to use</param>
        /// <returns>List of view model items</returns>
        public override IEnumerable <RealEstateItemViewModel> GetViewModelList(IEnumerable <RealEstateItem> contentList, ContentDataProviderBase dataProvider)
        {
            var viewModelList = new List <RealEstateItemViewModel>();

            foreach (var item in contentList)
            {
                viewModelList.Add(new RealEstateItemViewModel(item, dataProvider));
            }

            return(viewModelList);
        }