Exemplo n.º 1
0
        public JsonResult Delete(System.Int32 id)
        {
            RemovePosTerminalRequest request = new RemovePosTerminalRequest();

            request.TerminalId = id;
            RemovePosTerminalResponse response = _posTerminalService.RemovePosTerminal(request);

            return(Json(response));
        }
Exemplo n.º 2
0
        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);
        }