public ActionResult Search(int BrandID, int ProductTypeID)
        {
            IndexItemViewModel vm = new IndexItemViewModel();

            vm.Items       = data.GetAllItem(BrandID, ProductTypeID);
            vm.Brands      = ConvertToSelectListItemBrand(bData.GetAllBrand());
            vm.ProductType = ConvertToSelectListItemTypes(pData.GetAllProductType());

            return(View("Index", vm));
        }
        // GET: Item
        public ActionResult Index()
        {
            IndexItemViewModel vm = new IndexItemViewModel();

            vm.Items       = data.GetAllItem(0, 0);
            vm.Brands      = ConvertToSelectListItemBrand(bData.GetAllBrand());
            vm.ProductType = ConvertToSelectListItemTypes(pData.GetAllProductType());

            return(View(vm));
        }
Пример #3
0
        // GET: Admin
        public ActionResult Index()
        {
            IndexItemViewModel model = new IndexItemViewModel();

            using (var db = new ApplicationDbContext())
            {
                model.texts   = db.Texts.Include("Admin").Include("Category").Take(5).ToList();
                model.commets = db.Commets.Include("Text").Take(5).ToList();
            }

            return(View(model));
        }
Пример #4
0
        //public IActionResult Index()
        //{
        //    return View();
        //}

        public IActionResult Index(PortalIndexViewModel model)
        {
            //var orders = _dbContext.Orders.Where(x => x.DateTime == DateTime.Today).ToList();

            var orders = _dbContext.Orders.ToList();

            //PortalIndexViewModel thingy = new PortalIndexViewModel();

            foreach (var item in orders)
            {
                var d = new IndexItemViewModel
                {
                    OrderLine = GenerateSandwichString(ConvertStringToInt(item.OrderLine)),
                    DateTime  = item.DateTime,
                    Email     = item.Email
                };
                model.items.Add(d);
            }

            return(View(model));
        }