Beispiel #1
0
        public ActionResult List()
        {
            using (var db = new XkSystem.Models.DbContext())
            {
                var vm = new Models.StudentHonorLevel.List();
                var tb = db.Table <Student.Entity.tbStudentHonorLevel>();

                if (!string.IsNullOrEmpty(vm.SearchText))
                {
                    tb = tb.Where(d => d.StudentHonorLevelName.Contains(vm.SearchText));
                }

                vm.StudentHonorLevelList = (from p in tb
                                            orderby p.No
                                            select p).ToList();

                return(View(vm));
            }
        }
Beispiel #2
0
 public ActionResult List(Models.StudentHonorLevel.List vm)
 {
     return(Code.MvcHelper.Post(null, Url.Action("List", new { searchText = vm.SearchText })));
 }