public NewQuoteViewModel GetRoutingDetails(string QRFID) { NewQuoteViewModel model = new NewQuoteViewModel(); try { model.mdlQuoteRoutingViewModel = new QuoteRoutingViewModel(); model.mdlQuoteRoutingViewModel.QRFID = QRFID; SalesQRFMapping salesQRFMapping = new SalesQRFMapping(_configuration); RoutingGetReq routingGetReq = new RoutingGetReq(); routingGetReq.QRFID = QRFID; SalesProviders objSalesProvider = new SalesProviders(_configuration); RoutingGetRes routingGetRes = objSalesProvider.getQRFRoutingDetails(routingGetReq, token).Result; model.mdlQuoteRoutingViewModel = salesQRFMapping.QRFRoutingGet(routingGetRes, token); } catch (Exception ex) { throw; } return(model); }
public IActionResult QuoteRouting(QuoteRoutingViewModel model) { SalesQRFMapping salesQRFMapping = new SalesQRFMapping(_configuration); RoutingSetReq routingSetReq = new RoutingSetReq(); model.SubStep = "Routing"; routingSetReq = salesQRFMapping.QRFRoutingSet(model, ckUserEmailId); routingSetReq.VoyagerUserId = ckLoginUser_Id; SalesProviders objSalesProvider = new SalesProviders(_configuration); RoutingSetRes objQuoteSearchRes = objSalesProvider.SetQRFRoutingDetails(routingSetReq, token).Result; if (objQuoteSearchRes.ResponseStatus.Status.ToLower() == "success") { TempData["success"] = "Routing details saved successfully"; } else { TempData["error"] = objQuoteSearchRes.ResponseStatus.ErrorMessage; } return(RedirectToAction("NewQuote", new { QRFId = model.QRFID, SubStep = model.SubStep })); }