public bool ValidateQuantity()
        {
            var handler = OnValidateQuantity;

            if (handler != null)
            {
                OperationDetailArgs args = new OperationDetailArgs();
                handler(this, args);
                if (args.Result != null)
                {
                    return(args.Result.Value);
                }
            }

            return(ValidateQuantityValue());
        }
        public bool CanAutoProduceItem()
        {
            var handler = OnAutoProduceRequest;

            if (handler != null)
            {
                OperationDetailArgs args = new OperationDetailArgs();
                handler(this, args);
                if (args.Cancelled)
                {
                    return(false);
                }
            }

            return(true);
        }
        public bool CanChangePriceFromQuickSale()
        {
            var handler = OnQuickSaleChangePriceRequest;

            if (handler != null)
            {
                OperationDetailArgs args = new OperationDetailArgs();
                handler(this, args);
                if (args.Cancelled)
                {
                    return(false);
                }
            }

            return(true);
        }
        public bool CheckPurchaseSalePrices(double purchasePrice, double salePrice)
        {
            var handler = OnCheckPricesRequest;

            if (handler != null)
            {
                OperationDetailArgs args = new OperationDetailArgs();
                handler(this, args);
                if (args.Result != null)
                {
                    return(args.Result.Value);
                }
            }

            if (!BusinessDomain.AppConfiguration.WarnPricesSaleLowerThanPurchase || purchasePrice <= salePrice)
            {
                return(true);
            }

            return(false);
        }