Beispiel #1
0
        public ActionResult Delete(string id = null)
        {
            TrainerList         tList = new TrainerList();
            List <TrainerClass> obj   = tList.GetTrainerClasses(id);

            return(View(obj.FirstOrDefault()));
        }
Beispiel #2
0
        // GET: Trainer
        public ActionResult Index(string strSearch)
        {
            TrainerList         tList = new TrainerList();
            List <TrainerClass> obj   = tList.GetTrainerClasses(string.Empty).OrderBy(x => x.Id_Trainer).ToList();

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