public JsonResult Delete(System.Int32 id) { RemovePosTerminalRequest request = new RemovePosTerminalRequest(); request.TerminalId = id; RemovePosTerminalResponse response = _posTerminalService.RemovePosTerminal(request); return(Json(response)); }
public RemovePosTerminalResponse RemovePosTerminal(RemovePosTerminalRequest request) { RemovePosTerminalResponse response = new RemovePosTerminalResponse(); response.Errors = new List <BusinessRule>(); try { if (_posTerminalRepository.Remove(request.TerminalId) > 0) { response.PosTerminalDeleted = true; } } catch (Exception ex) { response.Errors.Add(new BusinessRule("DAL", "DAL_ERROR: " + ex.Message)); } return(response); }