Пример #1
0
 public ActionResult Shipping()
 {
     if (Session["GioHang"] != null)
     {
         KhachHang khachHang = (KhachHang)Session["KhachHang"];
         if (khachHang != null)
         {
             GioHang  gioHang  = (GioHang)Session["GioHang"];
             FGioHang fGioHang = new FGioHang();
             GioHang  ngiohang = fGioHang.Update(gioHang.ID, khachHang.TenKH, khachHang.SDT, khachHang.Email, khachHang.DiaChi);
             Session["GioHang"] = ngiohang;
             return(View(ngiohang));
         }
         else
         {
             if (((GioHang)Session["GioHang"]).TenKH == null)
             {
                 return(View());
             }
             else
             {
                 GioHang gioHang = (GioHang)Session["GioHang"];
                 return(View(gioHang));
             }
         }
     }
     else
     {
         return(RedirectToAction("Home"));
     }
 }
Пример #2
0
        public ActionResult Payment(string name, string phone, string mail, string address)
        {
            FGioHang fGioHang = new FGioHang();

            Session["GioHang"] = fGioHang.Update(((GioHang)Session["GioHang"]).ID, name, phone, mail, address);
            ViewBag.GioHang    = (GioHang)Session["GioHang"];
            return(View());
        }