Ejemplo n.º 1
0
        public string ItemSave(StockIn stockIn)
        {
            int rowAffect = stockInGateway.StockSave(stockIn);

            if (rowAffect > 0)
            {
                return("Saved Sucessfull");
            }
            else
            {
                return("Save Faild");
            }
        }
        public string StockSaveUpdate(StockIn stockIn)
        {
            if (stockInGateway.StockUpdate(stockIn) > 0)
            {
                int available = stockIn.AvailableQuantity;
                stockIn.StockInQuantity += available;
                int rowAffect = stockInGateway.StockUpdate(stockIn);

                if (rowAffect > 0)
                {
                    return("Stock Update");
                }
                else
                {
                    return("Update Failed");
                }
            }

            else
            {
                int rowAffect = stockInGateway.StockSave(stockIn);
                if (rowAffect > 0)
                {
                    return("Stock Saved");
                }
                else
                {
                    return("Save Failed");
                }
            }
        }