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

19 lines
564 B
C#

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