コード例 #1
0
        public RedirectToRouteResult AddElectrobillToCheckout(Checkout order, ElectroBill electroBill, string returnUrl)
        {
            if (electroBill != null)
            {
                if (order.chosenTariff == null)
                {
                    order.chosenTariff = tariffRepo.Tariffs
                        .FirstOrDefault(p => p.Id != null);

                }

                order.InitCalc(new ValueCalculator());
                order.SetElectro(electroBill);
            }
            return RedirectToAction("Index", new { returnUrl });
        }