コード例 #1
0
        public IHttpActionResult SaveReasonCode(dynamic Json)
        {
            string Input  = JsonConvert.SerializeObject(Json);
            string output = ReasonCodeDataAccessManager.Insert(Input);

            JObject returnObject = new JObject();

            if (Input != null)
            {
                returnObject = (JObject)JsonConvert.DeserializeObject(Input);
            }


            return(Ok(returnObject));
        }
コード例 #2
0
        public IHttpActionResult GetAllReasoncodeList(dynamic Json)
        {
            //Logger.GRLogData("GetAllReasoncodeList");
            //Logger.GRLogData("Start Time" + DateTime.Now);
            //string deliveryLocationList = "";
            //var expConverter = new ExpandoObjectConverter();
            //string Input = JsonConvert.SerializeObject(Json);
            //var values = Json.Json.LookupCategory;
            //string output = _cacheManager.GetAllReasonCodeListFromCache();
            //dynamic locationListJson = new ExpandoObject();

            //locationListJson = JsonConvert.DeserializeObject<ExpandoObject>(output, expConverter);
            //List<dynamic> DeliveryLocationaAllList = new List<dynamic>();
            //DeliveryLocationaAllList = locationListJson.ReasonCode.ReasonCodeList;
            //DeliveryLocationaAllList = DeliveryLocationaAllList.Where(x => x.CategoryName == Convert.ToString(values)).ToList();
            //dynamic returnObject = new ExpandoObject();
            //returnObject.ReasonCodeList = DeliveryLocationaAllList;
            //dynamic mainObject = new ExpandoObject();
            //mainObject.ReasonCode = returnObject;


            //Logger.GRLogData("end Time" + DateTime.Now);

            //return Ok(mainObject);


            string Input = JsonConvert.SerializeObject(Json);

            string output = ReasonCodeDataAccessManager.GetAllReasoncodeList(Input);


            JObject returnObject = new JObject();

            if (output != null)
            {
                returnObject = (JObject)JsonConvert.DeserializeObject(output);
            }



            return(Ok(returnObject));
        }