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

            return(View(ViewComponentPath.ViewPath("Category", "_CategoryTable"), new CategoriesTableViewModel
            {
                Categories = Categories
            }));
        }
Beispiel #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
            }));
        }
Beispiel #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>()
            }));
        }
        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()
            }));
        }
Beispiel #5
0
 public async Task <IViewComponentResult> InvokeAsync()
 {
     return(View(ViewComponentPath.ViewPath("Expense", "_ExpenseDataTable")));
 }