private void btnAddLineItem_Click(object sender, RoutedEventArgs e)
 {
     lineItemModal = new DispatchProductsLineItemModal();
     lineItemModal.Closing += lineItemModal_Closing;
     DPLineItemViewModel vm = lineItemModal.DataContext as DPLineItemViewModel;
     vm.ClearAndSetUp();
     lineItemModal.ShowDialog();
 }
        private void hlEdit_Click(object sender, RoutedEventArgs e)
        {
            lineItemModal = new DispatchProductsLineItemModal();
            lineItemModal.Closing += lineItemModal_Closing;
            Hyperlink hl = sender as Hyperlink;
            DPLineItemViewModel vmItem = lineItemModal.DataContext as DPLineItemViewModel;
            seqId = (int)hl.Tag;

            var lineItem = _vm.LineItems.First(n => n.SequenceId == seqId);

            vmItem.ClearAndSetUp();
            vmItem.LoadForEdit(
                lineItem.ProductId,
                lineItem.Reason,
                lineItem.OtherReason,
                lineItem.Qty
                );
            lineItemModal.ShowDialog();
        }