Beispiel #1
0
        public ActionResult RemoveAddress(int Aid)
        {
            Customer             c   = Session["ActiveCustomer"] as Customer;
            CustomerModelManager cmM = new CustomerModelManager();

            cmM.RemoveAddressById(Aid);
            return(RedirectToAction("CustomerAddresses"));
        }
Beispiel #2
0
        public ActionResult AddAddress(AddressModel a)
        {
            Customer             c   = Session["ActiveCustomer"] as Customer;
            CustomerModelManager cmM = new CustomerModelManager();

            cmM.AddNewAddress(c.Customer_ID, a);
            return(RedirectToAction("ShowAvailableAddresses"));
        }
Beispiel #3
0
        public ActionResult OrderSummary()
        {
            IEnumerable <ProductModel> ie = Session["ie"] as IEnumerable <ProductModel>;
            Customer             c        = Session["ActiveCustomer"] as Customer;
            CustomerModelManager cmM      = new CustomerModelManager();
            AddressModel         a        = cmM.FetchAddressById(c.ShippingAddressId);

            return(View(a));
        }
Beispiel #4
0
        public void AddToWishList(int Pid)
        {
            Customer             c   = Session["ActiveCustomer"] as Customer;
            CustomerModelManager cmM = new CustomerModelManager();

            cmM.AddPidToWishList(c.Customer_ID, Pid);
            //return RedirectToAction("DisplayProduct", "Search",new { Pid } );
            //return RedirectToAction("DisplayCart");
        }
Beispiel #5
0
        public ActionResult ChangeShippingAddress(int ShippingAddressId)
        {
            Customer             c   = Session["ActiveCustomer"] as Customer;
            CustomerModelManager cmM = new CustomerModelManager();

            c.ShippingAddressId = ShippingAddressId;
            cmM.UpdateShippingAddress(c);
            Session["ActiveCustomer"] = c;
            return(RedirectToAction("OrderSummary", "Cart"));
        }
Beispiel #6
0
        public ActionResult ShowAvailableAddresses()
        {
            Customer             c    = Session["ActiveCustomer"] as Customer;
            CustomerModelManager cmM  = new CustomerModelManager();
            List <AddressModel>  lstC = cmM.GetAvailableAddresses(c.Customer_ID);

            ViewBag.lstC = lstC;
            //return View(c.ShippingAddressId);
            return(View());
        }