Ejemplo n.º 1
0
        public InventoryViewModel(IRepositoryFactory <IInventoryRepository> repositoryFactory,
                                  INavigationManager navManager,
                                  IEditQuantityViewModel editQuantityVm,
                                  IInventoryEntityFactory entityFactory,
                                  Foundation.Inventories.Model.Inventory item)
            : base(entityFactory, item)
        {
            _repositoryFactory = repositoryFactory;
            _editQuantityVm    = editQuantityVm;
            _navManager        = navManager;
            ViewTitle          = new ViewTitleBase
            {
                Title    = "Inventory",
                SubTitle = (item != null && !string.IsNullOrEmpty(item.Sku)) ? item.Sku.ToUpper(CultureInfo.InvariantCulture) : ""
            };

            OpenItemCommand = new DelegateCommand(() => _navManager.Navigate(NavigationData));

            InStockQuantityEditCommand = new DelegateCommand(RaiseEditQuantityInteractionRequest);

            var statuses = Enum.GetValues(typeof(InventoryStatus)).Cast <InventoryStatus>();

            AvailableStatuses = new List <InventoryStatusDisplay>();
            foreach (var s in statuses)
            {
                AvailableStatuses.Add(new InventoryStatusDisplay {
                    Id = (int)s, Name = s.ToString()
                });
            }
        }
        public EFInventoryRepository(IInventoryEntityFactory entityFactory, IInterceptor[] interceptors = null)
            : base(InventoryConfiguration.Instance.Connection.SqlConnectionStringName, factory: entityFactory, interceptors: interceptors)
        {
            _entityFactory = entityFactory;
            Database.SetInitializer(new ValidateDatabaseInitializer <EFInventoryRepository>());

            this.Configuration.AutoDetectChangesEnabled = true;
            this.Configuration.ProxyCreationEnabled     = false;
        }
        public EFInventoryRepository(IInventoryEntityFactory entityFactory, IInterceptor[] interceptors = null)
            : base(InventoryConfiguration.Instance.Connection.SqlConnectionStringName, factory: entityFactory, interceptors: interceptors)
		{
			_entityFactory = entityFactory;
            Database.SetInitializer(new ValidateDatabaseInitializer<EFInventoryRepository>());

			this.Configuration.AutoDetectChangesEnabled = true;
			this.Configuration.ProxyCreationEnabled = false;
		}
Ejemplo n.º 4
0
 public DSInventoryClient(Uri serviceUri, IInventoryEntityFactory factory, ISecurityTokenInjector tokenInjector)
     : base(serviceUri, factory, tokenInjector)
 {
 }
Ejemplo n.º 5
0
 public DSInventoryClient(IInventoryEntityFactory factory, ISecurityTokenInjector tokenInjector, IServiceConnectionFactory connFactory)
     : base(connFactory.GetConnectionString(InventoryConfiguration.Instance.Connection.DataServiceUri), factory, tokenInjector)
 {
 }
Ejemplo n.º 6
0
        public DSInventoryClient(Uri serviceUri, IInventoryEntityFactory factory, ISecurityTokenInjector tokenInjector)
			: base(serviceUri, factory, tokenInjector)
		{
		}
Ejemplo n.º 7
0
		public DSInventoryClient(IInventoryEntityFactory factory, ISecurityTokenInjector tokenInjector, IServiceConnectionFactory connFactory)
			: base(connFactory.GetConnectionString(InventoryConfiguration.Instance.Connection.DataServiceUri), factory, tokenInjector)
		{
		}