예제 #1
0
        public async Task <IViewComponentResult> InvokeAsync(string view = "MyMovement")
        {
            switch (view)
            {
            case "MyMovement":
            {
                var model = cmService.Select_ToDo();
                return(await Task.FromResult <IViewComponentResult>(View(view, model)));
            }

            case "MovementCount":
            {
                var model = cmService.Select_ToDoCount();
                return(await Task.FromResult <IViewComponentResult>(View(view, model)));
            }

            default:
                return(null);
            }
        }
예제 #2
0
        public IActionResult MyMovment_LoadData(IDataTablesRequest request)
        {
            var data = service.Select_ToDo();

            return(request.GetResponse(data.AsQueryable()));
        }