/// <summary>
        ///  This returns to us a commission agent object.
        /// </summary>
        /// <param name="queryDictionary">Dictionary of fields to be included in the query.</param>
        /// <param name="commissionAgentId">Agent id to be fetched</param>
        /// <returns>The commission agent list.</returns>
        public async Task <ICommissionAgent> GetCommissionAgentDo(string commissionAgentId, IDictionary <string, string> queryDictionary = null)
        {
            IDictionary <string, string> queries;

            logger.Debug("GetCommissionAgentData Object");
            if (queryDictionary == null)
            {
                queries = base.baseQueryDictionary;
            }
            else
            {
                queries = queryDictionary;
            }
            CommissionAgentFactory agentFactory = CommissionAgentFactory.GetFactory(_sqlExecutor);
            ICommissionAgent       createdAgent = await agentFactory.GetCommissionAgent(queries, commissionAgentId);

            return(createdAgent);
        }
Beispiel #2
0
        public async Task Should_Load_Commission_Agent_ByFactory()
        {
            IDictionary <string, string> fields = new Dictionary <string, string>();
            string numComi = "0000002";

            fields.Add(CommissionAgent.Comisio, "COMISIO, NUM_COMI, PERSONA, NIF, TIPOCOMI, " +
                       "VENDE_COMI, MERCADO, NEGOCIO, CANAL, CLAVEPPTO, " +
                       "ORIGEN_COMI, ZONAOFI, direccion, cp, poblacion, " +
                       "provincia, nacioper, telefono, fax, " +
                       "Movil, alta_comi, baja_comi, idioma, IATA, IVASINO, " +
                       "RETENSINO, NACIONAL, CONCEPTOS_COND, AGENCIA, TRADUCE_WS, " +
                       "TRUCK_RENTAL_BROKER, COMBUS_PREPAGO_COMI, NO_GENERAR_AUTOFAC, " +
                       "TODOS_EXTRAS, NO_GESTIONAR_CUPO, AUTO_ONEWAY, COT_INCLUIDOS_SIN_GRUPO, " +
                       "ACCESO_PREMIUM, NO_MAIL_RES, AUTOFAC_SIN_IVA, " +
                       "COMISION_SIN_IVA_COM");
            CommissionAgentFactory agentFactory = CommissionAgentFactory.GetFactory(_sqlExecutor);

            Assert.NotNull(agentFactory);
            ICommissionAgent createdAgent = await agentFactory.GetCommissionAgent(fields, numComi);

            Assert.NotNull(createdAgent);
        }