Example #1
0
        public ActionResult Delete(int id)
        {
            AccountClient client = new AccountClient();

            client.Delete(id);
            return(RedirectToAction("Index"));
        }
Example #2
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            int userId = Int32.Parse(txtId.Text);

            using (var context = new BookLotEntities())
            {
                User userToDelete = new User()
                {
                    Id = userId
                };
                AccountClient accountClient = new AccountClient();
                accountClient.Delete(userToDelete);
            }
        }
Example #3
0
 /// <summary>
 /// Delets user with given id.
 /// </summary>
 /// <param name="id">User id.</param>
 /// <returns>Returns true if user deletion was successfull, false otherwise.</returns>
 public ApiResult <bool> Delete(int id)
 {
     return(_client.Delete <bool>($"{_client.ResourceUrl}/Users/" + id));
 }
Example #4
0
 /// <summary>
 /// Deletes agenda's logo.
 /// </summary>
 /// <returns><c>true</c>.</returns>
 public ApiResult <bool> DeleteLogo()
 {
     return(_client.Delete <bool>(LogoUrl));
 }