1 回答

TA貢獻(xiàn)1872條經(jīng)驗(yàn) 獲得超4個(gè)贊
對(duì)問題進(jìn)行詳細(xì)討論后,發(fā)現(xiàn)存儲(chǔ)過程未正確返回 OUTPUT 參數(shù)。上述問題的最終解決方案需要修改代碼:
[HttpPost]
private IActionResult Stock([FromBody] List<spGetNewStockCountHeader_Result> jsonvalues)
{
ObjectParameter TransactionId = new ObjectParameter("TransactionId", typeof(Int32));
foreach (spGetNewStockCountHeader_Result Datastock in jsonvalues)
{
spGetNewStockCountHeader_Result Stockobject = new spGetNewStockCountHeader_Result();
Stockobject.UserID = Datastock.UserID;
Stockobject.created = Datastock.created;
Stockobject.CompanyID = Datastock.CompanyID;
Stockobject.modified = Datastock.modified;
Stockobject.modifieduserid = Datastock.modifieduserid;
Stockobject.confirm = Datastock.confirm;
Stockobject.ShopId = Datastock.ShopId;
enqentities.spGetNewStockCountHeader(Datastock.UserID, Datastock.created, Datastock.CompanyID, Datastock.modified, Datastock.modifieduserid, Datastock.confirm,Datastock.ShopId, TransactionId);
}
return Ok(new { data = TransactionId.Value});
}
在 Angular 應(yīng)用程序中獲取該TransactionId值后,您可以使用該值將其作為查詢字符串或 POST 正文中的參數(shù)發(fā)送到下一個(gè)方法。
- 1 回答
- 0 關(guān)注
- 135 瀏覽
添加回答
舉報(bào)