示例#1
0
        //
        // GET: /Home/
        public ActionResult Index()
        {
            var context = new SushiTest1Entities();
            ViewBag.Product = context.Products;

            return View();
        }
示例#2
0
        //
        // GET: /Home/

        public ActionResult Index()
        {
            var context = new SushiTest1Entities();

            ViewBag.Product = context.Products;

            return(View());
        }
示例#3
0
        public ActionResult CategorySortSup()
        {
            var context = new SushiTest1Entities();
            List<Product> list = context.Products.ToList();
            List<Product> tempList = new List<Product>();
            for (int i = 0; i < list.Count; i++)
            {
                var d = list[i];
                if (d.CategoryId == 4)
                {
                    tempList.Add(d);
                }
            }

            ViewBag.Rol = tempList;

            return View();
        }
示例#4
0
        public ActionResult CategorySort()
        {
            var            context  = new SushiTest1Entities();
            List <Product> list     = context.Products.ToList();
            List <Product> tempList = new List <Product>();

            for (int i = 0; i < list.Count; i++)
            {
                var d = list[i];
                if (d.CategoryId == 1)
                {
                    tempList.Add(d);
                }
            }

            ViewBag.Rol = tempList;
            return(View());
        }