/// <summary> /// Initializes a new instance of the <see cref="FindByClassAndPeriodWindowViewModel"/> class. /// </summary> /// <param name="warehouseWindowViewModel"> /// The warehouse window view model. /// </param> public FindByClassAndPeriodWindowViewModel(WarehouseWindowViewModel warehouseWindowViewModel) { this.warehouseWindowViewModel = warehouseWindowViewModel; this.frontServiceClient = FrontServiceDIContainer.Resolve <IFrontServiceClient>(); this.GoodsClassCollection = this.frontServiceClient.GetAllGoodsClass().ToObservableCollection(); this.FindCommand = new RelayCommand(cmd => this.Find()); this.SelectedClassIndex = -1; }
/// <summary> /// Initializes a new instance of the <see cref="FindByProviderWindowViewModel"/> class. /// </summary> /// <param name="viewModel"> /// The view Model. /// </param> public FindByProviderWindowViewModel(WarehouseWindowViewModel viewModel) { var frontServiceClient = FrontServiceDIContainer.Resolve <IFrontServiceClient>(); this.ProviderCollection = frontServiceClient.GetAllProvider().ToObservableCollection(); this.FindCommand = new RelayCommand(cmd => this.Find(), cmd => this.CanFind()); this.SelectedProviderIndex = -1; this.viewModel = viewModel; }