public ActionResult RemoveAddress(int Aid) { Customer c = Session["ActiveCustomer"] as Customer; CustomerModelManager cmM = new CustomerModelManager(); cmM.RemoveAddressById(Aid); return(RedirectToAction("CustomerAddresses")); }
public ActionResult AddAddress(AddressModel a) { Customer c = Session["ActiveCustomer"] as Customer; CustomerModelManager cmM = new CustomerModelManager(); cmM.AddNewAddress(c.Customer_ID, a); return(RedirectToAction("ShowAvailableAddresses")); }
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)); }
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"); }
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")); }
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()); }