コード例 #1
0
        public static dynamic SanctionOrderList(SactionOrderDetailsModel obj)
        {
            dynamic objdata = new ExpandoObject();

            try
            {
                obj.password = "******";
                obj.userName = "******";
                string SancOrderResponse = POST_RequestAsync(SanctionOrderListUrl, JsonConvert.SerializeObject(obj));
                if (string.IsNullOrEmpty(SancOrderResponse))
                {
                    objdata.status = false;
                    objdata.result = "No Response from pension department service !!!, Please try after some time";
                    return(objdata);
                }

                SanctionOrderDetailsRespModel SanOrderRespObj = JsonConvert.DeserializeObject <SanctionOrderDetailsRespModel>(SancOrderResponse);
                if (SanOrderRespObj.responseCode == "1000")
                {
                    objdata.status = true;
                    objdata.result = SanOrderRespObj.details;
                }
                else
                {
                    objdata.status = false;
                    objdata.result = "RESPONSE FROM PENSION DEPT : " + SancOrderResponse;
                }
            }
            catch (Exception ex)
            {
                objdata.status = false;
                objdata.result = "RESPONSE FROM PENSION DEPT : " + ex.Message.ToString();
            }
            return(objdata);
        }
コード例 #2
0
        public IHttpActionResult SanctionOrderList(dynamic data)
        {
            dynamic objdata = new ExpandoObject();

            try
            {
                string serialized_data           = token_gen.Authorize_aesdecrpty(data);
                SactionOrderDetailsModel rootobj = JsonConvert.DeserializeObject <SactionOrderDetailsModel>(serialized_data);
                return(Ok(pensionDeptHelper.SanctionOrderList(rootobj)));
            }
            catch (Exception ex)
            {
                objdata.status = false;
                objdata.result = ex.Message.ToString();
            }
            return(Ok(objdata));
        }