public string SaveStockIn(StockIn stockIn) { bool isItemExist = stockInGateway.IsItemExist(stockIn.ItemId); if (isItemExist) { int rowAffect = stockInGateway.UpdateAvailableQuantityByItem(stockIn); if (rowAffect > 0) { return("Stocked in successfully"); } else { return("Stocked in failed"); } } else { int rowAffect = stockInGateway.SaveStockIn(stockIn); if (rowAffect > 0) { return("Stocked in successfully"); } else { return("Stocked in failed"); } } }
public string SaveStockIn(StockIn aStockIn) { int rowAffected = aStockInGateway.SaveStockIn(aStockIn); if (rowAffected > 0) { return("Save Successfull."); } return("Save Failed."); }
public string SaveStockIn(StockIn stockIn) { bool isSavedStockIn = stockInGateway.SaveStockIn(stockIn); if (isSavedStockIn) { return("Stock in saved successfully"); } else { return("Failed to save"); } }