Пример #1
0
        public static dynamic addMember(householdMappingModel obj)
        {
            dynamic objdata = new ExpandoObject();

            try
            {
                gswsModel objGsws = new gswsModel();
                objGsws.type = "7";
                objGsws.uid  = obj.uidNum;
                DataTable dt = routerModule.householdMappingProc(objGsws);
                if (dt != null && dt.Rows.Count > 0)
                {
                    objdata.status = true;
                    objdata.result = dt;
                }
                else
                {
                    objdata.status = false;
                    objdata.result = "No data available for this aadhaar number...";
                }
            }
            catch (Exception ex)
            {
                objdata.status = 500;
                objdata.result = ex.Message.ToString();
                return(objdata);
            }
            return(objdata);
        }
Пример #2
0
        public static dynamic clusterList(householdMappingModel obj)
        {
            dynamic objdata = new ExpandoObject();

            try
            {
                gswsModel objGsws = new gswsModel();
                objGsws.type = "9";
                objGsws.uid  = obj.gsws_code;
                DataTable dt = routerModule.householdMappingProc(objGsws);
                if (dt != null && dt.Rows.Count > 0)
                {
                    objdata.status = true;
                    objdata.result = dt;
                }
                else
                {
                    objdata.status = false;
                    objdata.result = "No clusters available for this secretariat...";
                }
            }
            catch (Exception ex)
            {
                objdata.status = 500;
                objdata.result = ex.Message.ToString();
                return(objdata);
            }
            return(objdata);
        }
Пример #3
0
        public static DataTable householdMappingProc(gswsModel obj)
        {
            try
            {
                List <inputModel> listInputObj = new List <inputModel>();


                inputModel inputObj = new inputModel();
                inputObj.paramName = "ptype"; inputObj.value = obj.type; inputObj.dataType = "Varchar2";
                listInputObj.Add(inputObj);
                inputModel inputObj1 = new inputModel();
                inputObj1.paramName = "puid"; inputObj1.value = obj.uid; inputObj1.dataType = "Varchar2";
                listInputObj.Add(inputObj1);
                inputModel inputObj2 = new inputModel();
                inputObj2.paramName = "pration"; inputObj2.value = obj.rationId; inputObj2.dataType = "Varchar2";
                listInputObj.Add(inputObj2);
                inputModel inputObj3 = new inputModel();
                inputObj3.paramName = "phh_id"; inputObj3.value = obj.hhId; inputObj3.dataType = "Varchar2";
                listInputObj.Add(inputObj3);

                requestModel procObj = new requestModel();
                procObj.refcursorName = "p_cur";
                procObj.procedureName = "gsws_vv_hh_mapping_proc";
                procObj.inputs        = listInputObj;
                procObj.key           = key;
                string    json = JsonConvert.SerializeObject(procObj);
                DataTable dt   = dbRouter.POST_Request(gsws_oradb_prod, json);
                if (dt != null && dt.Rows.Count > 0)
                {
                    return(dt);
                }
                else
                {
                    return(new DataTable());
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }