public virtual UpdateBudgetPaymentConditionCommandResponse UpdateBudgetPaymentConditionCommand(UpdateBudgetPaymentConditionCommandRequest request) { var response = new UpdateBudgetPaymentConditionCommandResponse(); try { // Raise Initialization Event var initialization = UpdateBudgetPaymentConditionCommandInitialization; if (initialization != null) { initialization(request, response); } // Raise Execute Event var execute = UpdateBudgetPaymentConditionCommandExecute; if (execute != null) { response = execute(request); } // Raise Complete Event var complete = UpdateBudgetPaymentConditionCommandComplete; if (complete != null) { complete(request, response); } } catch (Exception exception) { // Raise Error Event var error = UpdateBudgetPaymentConditionCommandError; if (error != null) { error(request, response, exception); } } return(response); }
public void UpdateBudgetPaymentCondition(int budgetId, int paymentConditionCode) { var updateBudgetPaymentConditionCommandResponse = new UpdateBudgetPaymentConditionCommandResponse(); var req = new UpdateBudgetPaymentConditionCommandRequest() { UpdateBudgetPaymentConditionRequest = new UpdateBudgetPaymentConditionRequest() { BudgetId = budgetId, PaymentConditionCode = paymentConditionCode } }; updateBudgetPaymentConditionCommandResponse = base._foccoErpApiCommands.UpdateBudgetPaymentConditionCommand(req); if (!updateBudgetPaymentConditionCommandResponse.Success) { throw updateBudgetPaymentConditionCommandResponse.Exception; } if (updateBudgetPaymentConditionCommandResponse.UpdateBudgetPaymentConditionResponse == null || updateBudgetPaymentConditionCommandResponse.UpdateBudgetPaymentConditionResponse.BudgetPaymentCondition == null) { throw new Exception("Erro ao atualizar formas de pagamento"); } }
public override UpdateBudgetPaymentConditionCommandResponse OnUpdateBudgetPaymentConditionCommandExecute(UpdateBudgetPaymentConditionCommandRequest request) { var response = new UpdateBudgetPaymentConditionCommandResponse(); try { response.UpdateBudgetPaymentConditionResponse = _apiCommands.ApiUpdateBudgetPaymentCondition(request.UpdateBudgetPaymentConditionRequest); } catch (Exception ex) { response.Exception = ex; response.Message = ex.Message; } return(response); }