public async Task <GuesstimateSetRes> SetGuesstimateChangeRule(GuesstimateChangeRuleSetReq guesstimateCRSetReq, string ticket) { GuesstimateSetRes guesstimateSetRes = new GuesstimateSetRes(); guesstimateSetRes = await serviceProxy.PostData(_configuration.GetValue <string>("ServiceGuesstimate:SetGuesstimateChangeRule"), guesstimateCRSetReq, typeof(GuesstimateSetRes), ticket); return(guesstimateSetRes); }
public JsonResult SetGuesstimateChangeRule(string GuesstimateId, string ChangeRule, double?ChangeRulePercent) { GuesstimateSetRes response = new GuesstimateSetRes(); GuesstimateChangeRuleSetReq request = new GuesstimateChangeRuleSetReq(); request.GuesstimateId = GuesstimateId; request.ChangeRule = ChangeRule; request.ChangeRulePercent = ChangeRulePercent; request.EditUser = ckUserEmailId; response = coProviders.SetGuesstimateChangeRule(request, token).Result; if (response != null) { return(Json(response.ResponseStatus)); } return(Json("failure")); }
public async Task <GuesstimateSetRes> SetGuesstimateChangeRule([FromBody] GuesstimateChangeRuleSetReq request) { var response = new GuesstimateSetRes(); try { if (!string.IsNullOrEmpty(request.GuesstimateId)) { response = await _guesstimateRepository.SetGuesstimateChangeRule(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); }