Exemple #1
0
        public IEnumerable<Accountant> GetAccountantList(AccountantRequest request = null)
        {
            request = request ?? new AccountantRequest();
            using (var dbContext = new ProjectDbContext())
            {
                IQueryable<Accountant> Accountant = dbContext.Accountants;

                if (!string.IsNullOrEmpty(request.Name))
                    Accountant = Accountant.Where(u => u.Name.Contains(request.Name));

                return Accountant.OrderByDescending(u => u.ID).ToPagedList(request.PageIndex, request.PageSize);
            }
        }
    { //
        // GET: /Basisdata/Classification/

        public ActionResult Index(AccountantRequest request)
        {           
            var result = this.ProjectService.GetAccountantList(request);
            return View(result);
        }