using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using TreeViewDNDWithRia.Web;
using System.Collections.ObjectModel;
using System.ServiceModel.DomainServices.Client;
using Telerik.Windows.Controls;

namespace TreeViewDNDWithRia.ViewModels
{
    public class ProductViewModel : ViewModelBase
    {
        public ProductViewModel(Product p)
        {
            this.productModel = p;
        }

        private Product productModel;
        public Product ProductModel
        {
            get
            {
                return productModel;
            }
        }
        public string Name
        {
            get
            {
                return productModel.ProductName;
            }
            set
            {
                if (productModel.ProductName != value)
                {
                    productModel.ProductName = value;
                    OnPropertyChanged("Name");
                }
            }
        }
    }
}
