Exemplo n.º 1
0
 public OrderProductPopup()
  {
      InitializeComponent();
      this.CenterWindowOnScreen();
      vm = this.DataContext as ProductMainOrderLineItem;
      vm.ProductMainOrderLineItemLoadCommand.Execute(null);
      vm.RequestClose += (s, e) => this.Close();
  }
Exemplo n.º 2
0
 public ProductLookUp()
 {
    
     InitializeComponent();
     this.CenterWindowOnScreen();
     vm = this.DataContext as ProductMainOrderLineItem;
     
     vm.allowQuantityChangeEvent = true;
     vm.ProductMainOrderLineItemLoadCommand.Execute(null);
     vm.RequestClose += (s, e) => this.Close();
     
 }
Exemplo n.º 3
0
        private void TextBoxQuantity_TextChanged(object sender, TextChangedEventArgs e)
        {
            if(vm==null) return;

            if (! vm.allowQuantityChangeEvent  )
            {
                 vm.allowQuantityChangeEvent = true;
                return;
            }

            decimal quantity = 0;
            decimal.TryParse(TextBoxQuantity.Text, out quantity);
            vm = this.DataContext as ProductMainOrderLineItem;
            if (vm != null)
            {
                vm.Quantity = quantity;
                vm.ValidQuantityCommand.Execute(e);
            }
            
        }