Beispiel #1
0
        public void DeleteTest()
        {
            List <UserAddress> addresss = UserAddressManager.Load();
            UserAddress        address  = addresss.Where(c => c.City == "OshkoshTest2").FirstOrDefault();
            int actual = UserAddressManager.Delete(address.Id);

            Assert.IsTrue(actual > 0);
        }
        private void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            int result = UserAddressManager.Delete(address.Id);

            if (result >= 1)
            {
                MessageBox.Show("Address deleted.");
                this.Close();
            }
            else
            {
                MessageBox.Show("An error occurred when deleting.");
            }
        }
Beispiel #3
0
 // DELETE: api/UserAddress/5
 public void Delete(Guid id)
 {
     UserAddressManager.Delete(id);
 }
Beispiel #4
0
 public void DeleteUserAddress(UserAddress UserAddress)
 {
     userAddressManager.Delete(UserAddress);
     userAddressManager.Save();
 }