public ActionResult ListHopDongChuyen()
        {
            if (this.CheckNoAccessIntoNhaXe(_workContext, _permissionService, StandardPermissionProvider.CVHoatDongBanVe))
            {
                return(AccessDeniedView());
            }
            var model = new ListHopdongChuyenModels();

            return(View(model));
        }
        public ActionResult ListHopDongChuyen(DataSourceRequest command, ListHopdongChuyenModels model)
        {
            if (this.CheckNoAccessIntoNhaXe(_workContext, _permissionService, StandardPermissionProvider.CVHoatDongBanVe))
            {
                return(AccessDeniedView());
            }

            var items     = _hopdongchuyenService.GetAllHopDongChuyen(_workContext.NhaXeId, model.BienSoXe, model.SoHopDong, command.Page - 1, command.PageSize);
            var gridModel = new DataSourceResult
            {
                Data = items.Select(x =>
                {
                    var khachhangs = _hopdongchuyenService.GetAllKhachHangByHopDongId(x.Id);
                    var m          = x.toModel(_localizationService, khachhangs);
                    return(m);
                }),
                Total = items.TotalCount
            };

            return(Json(gridModel));
        }