//Called when a customer clicks the account tab public ActionResult Customer() { categoryList = new List<string>(); Customer tmpCustomer = new Customer(); //Get all catagories from db and store them in a view variable Book.SelectDistinctCategories(categoryList); ViewData["categories"] = categoryList; //Check to see if a customer is logged in if (Session["custId"] != null) { //Gets a customer row from the db with the specified customer id tmpCustomer.SelectByAttr("customer_id", (int)Session["custId"]); ViewData["status"] = "Customer profile for: " + tmpCustomer.f_name; } else { ViewData["status"] = "Please login to view account profile."; } return View(tmpCustomer); }
public ActionResult CompleteCheckOut() { int custId = (int)Session["custId"]; Customer tmpCustomer = new Customer(); tmpCustomer.SelectByAttr("customer_id", custId); return View(tmpCustomer); }