public static dynamic PensionSocialAuditList(PensionSocialAuditListModel obj) { dynamic objdata = new ExpandoObject(); try { obj.password = "******"; obj.userName = "******"; string BeneficiaryResponse = POST_RequestAsync(PensionSocialListListUrl, JsonConvert.SerializeObject(obj)); if (string.IsNullOrEmpty(BeneficiaryResponse)) { objdata.status = false; objdata.result = "No Response from pension department service !!!, Please try after some time"; return(objdata); } PensionSocialAuditListRespModel AuditRespObj = JsonConvert.DeserializeObject <PensionSocialAuditListRespModel>(BeneficiaryResponse); if (AuditRespObj.responseCode == "2000") { objdata.status = true; objdata.result = AuditRespObj; } else { objdata.status = false; objdata.result = "RESPONSE FROM PENSION DEPT : " + AuditRespObj.reason; } } catch (Exception ex) { objdata.status = false; objdata.result = "RESPONSE FROM PENSION DEPT : " + ex.Message.ToString(); } return(objdata); }
public IHttpActionResult PensionSocialAuditList(dynamic data) { dynamic objdata = new ExpandoObject(); try { string serialized_data = token_gen.Authorize_aesdecrpty(data); PensionSocialAuditListModel rootobj = JsonConvert.DeserializeObject <PensionSocialAuditListModel>(serialized_data); return(Ok(pensionDeptHelper.PensionSocialAuditList(rootobj))); } catch (Exception ex) { objdata.status = false; objdata.result = ex.Message.ToString(); } return(Ok(objdata)); }