private void metroButton6_Click(object sender, EventArgs e) { CardController.DeleteCard(Card.CardNr); UserCardList.Remove(Card); ClearCard(); FillUserCardDatagrid(UserCardList); }
public ResponseContext Delete(Dictionary <string, object> param) { RequestContext request = (RequestContext)param["request"]; Guid guid; if (!Guid.TryParse(request.RequestedResource, out guid)) { return(new ResponseContext(request, new KeyValuePair <StatusCode, object>(StatusCode.BadRequest, "The requested resource is no valid GUID"))); } return(new ResponseContext(request, _cardController.DeleteCard(guid))); }