Exemplo n.º 1
0
        public DAL.StudentDAL Student = new DAL.StudentDAL(); //dal
        // GET: Student
        public ActionResult Index(string searchName, int?page)
        {
            //if (page == null)
            //{
            //    page = 1;
            //}
            IList <DAL.StudentDAL> AllStudent = bll.getAll();

            //ViewBag.pages = bll.getAll().Count() / 2;
            //if (page != null)
            //{
            //    int firsrStdList = (int)page - 1 + ((int)page) - 1;
            //    AllStudent.Add(bll.getAll().ElementAt(firsrStdList));
            //    AllStudent.Add(bll.getAll().ElementAt(firsrStdList + 1));
            //};
            if (searchName != null)
            {
                AllStudent = bll.Search(searchName);
            }
            return(View(AllStudent));
        }