public POLineItemModal()
 {
     isInitialzed = false;
     InitializeComponent();
     isInitialzed = true;
     this.Loaded += new RoutedEventHandler(POLineItemModal_Loaded);
     _vm = this.DataContext as POLineItemViewModel;
 }
        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            _vm = DataContext as POLineItemViewModel;

            if (_vm.SelectedProduct != null && _vm.Qty > 0)
            {
                AddProduct();
            }

            this.DialogResult = true;
            _vm.ButtonNameText = "";
            _vm.ProductAddSummaries.Clear();
        }