示例#1
0
        public virtual ListPricesResponse ListPrices(ListPricesRequest request)
        {
            var response = new ListPricesResponse();

            try {
                // Raise Initialization Event
                var initialization = ListPricesInitialization;
                if (initialization != null)
                {
                    initialization(request, response);
                }
                // Raise Execute Event
                var execute = ListPricesExecute;
                if (execute != null)
                {
                    response = execute(request);
                }
                // Raise Complete Event
                var complete = ListPricesComplete;
                if (complete != null)
                {
                    complete(request, response);
                }
            }
            catch (Exception exception) {
                // Raise Error Event
                var error = ListPricesError;
                if (error != null)
                {
                    error(request, response, exception);
                }
            }
            return(response);
        }
示例#2
0
        public override ListPricesResponse OnListPricesExecute(ListPricesRequest request)
        {
            var budgetFactory = new BudgetFactory();
            var response      = new ListPricesResponse();

            try
            {
                response.ListPrices = budgetFactory.CreateBudget(request.Items, request.ClientCode, request.CnpjCpf, true, true);
            }
            catch (Exception ex)
            {
                response.Exception = ex;
                response.Message   = ex.Message;
            }

            return(response);
        }
示例#3
0
 public abstract ListPricesResponse OnListPricesExecute(ListPricesRequest request);