Beispiel #1
0
        public virtual ActionResult Quote(Domain.Model.Quote model)
        {
            QuoteService srv = new QuoteService(_commandProcessor, _queryProcessor, _currentUserFactory);

            if (Request.IsAjaxRequest())
            {
                if (model.ContractCalculations != null)
                {
                    foreach (EWS.Domain.Model.QuoteCalculation calc in model.ContractCalculations)
                    {
                        calc.QuoteCalculationItems = srv.Recalculate(calc, calc.QuoteCalculationItems, model.StartDate);
                    }
                }
                else
                {
                    model = srv.GetModel <Domain.Model.Quote>(model.Id);
                }
                return(View("_", model.ContractCalculations));
            }
            else
            {
                srv.SaveQuote(model);
            }


            return(RedirectToActionPermanent(MVC.Quote.FinaliseQuote(model.Id)));
        }
Beispiel #2
0
        public virtual ActionResult Quote(int QuoteID)
        {
            QuoteService srv = new QuoteService(_commandProcessor, _queryProcessor, _currentUserFactory);

            Domain.Model.Quote model = srv.GetModel <Domain.Model.Quote>(QuoteID);
            return(View(model));
        }