Exemple #1
0
        public ReturnValue list([FromBody] RequestValue value, byte categorySN)
        {
            try
            {
                returnValue.error   = 0;
                returnValue.message = "ok";

                List <ItemGetList_Result> items = entity.ItemGetList(categorySN).ToList <ItemGetList_Result>();
                returnValue.data = new
                {
                    items
                };
            }
            catch (Exception ex)
            {
                entity.ErrorLogCreate(HttpRequestMessageHelper.GetClientIpAddress(Request), Request.RequestUri.AbsoluteUri, ex.Source, ex.TargetSite.Name, ex.Message, ex.StackTrace, JsonConvert.SerializeObject(value));;
                throw new HttpResponseException(HttpStatusCode.InternalServerError);
            }

            return(returnValue);
        }