Exemplo n.º 1
0
        public JsonResult ObtenerMaquina(int idMaquina)
        {
            var response = new JsonResponse();

            try
            {
                Maquina maquina;
                using (var service = new ProduccionServiceClient())
                {
                    maquina = service.ObtenerMaquinaPorID(idMaquina);
                }

                response.Data    = maquina;
                response.Success = true;
                response.Message = "Ok";
            }
            catch (Exception ex)
            {
                response.Message = ex.Message;

                LogError(ex);
            }
            return(Json(response));
        }
        public JsonResult ObtenerMaquina(int idMaquina)
        {
            var response = new JsonResponse();
            try
            {
                Maquina maquina;
                using (var service = new ProduccionServiceClient())
                {
                    maquina = service.ObtenerMaquinaPorID(idMaquina);
                }

                response.Data = maquina;
                response.Success = true;
                response.Message = "Ok";
            }
            catch (Exception ex)
            {
                response.Message = ex.Message;

                LogError(ex);
            }
            return Json(response);
        }