NonInventPurchasingSystem/CPRNIMS.WebApps/ViewComponents/POMgmt/POTableVC.cs
2026-01-20 07:44:30 +08:00

19 lines
574 B
C#

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