Ejemplo n.º 1
0
 public AddWaybillLineFromCatalog()
 {
     InitFields();
     DisplayName       = "Добавление из каталога";
     CurrentCatalog    = new NotifyValue <Catalog>();
     CatalogTerm       = new NotifyValue <string>();
     ProducerTerm      = new NotifyValue <string>();
     CurrentProducer   = new NotifyValue <Producer>();
     WasCancelled      = true;
     IsOkEnabled.Value = false;
     CurrentCatalog.Changed()
     .Merge(CurrentProducer.Changed())
     .Merge(SupplierCost.Changed())
     .Merge(Quantity.Changed())
     .Subscribe(_ => IsOkEnabled.Value = CurrentCatalog.Value != null && CurrentProducer.Value != null && SupplierCost.Value > 0 && Quantity.Value > 0);
 }