public DataTable GetUidspandanaDetails(RevenueModel oj) { try { cmd = new OracleCommand(); cmd.InitialLONGFetchSize = 1000; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "pss_details_meekosam"; cmd.Parameters.Add("ftype", OracleDbType.Varchar2, 12).Value = "1"; cmd.Parameters.Add("fuid_num", OracleDbType.Varchar2, 20).Value = oj.UID; cmd.Parameters.Add("P_CUR", OracleDbType.RefCursor).Direction = ParameterDirection.Output; DataTable dtstatus = comhel.GetspsDataAdapter(cmd); if (dtstatus != null && dtstatus.Rows.Count > 0) { return(dtstatus); } else { return(null); } } catch (Exception ex) { string mappath = HttpContext.Current.Server.MapPath("RevenueExceptionLogs"); Task WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_ReportLog_Exception(mappath, "Error From GetApplicantStatus:" + ex.Message.ToString())); throw ex; } }
public DataTable get_Pension_SP(RevenueModel oj) { try { cmd = new OracleCommand(); cmd.InitialLONGFetchSize = 1000; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "ap_rd_pension.gsws_check_status_pension"; cmd.Parameters.Add("ftype", OracleDbType.Varchar2, 12).Value = "2"; cmd.Parameters.Add("fdpart_id ", OracleDbType.Varchar2, 20).Value = oj.RID; cmd.Parameters.Add("fadhar_no", OracleDbType.Varchar2, 20).Value = oj.UID; cmd.Parameters.Add("P_CUR", OracleDbType.RefCursor).Direction = ParameterDirection.Output; DataTable dtstatus = comhel.GetsrdhDataAdapter(cmd); if (dtstatus != null && dtstatus.Rows.Count > 0) { return(dtstatus); } else { return(null); } } catch (Exception ex) { string mappath = HttpContext.Current.Server.MapPath("RevenueExceptionLogs"); 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); RevenueModel rootobj = JsonConvert.DeserializeObject <RevenueModel>(value); if (Utils.IsAlphaNumeric(rootobj.RID) && Utils.IsAlphaNumeric(rootobj.UID)) { return(Ok(Revenuehel.GetApplicantStatus(rootobj))); } else { dynamic RData = new ExpandoObject(); RData.status = 102; RData.Reason = "Special Characters Not Allowed."; return(Ok(RData)); } } catch (Exception ex) { CatchData.Status = 102; CatchData.Reason = CommonSPHel.ThirdpartyMessage; return(Ok(CatchData)); } }
public dynamic GetUIDSPadanaDetails(RevenueModel oj) { dynamic obj = new ExpandoObject(); RevenueSPHelper Revenuesphel = new RevenueSPHelper(); DataTable dt = new DataTable(); try { dt = Revenuesphel.GetUidspandanaDetails(oj); if (dt != null && dt.Rows.Count > 0) { obj.Status = "100"; obj.Reason = ""; obj.Details = dt; } else { obj.Status = "102"; obj.Reason = "No Data Found"; } } catch (Exception ex) { obj.Status = "Failure"; obj.Reason = CommonSPHel.ThirdpartyMessage; } return(obj); }
public dynamic GetApplicantStatus(RevenueModel oj) { dynamic obj = new ExpandoObject(); try { var tokendata = getRiceCardToken(); if (tokendata.StatusCode == 200 && !string.IsNullOrEmpty(tokendata.Token)) { var ricedata = new EncryptDecrypt().GetspandanaData("https://www.spandana.ap.gov.in/api/GsGw/GetRiceCardStatusByDocId/" + oj.UID, tokendata.Token); dynamic objdata = JsonConvert.DeserializeObject <dynamic>(ricedata); obj.Status = 100; obj.Reason = ""; obj.Details = objdata; } else { obj.Status = 102; obj.Reason = CommonSPHel.ThirdpartyMessage; } } catch (Exception ex) { Common_Revenue_Error(ex.Message.ToString(), "https://www.spandana.ap.gov.in/api/GsGw/GetRiceCardStatusByDocId/", "2"); string mappath = HttpContext.Current.Server.MapPath("RiceCardTokenLogs"); Task WriteTask = Task.Factory.StartNew(() => new Logdatafile().Write_ReportLog_Exception(mappath, "Error From Rice Cards Token:" + ex.Message.ToString())); obj.Status = 102; obj.Reason = CommonSPHel.ThirdpartyMessage; } return(obj); }
public IHttpActionResult GetSpandanaUIDDetails(dynamic data) { string value = token_gen.Authorize_aesdecrpty(data); try { //string value = JsonConvert.SerializeObject(data); RevenueModel rootobj = JsonConvert.DeserializeObject <RevenueModel>(value); return(Ok(Revenuehel.GetUIDSPadanaDetails(rootobj))); } catch (Exception ex) { CatchData.Status = "Failure"; CatchData.Reason = CommonSPHel.ThirdpartyMessage; return(Ok(CatchData)); } }