예제 #1
0
        private void EditConsignment(object sender, RoutedEventArgs e)
        {
            Button      button      = e.Source as Button;
            Consignment consignmnet = button.CommandParameter as Consignment;

            Product product = viewModel.GetProductFromConsignment(consignmnet);
            EditConsignmentWindow editConsignmentWindow = new EditConsignmentWindow(product, consignmnet);

            if (editConsignmentWindow.ShowDialog() == true)
            {
                viewModel.EditConsignment(editConsignmentWindow.Product, editConsignmentWindow.Consignment);
            }
        }
예제 #2
0
        private void EditConsignment(object sender, RoutedEventArgs e)
        {
            Button      button      = e.Source as Button;
            Consignment consignment = button.CommandParameter as Consignment;

            Product product = viewModel.GetProductFromConsignment(consignment);

            Consignment           editableConsignment   = new Consignment(consignment.Id, consignment.NumberOfContent, consignment.ExpirationDate, consignment.Price);
            EditConsignmentWindow editConsignmentWindow = new EditConsignmentWindow(product, editableConsignment);

            if (editConsignmentWindow.ShowDialog() == true)
            {
                viewModel.EditConsignment(editConsignmentWindow.Product, editConsignmentWindow.Consignment);
            }
        }