コード例 #1
0
        public JsonResult BuscarMaterial(string codigo, string descripcion, int tipo, int min, int max, int estado)
        {
            var response = new JsonResponse();
            try
            {
                IList<Material> materiales;
                using (var service = new MantenimientoServiceClient())
                {
                    materiales = service.ListarMateriales(codigo, descripcion, tipo, min, max, estado);
                }

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

                LogError(ex);
            }
            return Json(response);
        }
コード例 #2
0
        public JsonResult BuscarMaterial(string codigo, string descripcion, int tipo, int min, int max, int estado)
        {
            var response = new JsonResponse();

            try
            {
                IList <Material> materiales;
                using (var service = new MantenimientoServiceClient())
                {
                    materiales = service.ListarMateriales(codigo, descripcion, tipo, min, max, estado);
                }

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

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