public GuesstimateVersionGetRes GetGuesstimateVersions([FromBody] GuesstimateGetReq request) { var response = new GuesstimateVersionGetRes(); try { if (!string.IsNullOrEmpty(request.QRFID)) { List <GuesstimateVersion> result = _guesstimateRepository.GetGuesstimateVersions(request); response.ResponseStatus.Status = "Success"; response.ResponseStatus.ErrorMessage = result != null ? "" : "No Records Found."; response.GuesstimateVersions = result; } else { response.ResponseStatus.Status = "Failure"; response.ResponseStatus.ErrorMessage = "QRFId can not be Null/Zero."; } } catch (Exception ex) { response.ResponseStatus.Status = "Failure"; response.ResponseStatus.ErrorMessage = "An Error Occurs :- " + ex.Message; } return(response); }
public async Task <GuesstimateVersionGetRes> GetGuesstimateVersions(GuesstimateGetReq guesstimateGetReq, string ticket) { GuesstimateVersionGetRes guesstimateGetRes = new GuesstimateVersionGetRes(); guesstimateGetRes = await serviceProxy.PostData(_configuration.GetValue <string>("ServiceGuesstimate:GetGuesstimateVersions"), guesstimateGetReq, typeof(GuesstimateVersionGetRes), ticket); return(guesstimateGetRes); }
public IActionResult GetGuesstimateVersions(string QRFID) { try { GuesstimateVersionGetRes response = new GuesstimateVersionGetRes(); GuesstimateGetReq request = new GuesstimateGetReq(); request.QRFID = QRFID; response = coProviders.GetGuesstimateVersions(request, token).Result; return(PartialView("_GuesstimateVersion", response.GuesstimateVersions)); } catch (Exception ex) { throw; return(View()); } }