예제 #1
0
 /// <summary>
 /// Create a new ProductType object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 /// <param name="type">Initial value of the Type property.</param>
 public static ProductType CreateProductType(global::System.Guid id, global::System.String type)
 {
     ProductType productType = new ProductType();
     productType.ID = id;
     productType.Type = type;
     return productType;
 }
예제 #2
0
        public ProductsViewModel(ProductType productType)
        {
            var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>();
            _adminDataUnit = dataUnitLocator.ResolveDataUnit<IAdminDataUnit>();
            _reportsDataUnit = dataUnitLocator.ResolveDataUnit<IReportsDataUnit>();
            _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>();
            SelectedProductType = productType;

            DeleteProductCommand = new RelayCommand<ProductModel>(DeleteProductCommandExecuted);
            EditProductCommand = new RelayCommand<ProductModel>(EditProductCommandExecuted);

        }
예제 #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ProductTypes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToProductTypes(ProductType productType)
 {
     base.AddObject("ProductTypes", productType);
 }