public void Remove(int index) { var uf = view.bindingList.ElementAt(index); view.bindingList.RemoveAt(index); if (uf.id > 0) { repo.Delete(uf.id); } }
public ResponseMessage Delete(int id) { ResponseMessage response = new ResponseMessage(); try { response.IsSuccess = _ugyfelRepository.Delete(id); response.ErrorMessage = "Success"; } catch (Exception ex) { response.IsSuccess = false; response.ErrorMessage = ex.Message; } return(response); }