Esempio n. 1
0
        public OrdersVM(OrderManagerModel model)
        {
            this.model = model;
            model.OrderUpdateSuccess += this.UpdateResultsSuccess;
            model.OrderUpdateFailed  += this.UpdateResultsFailed;
            updaterVM = new UpdaterVM(model.UpdaterModel);


            States = new ObservableCollection <OrderState>()
            {
                new OrderState(OrderStates.Open),
                new OrderState(OrderStates.Export),
                new OrderState(OrderStates.Archive),
                new OrderState(OrderStates.ShipReady),
                new OrderState(OrderStates.Shipped),
                new OrderState(OrderStates.Service),
                new OrderState(OrderStates.OnHold),
                new OrderState(OrderStates.ASAP),
                new OrderState(OrderStates.Cancelled),
                new OrderState(OrderStates.Reorders)
            };

            StatesList = new ObservableCollection <string>(model.StringStates);

            MarketList.Add("Amazon US");
            MarketList.Add("Amazon CA");
            MarketList.Add("Amazon UK");
            MarketList.Add("Website");
            MarketList.Add("eBay");

            SelectedState         = States[(int)OrderStates.Open];
            this.PropertyChanged += OrdersVM_PropertyChanged;
        }
 public CCInventoryVM(OrderManagerModel model)
 {
     try
     {
         this.model = model;
         updaterVM  = new UpdaterVM(model.UpdaterModel);
         PopulateInventory();
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }