public async Task <IViewComponentResult> InvokeAsync() { List <Category> Categories = (categoryService.GetCategories())?.ToList(); return(View(ViewComponentPath.ViewPath("Category", "_CategoryTable"), new CategoriesTableViewModel { Categories = Categories })); }
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 })); }
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() })); }
public async Task <IViewComponentResult> InvokeAsync() { return(View(ViewComponentPath.ViewPath("Expense", "_ExpenseDataTable"))); }