private void cmdDelete_Click(object sender, EventArgs e) { // Raise the DeleteContact Event when the user has confirmed their desire to delete the Contact. // The entire ContactControl is passed as an argument so the handling event can evaluate its contents. DeleteContact?.Invoke(this, e); }
public void Any(DeleteContact request) { Db.DeleteById <Contact>(request.Id); }
public object PostHtml(DeleteContact request) // only called by html POST requests where it takes precedence { Any(request); return(HttpResult.Redirect(Request.GetView())); //added by [DefaultView] }