using Microsoft.AspNetCore.Mvc; namespace CPRNIMS.WebApps.ViewComponents.PR { public class RRTableViewComponent : ViewComponent { public IViewComponentResult Invoke(int tableId) { // Set the correct view path based on the shippingInstructionId string viewName = tableId switch { 1 => "~/Views/Components/PRMgmt/Tables/FinanceTable.cshtml", _ => "~/Views/Components/PRMgmt/Tables/ReceiverTable.cshtml" }; return View(viewName); } } }