public static dynamic subCasteList(casteModel obj)
        {
            dynamic objdata = new ExpandoObject();

            try
            {
                obj.type = "2";
                DataTable dt = casteProc(obj);

                if (dt != null && dt.Rows.Count > 0)
                {
                    objdata.status = true;
                    objdata.result = dt;
                }
                else
                {
                    objdata.status = false;
                    objdata.result = "Sub Castes Not Available to load !!!";
                }
            }
            catch (Exception ex)
            {
                objdata.status = false;
                objdata.result = ex.Message.ToString();
            }
            return(objdata);
        }
        public IHttpActionResult subCasteList(dynamic data)
        {
            dynamic objdata = new ExpandoObject();

            try
            {
                string     serialized_data = token_gen.Authorize_aesdecrpty(data);
                casteModel rootobj         = JsonConvert.DeserializeObject <casteModel>(serialized_data);
                return(Ok(pensionDeptHelper.subCasteList(rootobj)));
            }
            catch (Exception ex)
            {
                objdata.status = false;
                objdata.result = ex.Message.ToString();
            }
            return(Ok(objdata));
        }
 public static DataTable casteProc(casteModel obj)
 {
     try
     {
         OracleCommand cmd = new OracleCommand();
         cmd.InitialLONGFetchSize = 1000;
         cmd.CommandType          = CommandType.StoredProcedure;
         cmd.CommandText          = "CERT_CASTE_SUB_CASTE";
         cmd.Parameters.Add("P_TYPE", OracleDbType.Varchar2).Value         = obj.type;
         cmd.Parameters.Add("P_CASTE_CAT_ID", OracleDbType.Varchar2).Value = obj.casteId;
         cmd.Parameters.Add("P_SUB_CASTE_ID", OracleDbType.Varchar2).Value = obj.subCasteId;
         cmd.Parameters.Add("p_cur", OracleDbType.RefCursor).Direction     = ParameterDirection.Output;
         DataTable dtstatus = _Hel.GetProdgswsDataAdapter(cmd);
         return(dtstatus);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        //UAT URLs


        #region DA Login

        public static dynamic personDetails(EndorsementListModel obj)
        {
            dynamic objdata = new ExpandoObject();

            try
            {
                obj.password = "******";
                obj.userName = "******";
                string pensionResponse = string.Empty;
                try
                {
                    pensionResponse = POST_RequestAsync(personDetailsUrl, JsonConvert.SerializeObject(obj));
                }
                catch (Exception ex)
                {
                    objdata.status = false;
                    objdata.result = "RESPONSE FROM PENSION DEPT : " + ex.Message.ToString();
                    return(objdata);
                }
                if (string.IsNullOrEmpty(pensionResponse))
                {
                    objdata.status = false;
                    objdata.result = "No Response from pension department service !!!, Please try after some time";
                    return(objdata);
                }

                PanchayatMastersModel panchayatReq = new PanchayatMastersModel();
                panchayatReq.flag          = "S";
                panchayatReq.password      = "******";
                panchayatReq.secretariatId = obj.secId;
                panchayatReq.userName      = "******";
                string panchayatResponse = string.Empty;
                try
                {
                    panchayatResponse = POST_RequestAsync(panchayatMasterUrl, JsonConvert.SerializeObject(panchayatReq));
                }
                catch (Exception ex)
                {
                    objdata.status = false;
                    objdata.result = "RESPONSE FROM PENSION DEPT : " + ex.Message.ToString();
                    return(objdata);
                }
                panchayatResponseModel panchayatRespObj = JsonConvert.DeserializeObject <panchayatResponseModel>(panchayatResponse);
                if (string.IsNullOrEmpty(panchayatResponse) || panchayatRespObj.PanchayatList == null)
                {
                    objdata.status = false;
                    objdata.result = "No Response from pension department panchayat list service !!!, Please try after some time";
                    return(objdata);
                }


                pensionResponseModel pensionRespObj = JsonConvert.DeserializeObject <pensionResponseModel>(pensionResponse);
                if (pensionRespObj.responseCode == "102")
                {
                    casteModel objCaste = new casteModel();
                    objCaste.type = "1";
                    DataTable dt = casteProc(objCaste);
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        objdata.status        = true;
                        objdata.result        = pensionRespObj;
                        objdata.PanchayatList = panchayatRespObj.PanchayatList;
                        objdata.casteList     = dt;
                    }
                    else
                    {
                        objdata.status = false;
                        objdata.result = "Castes Not Available to load !!!";
                    }
                }
                else
                {
                    objdata.status = false;
                    objdata.result = "RESPONSE FROM PENSION DEPT : " + pensionRespObj.reason;
                }
            }
            catch (Exception ex)
            {
                objdata.status = false;
                objdata.result = ex.Message.ToString();
            }
            return(objdata);
        }