コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 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());
     }
 }