コード例 #1
0
        //private void RefreshComicsAvailable(bool status = true)
        //{
        //    if (status)
        //    {
        //        _comicsAvailable = _comicManager.RetrieveAvailableComics(status);
        //    }
        //}

        public void LoadCustomerPullList(Customer _customer)
        {
            try
            {
                _custPullList = _comicManager.PullListForCustomer(_customer.CustomerID);
            }
            catch (Exception ex)
            {
                MessageBox.Show("An error occurred" + ex.Message + ex.StackTrace);
            }
        }
コード例 #2
0
        // GET: Comics/PullList
        public ActionResult PullList()
        {
            this.ApplicationDbContext = new ApplicationDbContext();
            this.UserManager          = new UserManager <ApplicationUser>(new UserStore <ApplicationUser>(this.ApplicationDbContext));
            var    user  = UserManager.FindById(User.Identity.GetUserId());
            string email = user.Email;

            int?id = _customerManager.RetrieveCustomerIdByEmail(email);

            //var customerId = "";
            //customerId = _customerManager.CurrentCustomersList().Find(c => c.CustomerID == id);

            var pullList = _comicManager.PullListForCustomer(id);

            if (null == pullList)
            {
                ViewBag.Message = "Add comics to your pull list!";
                //return View(Index());
            }

            return(View(pullList));
        }
コード例 #3
0
        // GET: Customer/PullList
        public ActionResult PullList(int?id)
        {
            ComicManager _comicManager = new ComicManager();

            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var      pullList = _comicManager.PullListForCustomer(id);
            Customer customer = _customerManager.RetrieveCustomerByID(id);
            string   fName    = customer.FirstName;
            string   lName    = customer.LastName;

            ViewBag.Message = "Pull list for " + fName + " " + lName;

            if (null == pullList)
            {
                ViewBag.Message = "Customer has no pull list!";
            }

            return(View(pullList));
        }