ok bulk add num porte
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user