public dynamic GetApplicantStatus(PENSIONModel oj) { dynamic obj = new ExpandoObject(); try { DataTable dt = GetApplicantStatus_helper(oj); if (dt != null && dt.Rows.Count > 0) { obj.Status = "Success"; obj.Reason = ""; obj.Details = dt; } else { obj.Status = "Failure"; obj.Reason = "No Data Found"; } } catch (Exception ex) { obj.Status = "Failure"; obj.Reason = ThirdpartyMessage; } return(obj); }
public DataTable GetApplicantStatus_helper(PENSIONModel oj) { try { cmd = new OracleCommand(); cmd.InitialLONGFetchSize = 1000; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "gsws_sp_check_status"; cmd.Parameters.Add("ftype", OracleDbType.Varchar2, 12).Value = "1"; cmd.Parameters.Add("fdpart_id ", OracleDbType.Varchar2, 20).Value = oj.PID; cmd.Parameters.Add("fadhar_no", OracleDbType.Varchar2, 20).Value = oj.UID; cmd.Parameters.Add("P_CUR", OracleDbType.RefCursor).Direction = ParameterDirection.Output; DataTable dtstatus = comhel.GetgswsDataAdapter(cmd); if (dtstatus != null && dtstatus.Rows.Count > 0) { return(dtstatus); } else { return(null); } } catch (Exception ex) { string mappath = HttpContext.Current.Server.MapPath("PENSIONExceptionLogs"); Task WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_ReportLog_Exception(mappath, "Error From GetApplicantStatus:" + ex.Message.ToString())); throw ex; } }
public IHttpActionResult GetApplicantStatus(dynamic data) { string value = token_gen.Authorize_aesdecrpty(data); try { // //string value = JsonConvert.SerializeObject(data); PENSIONModel rootobj = JsonConvert.DeserializeObject <PENSIONModel>(value); return(Ok(SERPhel.GetApplicantStatus(rootobj))); } catch (Exception ex) { CatchData.Status = "Failure"; CatchData.Reason = SERPHelper.ThirdpartyMessage; return(Ok(CatchData)); } }