Ejemplo n.º 1
0
        public ActionResult Delete(string id = null)
        {
            CourseList         cList = new CourseList();
            List <CourseClass> obj   = cList.GetCourseClasses(id);

            return(View(obj.FirstOrDefault()));
        }
Ejemplo n.º 2
0
        // GET: Course
        public ActionResult Index(string strSearch)
        {
            CourseList         cList = new CourseList();
            List <CourseClass> obj   = cList.GetCourseClasses(string.Empty).OrderBy(x => x.Id_Course).ToList();

            if (!string.IsNullOrEmpty(strSearch))
            {
                obj = obj.Where(x => x.Name.Contains(strSearch)).ToList();
            }
            @ViewBag.strSearch = strSearch;
            return(View(obj));
        }