Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 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();
 }