Example #1
0
        private void DeleteClientButton_OnClick(object sender, RoutedEventArgs e)
        {
            var o = (Models.Client)ClientDataGrid.SelectedItem;

            clientBusiness.Delete(o.Id);
            OnDeleteClientClicked();
        }
Example #2
0
        public void TestIfDeleteClientInvokesRemove()
        {
            clientBusiness.Delete(2);

            mockDBSetClients.Verify(m => m.Remove(It.IsAny <Client>()), Times.Once());
            mockContext.Verify(m => m.SaveChanges(), Times.Once());
        }
Example #3
0
        private void Delete()
        {
            Console.WriteLine("Enter Id to delete");
            int id = int.Parse(Console.ReadLine());

            clientBusiness.Delete(id);
            Console.WriteLine("Done.");
        }
Example #4
0
 // DELETE: api/Client/5
 public void Delete(int id)
 {
     try
     {
         ClientBusiness business = new ClientBusiness();
         business.Delete(id);
     }
     catch (System.Exception)
     {
         throw;
     }
 }
Example #5
0
 public ActionResult DeleteConfirmed(int id)
 {
     clientBusiness.Delete(id);
     return(RedirectToAction("Index"));
 }
Example #6
0
 public void Delete(int id)
 {
     business.Delete(id);
 }