Exemplo n.º 1
0
        public bool SaveToStockIn(Stock stockIn)
        {
            if (stockIn != null)
            {
                if (stockIn.CompanyId == 0)
                {
                    throw new Exception("Select Company!");
                }
                if (stockIn.ItemId == 0)
                {
                    throw new Exception("Select Item!");
                }

                if (stockIn.Quantity == 0)
                {
                    throw new Exception("Insert quantity value!");
                }
                return(_stockInRepository.SaveToStockIn(stockIn));
            }
            return(false);
        }