public void Save()
        {
            var takenDeliveries = ServiceWrap.GetDeliveryMens()
                                  .Where(dlm => dlm.Id == Id)
                                  .FirstOrDefault()
                                  .Deliveries;

            var nwDeliveries = Deliveries.Except(takenDeliveries).ToList();

            foreach (var deliv in nwDeliveries)
            {
                ServiceWrap.TakeDelivery(Id, deliv.Id);
            }
        }
Exemple #2
0
 public void Execute(object parameter)
 {
     try
     {
         var idDeliveryMen = Convert.ToInt32(_deliveryMens.CurrentVM.DataViewModel.Id);
         var idDelivery    = Convert.ToInt32(_deliveries.CurrentVM.DataViewModel.Id);
         var result        = ServiceWrap.TakeDelivery(idDeliveryMen, idDelivery);
         CanExecuteChanged(this, new EventArgs());
     }
     catch (Exception ex)
     {
         throw new NotImplementedException();
     }
 }