public IActionResult UpdateProjectInfo([FromBody] ProjectDetailInfo projectDetailInfo) { bool res = false; Entity.ProjectInfo projectInfo = projectDetailInfo; List <HeatStep> heatSteps = new List <HeatStep>(); heatSteps.Add(projectDetailInfo.heatStep1); heatSteps.Add(projectDetailInfo.heatStep2); heatSteps.Add(projectDetailInfo.heatStep3); heatSteps.Add(projectDetailInfo.heatStep4); List <TmSig> tmSigs = new List <TmSig>(); tmSigs.Add(projectDetailInfo.tmSig1); tmSigs.Add(projectDetailInfo.tmSig2); tmSigs.Add(projectDetailInfo.tmSig3); tmSigs.Add(projectDetailInfo.tmSig4); List <Pid> pids = new List <Pid>(); pids.Add(projectDetailInfo.pid1); pids.Add(projectDetailInfo.pid2); res = _projectInfoService.Update(projectInfo); res &= _heatStepService.Update(heatSteps); res &= _tmSigService.Update(tmSigs); res &= _pidService.Update(pids); return(Json(res)); }
public ResponseResult <bool> Edit([FromBody] ProjectInfoEditDto model) { return(_projectInfoService.Update(model).Success()); }