public void UpdateFAdetail(string faDetailJsonString) { FAdetailModel model = JsonConvert.DeserializeObject <FAdetailModel>(faDetailJsonString); ServiceInputObject serviceInputsForDocType = new ServiceInputObject { baseURL = ConfigSettings.WebApiBaseAddress, controllerName = "FAdetail", methodName = "UpdateFAdetailById" }; model.faDetailEntities.UpdatedBy = SessionManager.UserId; model.faDetailEntities.LastUpdated = DateTime.Now; int returnValue = ServiceMethods.GeneratePutRequestIntDestinationEntity <FAdetailEntities>(model.faDetailEntities, serviceInputsForDocType); }
public ActionResult AddFA() { FAdetailModel faDetailModel = new FAdetailModel(); faDetailModel.faDetailPageUIvalues = new FAdetailPageUIvalues(); faDetailModel.faDetailPageUIvalues = GetFAdetailPageUiValues(); faDetailModel.faDetailEntities = new FAdetailEntities(); faDetailModel.faDetailEntities.AddressDetailEntities = new FAaddressDetailEntities(); faDetailModel.faDetailEntities.ApprovalEntities = new FAapprovalEntities(); faDetailModel.faDetailEntities.EducationDetailEntityList = new List <FAeducationDetailEntities>(); FAeducationDetailEntities educationDetail = new FAeducationDetailEntities(); faDetailModel.faDetailEntities.EducationDetailEntityList.Add(educationDetail); faDetailModel.faDetailEntities.ExperienceDetailEntityList = new List <FAexperianceDetailEntities>(); FAexperianceDetailEntities experienceDetail = new FAexperianceDetailEntities(); faDetailModel.faDetailEntities.ExperienceDetailEntityList.Add(experienceDetail); faDetailModel.faDetailEntities.TargetDetailEntityList = new List <FAtargetDetailEntities>(); FAtargetDetailEntities targetDetail = new FAtargetDetailEntities(); faDetailModel.faDetailEntities.TargetDetailEntityList.Add(targetDetail); faDetailModel.faDetailEntities.TargetDetailEntityList.ToList().ForEach(x => { x.TargetCropsEntityMappingList = new List <FAtargetVillageMappingEntities>(); }); FAtargetVillageMappingEntities targetVillage = new FAtargetVillageMappingEntities(); faDetailModel.faDetailEntities.TargetDetailEntityList.ForEach(x => { x.TargetCropsEntityMappingList.Add(targetVillage); }); faDetailModel.faDetailEntities.UploadedDocumentList = new List <FAuploadedDocumentDetailEntities>(); FAuploadedDocumentDetailEntities uploadDocument = new FAuploadedDocumentDetailEntities(); faDetailModel.faDetailEntities.UploadedDocumentList.Add(uploadDocument); faDetailModel.faDetailPageUIvalues.DistrictList = new List <DistrictInfoEntities>(); faDetailModel.faDetailPageUIvalues.subDistrictList = new List <SubDistrictInfoEntities>(); faDetailModel.faDetailPageUIvalues.VillageList = new List <VillageInfoEntities>(); faDetailModel.ActionType = ActionTypeEnum.Insert; faDetailModel.faDetailEntities.EnrollDate = DateTime.Now; faDetailModel.faDetailEntities.IsExperienced = true; faDetailModel.faDetailEntities.Id = 0; return(View(faDetailModel)); }
public ActionResult UpdateFAdetail(int id) { FAdetailModel faDetailModel = new FAdetailModel(); faDetailModel.faDetailPageUIvalues = new FAdetailPageUIvalues(); ServiceInputObject serviceInputsForDocType = new ServiceInputObject { baseURL = ConfigSettings.WebApiBaseAddress, controllerName = "FAdetail", methodName = "GetFAdetailEntityById", parameterValue = Convert.ToString(id) }; FAdetailEntities faDetailEntity = new FAdetailEntities(); faDetailEntity = ServiceMethods.GenerateGatRequest <FAdetailEntities>(serviceInputsForDocType); faDetailModel.faDetailPageUIvalues = GetFAdetailPageUiValues(); faDetailModel.faDetailPageUIvalues = SetPocketDetailForModel(faDetailEntity.pocketDetail, faDetailEntity.AddressDetailEntities, faDetailModel.faDetailPageUIvalues); faDetailModel.faDetailEntities = faDetailEntity; faDetailModel.ActionType = ActionTypeEnum.Update; return(View("AddFA", faDetailModel)); }