Пример #1
0
 public ActionResult CloseBuyingSession(BuyingSessionModel buyingSessionObj)
 {
     //if (buyingSessionObj.paymentId == 0)
     //{
     //    return Index("Please chose some payment method.");
     //}
     return(BuyingSessionModel.CloseBuyingSession() ? Index("Session closed with sucess!") : Index("You can not close a session without products."));
 }
Пример #2
0
        public ActionResult Index(string msg)
        {
            BuyingSessionModel model = BuyingSessionModel.GetBuyingSession();

            model.disponibleProductsList = ProductModel.List();
            ViewBag.PaymentMethodModel   = new SelectList(PaymentMethodModel.List(), "paymentMethodId", "paymentMethodDescription");
            ViewBag.Script = msg;
            return(View("Index", model));
        }
Пример #3
0
 public ActionResult RemoveProduct(int id)
 {
     BuyingSessionModel.RemoveProduct(id);
     return(RedirectToAction("Index", "Home"));
 }