public ActionResult GetPocketInitialValues() { ServiceInputObject serviceObject = new ServiceInputObject { baseURL = ConfigSettings.WebApiBaseAddress, controllerName = "Pocket", methodName = "GetPocketPageUIvalues" }; PocketPageUIvalues pageUiValues = ServiceMethods.GenerateGatRequest <PocketPageUIvalues>(serviceObject); PocketDropdownValueForAddPage dropdownValue = new PocketDropdownValueForAddPage(); dropdownValue.states = CommonOperations.BindDropdwon <StateInfoEntities>(pageUiValues.states, "StateID", "StateName"); dropdownValue.crops = CommonOperations.BindDropdwon <CropInfoEntities>(pageUiValues.crops, "CropID", "CropName"); dropdownValue.fertilizers = CommonOperations.BindDropdwon <FertilizerInfoEntities>(pageUiValues.fertilizers, "Id", "Fertilizer"); dropdownValue.pocketStatusList = CommonOperations.BindDropdwon <PocketStatusEntities>(pageUiValues.pocketStatusList, "Id", "PocketStatus"); return(Json(dropdownValue)); }
public ActionResult GetPageUIvaluesForPocket(string pocketId) { pocketId = Convert.ToString(JsonConvert.DeserializeObject <int>(pocketId)); ServiceInputObject serviceInputObject = new ServiceInputObject { baseURL = ConfigSettings.WebApiBaseAddress, controllerName = "FarmerDetail", methodName = "GetPocketMappingData", parameterValue = pocketId }; FarmerDetailPageUIvalues pageUIvalues = ServiceMethods.GenerateGatRequest <FarmerDetailPageUIvalues>(serviceInputObject); PocketDropdownValueForAddPage dropdownValue = new PocketDropdownValueForAddPage(); dropdownValue.crops = CommonOperations.BindDropdwon <CropInfoEntities>(pageUIvalues.CropList, "CropID", "CropName"); dropdownValue.villages = CommonOperations.BindDropdwon <VillageInfoEntities>(pageUIvalues.villageList, "VillageID", "VILLAGE"); return(Json(dropdownValue)); }