コード例 #1
0
        public void DeleteTest()
        {
            List <UserPayment> paymethods = UserPaymentManager.Load();
            UserPayment        paymethod  = paymethods.Where(c => c.CardHolderName == "John Test Hancook").FirstOrDefault();
            int actual = UserPaymentManager.Delete(paymethod.Id);

            Assert.IsTrue(actual > 0);
        }
コード例 #2
0
        private void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            int result = UserPaymentManager.Delete(payment.Id);

            if (result >= 1)
            {
                MessageBox.Show("Payment deleted.");
                this.Close();
            }
            else
            {
                MessageBox.Show("An error occurred when deleting.");
            }
        }
コード例 #3
0
 // DELETE: api/UserPayment/5
 public void Delete(Guid id)
 {
     UserPaymentManager.Delete(id);
 }