public dynamic RIDSAppStatus(AnimalCls oj) { dynamic obj = new ExpandoObject(); try { Animal.AHAServices ser = new Animal.AHAServices(); var data = ser.GetRIDSApplicationDetails(oj.UniqueNo, oj.Type); dynamic objroot = JsonConvert.DeserializeObject <dynamic>(data); if (objroot != null) { obj.Status = 100; obj.Reason = "Data Getting Successfully."; obj.Details = objroot; } else { obj.Status = 101; obj.Reason = "No Data Found"; } } catch (WebException wex) { string mappath = HttpContext.Current.Server.MapPath("AnimalHusbandryLogs"); Task WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_ReportLog_Exception(mappath, "Error Gettting RIDS Application Status Data API:" + wex.Message.ToString())); obj.Status = 102; obj.Reason = FisheriesHelper.ThirdpartyMessage; } return(obj); }
public IHttpActionResult LLCSAppStatus(dynamic data) { string value = token_gen.Authorize_aesdecrpty(data); try { AnimalCls rootobj = JsonConvert.DeserializeObject <AnimalCls>(value); if (Utils.IsAlphaNumeric(rootobj.UniqueNo)) { return(Ok(fihel.LLCSAppStatus(rootobj))); } else { CatchData.Status = 102; CatchData.Reason = "Special Characters are Not Allowed"; return(Ok(CatchData)); } } catch (Exception ex) { CatchData.Status = 102; CatchData.Reason = FisheriesHelper.ThirdpartyMessage; return(Ok(CatchData)); } }