public IHttpActionResult Education_ApplicationCheck(dynamic objCert)
        {
            string jsondata = token_gen.Authorize_aesdecrpty(objCert);

            try
            {
                S_W_Education obj = JsonConvert.DeserializeObject <S_W_Education>(jsondata);
                return(Ok(hlpval.Education_app_Check(obj)));
            }
            catch (Exception ex)
            {
                CatchData.Status = "Failure";
                CatchData.Reason = CommonSPHel.ThirdpartyMessage;
                return(Ok(CatchData));
            }
        }
Пример #2
0
        public dynamic Education_app_Check(S_W_Education objdata)
        {
            dynamic objdynamic = new ExpandoObject();

            try
            {
                var ObjCertificatecheck = "aadhar=" + objdata.Aadhaar.ToString() + "&acYear=" + objdata.Acadamicyear.ToString() + "&transId=12345&schemeId=" + objdata.Scheme.ToString();
                var CertData            = GetData <dynamic>("https://jnanabhumi.ap.gov.in/jnbWebservices/services/prajaSachivalayam/getBillStatus?userId=admin&password=jnb@dmin20!9&" + ObjCertificatecheck);
                var ResultData          = CertData;       // JsonConvert.DeserializeObject(CertData);


                if (ResultData.errorMsg == "No Data Found")
                {
                    objdynamic.Status          = "Failure";
                    objdynamic.Reason          = ResultData.errorMsg;
                    objdynamic.TrackingStatus  = "";
                    objdynamic.Deapartment     = "";
                    objdynamic.BeneficiaryID   = "";
                    objdynamic.BeneficiaryName = "";
                }
                else
                {
                    objdynamic.Status         = "Success";
                    objdynamic.Reason         = "Success";
                    objdynamic.TrackingStatus = ResultData.status;
                    objdynamic.Deapartment    = ResultData.department;

                    objdynamic.BeneficiaryID   = ResultData.benfificiaryId;
                    objdynamic.BeneficiaryName = ResultData.benfificiaryName;
                }
            }
            catch (Exception ex)
            {
                objdynamic.Status          = "Failure";
                objdynamic.Reason          = ThirdpartyMessage;
                objdynamic.TrackingStatus  = "";
                objdynamic.Deapartment     = "";
                objdynamic.BeneficiaryID   = "";
                objdynamic.BeneficiaryName = "";
            }

            return(objdynamic);
        }