示例#1
0
        public async Task <GuesstimateSetRes> UpdateGuesstimateVersion(GuesstimateVersionSetReq guesstimateSetReq, string ticket)
        {
            GuesstimateSetRes guesstimateSetRes = new GuesstimateSetRes();

            guesstimateSetRes = await serviceProxy.PostData(_configuration.GetValue <string>("ServiceGuesstimate:UpdateGuesstimateVersion"), guesstimateSetReq, typeof(GuesstimateSetRes), ticket);

            return(guesstimateSetRes);
        }
        public JsonResult UpdateGuesstimateVersion(string QRFID, string GuesstimateId)
        {
            GuesstimateSetRes        response = new GuesstimateSetRes();
            GuesstimateVersionSetReq request  = new GuesstimateVersionSetReq();

            request.QRFID         = QRFID;
            request.GuesstimateId = GuesstimateId;
            request.EditUser      = ckUserEmailId;
            response = coProviders.UpdateGuesstimateVersion(request, token).Result;

            if (response != null)
            {
                return(Json(response.ResponseStatus));
            }
            return(Json("failure"));
        }
        public async Task <GuesstimateSetRes> UpdateGuesstimateVersion([FromBody] GuesstimateVersionSetReq request)
        {
            var response = new GuesstimateSetRes();

            try
            {
                if (!string.IsNullOrEmpty(request.QRFID))
                {
                    response = await _guesstimateRepository.UpdateGuesstimateVersion(request);
                }
                else
                {
                    response.ResponseStatus.Status       = "Failure";
                    response.ResponseStatus.ErrorMessage = "Details can not be blank.";
                }
            }
            catch (Exception ex)
            {
                response.ResponseStatus.Status       = "Failure";
                response.ResponseStatus.ErrorMessage = "An Error Occurs :- " + ex.Message;
            }
            return(response);
        }