public dynamic GetTransactionHistory_helper(AppStatus root) { dynamic obj = new ExpandoObject(); try { if (Utils.IsAlphaNumeric(root.PS_TXN_ID) && Utils.IsAlphaNumeric(root.CSC_REGNO)) { var val = PostData("http://122.252.251.175:8080/Praja_Transactions/service/getSPDCLServices/TranHistory", root); var data = GetSerialzedData <dynamic>(val); obj.Status = 100; obj.Reason = "Data Loaded Successfully."; obj.Details = data; } else { obj.Status = 102; obj.Reason = "Error Occured While Getting Status"; } return(obj); } catch (Exception ex) { Common_Energy_Error(ex.Message.ToString(), "http://122.252.251.175:8080/Praja_Transactions/service/getSPDCLServices/TranHistory", "2"); obj.Status = 102; obj.Reason = ThirdpartyMessage; return(obj); } }
public IHttpActionResult GetServiceStatus(dynamic data) { string value = token_gen.Authorize_aesdecrpty(data); try { //string value = JsonConvert.SerializeObject(data); AppStatus rootobj = JsonConvert.DeserializeObject <AppStatus>(value); return(Ok(enerhel.GetServiceStatus_helper(rootobj))); } catch (Exception ex) { CatchData.Status = 102; CatchData.Reason = EnergyHelper.ThirdpartyMessage; return(Ok(CatchData)); } }