public LocationSuppliersViewModel(int locatonId)
        {
            this.locationId = locatonId;
            locationApi     = new LocationAPI();
            var suppliers = locationApi.GetSupplier(this.locationId).Select(x => new Supplier()
            {
                Id          = x.Id,
                Name        = x.Name,
                OpenCommand = new Command((() =>
                {
                }))
            });

            Suppliers = new ObservableCollection <Supplier>(suppliers);
        }
Example #2
0
        public OrderCreateViewModel(int locationId)
        {
            this.locationId = locationId;
            locationApi     = new LocationAPI();
            var suppliers = locationApi.GetSupplier(locationId).Select(x => new Supplier()
            {
                Id   = x.Id,
                Name = x.Name
            });

            Suppliers     = new ObservableCollection <Supplier>(suppliers);
            SelectCommand = new Command(Select);
            Products      = new ObservableCollection <ProductOrdered>();
            SaveCommand   = new Command(Save);
        }