示例#1
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            List <Category> Categories = (categoryService.GetCategories())?.ToList();

            return(View(ViewComponentPath.ViewPath("Category", "_CategoryTable"), new CategoriesTableViewModel
            {
                Categories = Categories
            }));
        }
示例#2
0
        public async Task <IViewComponentResult> InvokeAsync(int ClassId)
        {
            List <Student> students = GetStudentsByClassId(ClassId).ToList();

            return(View(ViewComponentPath.ViewPath("Home", "_StudentsTable"), new StudentsTableViewModel
            {
                ClassId = ClassId,
                Students = students
            }));
        }
示例#3
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            List <Category> categories = expenseService.GetCategories().ToList();

            return(View(ViewComponentPath.ViewPath("Expense", "_InsertUpdateExpense"), new InsertUpdateExpenseViewModel
            {
                CategorySelectListItems = Dropdown.From(categories),
                CategoryDropdown = categories.ToList <DropdownItem>()
            }));
        }
示例#4
0
        public async Task <IViewComponentResult> InvokeAsync(int CategoryId)
        {
            List <Category> categories = subCategoryService.GetCategories().ToList();

            return(View(ViewComponentPath.ViewPath("SubCategory", "_SubCategoryTable"), new SubCategoriesTableViewModel
            {
                CategorySelectListItems = Dropdown.From(categories),
                CategoryId = CategoryId,
                SubCategories = subCategoryService.GetSubcategoriesByCategoryID(CategoryId).ToList()
            }));
        }
示例#5
0
 public async Task <IViewComponentResult> InvokeAsync()
 {
     return(View(ViewComponentPath.ViewPath("Expense", "_ExpenseDataTable")));
 }