ok bulk add num porte

This commit is contained in:
zaccaria.majid
2023-05-19 10:46:39 +02:00
parent 725b847770
commit 5fb1f3a170
5 changed files with 27 additions and 15 deletions
@@ -216,7 +216,7 @@ namespace WebDoorCreator.Data.Controllers
/// <param name="doorId">Record id to edit or add</param>
/// <param name="isAdd">States if it has to be added or removing a door</param>
/// <returns></returns>
public async Task<bool> DoorModQty(int doorId, bool isAdd)
public async Task<bool> DoorModQty(int NewQty, int doorId, bool isAdd)
{
/* crea nuovo metodo per modifica singola quantità porta: DOORMODQTY */
bool fatto = false;
@@ -231,7 +231,11 @@ namespace WebDoorCreator.Data.Controllers
.FirstOrDefault();
if (currRec != null) //if is not null edit the record found
{
if (isAdd)
if (NewQty > 0)
{
currRec.Quantity = NewQty;
}
else if (isAdd)
{
currRec.Quantity = currRec.Quantity + 1;
}