public ActionResult Index(BillingInfo info) { CheckoutModel model = new CheckoutModel() { Info = new CheckoutInfo { BillingInfo = info } }; // get Cart list items from sesion var sesionList = (List<CartItem>)Session["CART_SESSION"]; CartModel cartModel = new CartModel(); if (sesionList != null) { cartModel.get_Item_Details(sesionList); } else { List<CartItem> list = new List<CartItem>(); cartModel.itemList = list; } model.Info.CartItems = cartModel.itemList; // create orders var helper = new Cart_CheckoutModel(); try { helper.Create_Order_Infomation(model.Info); ViewBag.isSuccess = true; } catch (Exception ex) { ViewBag.isSuccess = false; } return View("ThongBao"); }
public CartModel() { model = new Cart_CheckoutModel(); }