Exemplo n.º 1
0
        public ProductValidationDto ValidateSaveProduct(ProductDto dto)
        {
            ProductValidationDto validProduct = new ProductValidationDto();


            var type = Type.GetType(string.Format("{0}.{1}", "PL.Business.IOBalanceV2.ProductSalesRules", "PDashZeroOne"));
            IValidateProduct productRule = (IValidateProduct)Activator.CreateInstance(type);

            validProduct = productRule.SaveProduct(dto);

            return(validProduct);
        }
Exemplo n.º 2
0
        public ProductValidationDto SaveProduct(ProductDto dto)
        {
            ProductValidationDto errorList = new ProductValidationDto();

            errorList.IsSuccess = true;

            //if (dto.Quantity > 1)
            //{
            //    errorList.ErrorMessage = "Quantity should be only be one";
            //    errorList.IsSuccess = false;
            //}

            return(errorList);
        }