public ActionResult MyRegister(Customer customer)
        {
            if (ModelState.IsValid)
            {
                using (ShoppingCartEntities db = new ShoppingCartEntities())
                {
                    db.Customers.Add(customer);
                    db.SaveChanges();

                }
            }

            return RedirectToAction("Index");
        }
        public ActionResult AddToOrder()
        {
            var db = new ShoppingCartEntities();
            if (GetCart() != null)
            {
                var orther = new Orther
                {
                     Amout =  GetCart().SubTotal(),
                      DateOrdered=DateTime.Now,
                       Status = "Chưa thanh toán"

                };
            db.Orthers.Add(orther);
            db.SaveChanges();
            Session.Abandon();
                return RedirectToAction("Index");
            }
             return RedirectToAction("Index");
        }
        public ActionResult Login(Customer cus, string returnUrl)
        {
            using (ShoppingCartEntities db = new ShoppingCartEntities())
            {
                var v = db.Customers.Where(a => a.Email.Equals(cus.Email) && a.Password.Equals(cus.Password)).FirstOrDefault();
                if (v != null)
                {
                    Session["Customer"] = v;
                    Session["UserName"] = v.Name.ToString();
                    Session["Login"] = true;
                    return RedirectToLocal(returnUrl);
                }
                else
                {
                    ModelState.AddModelError("", "Invalid username or password.");
                }
            }

            return View(cus);
        }