示例#1
0
        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");
                }
            }
        }
示例#2
0
        public string SaveStockIn(StockIn aStockIn)
        {
            int rowAffected = aStockInGateway.SaveStockIn(aStockIn);

            if (rowAffected > 0)
            {
                return("Save Successfull.");
            }
            return("Save Failed.");
        }
示例#3
0
        public string SaveStockIn(StockIn stockIn)
        {
            bool isSavedStockIn = stockInGateway.SaveStockIn(stockIn);

            if (isSavedStockIn)
            {
                return("Stock in saved successfully");
            }

            else
            {
                return("Failed to save");
            }
        }