コード例 #1
0
 private void Add()
 {
     SupplierPaymentRequest.Raise(new SupplierPaymentConfirmation(Supplier.ID),
                                  x =>
     {
         if (x.Confirmed)
         {
             _supplierPaymentService.Add(x.SupplierPayment);
             Items.Add(x.SupplierPayment);
             SelectedItem = x.SupplierPayment;
             Total        = Items.Sum(y => y.Money);
         }
     });
 }
コード例 #2
0
 private void Update()
 {
     SupplierPaymentRequest.Raise(new SupplierPaymentConfirmation(SelectedItem),
                                  x =>
     {
         if (x.Confirmed)
         {
             _supplierPaymentService.Update(x.SupplierPayment);
             Total = Items.Sum(y => y.Money);
         }
         else
         {
             DataUtils.Copy(SelectedItem, _supplierPaymentService.Find(SelectedItem.ID));
         }
     });
 }