示例#1
0
        /*----------------------------------------------------------------------------------------------------------*/
        public async Task <List <KeyValuePair <string, string> > > AgentListarCombos(Business objNegocioBE)
        {
            using (SqlConnection cn = new SqlConnection(this.stringConexion))
            {
                await cn.OpenAsync();

                AgentDatos objAgentDA = new AgentDatos();
                return(await objAgentDA.AgentListarCombos(cn, objNegocioBE));
            }
        }
示例#2
0
        public override async Task <int> Delete(Agent Item)
        {
            int rpta = -1;

            using (SqlConnection cn = new SqlConnection(this.stringConexion))
            {
                await cn.OpenAsync();

                AgentDatos oAgentDatos = new AgentDatos();
                rpta = await oAgentDatos.Delete(cn, Item);
            }
            return(rpta);
        }
示例#3
0
        public async Task <Agent> listarBoss(Agent Item)
        {
            Agent oAgent = null;

            using (SqlConnection cn = new SqlConnection(this.stringConexion))
            {
                await cn.OpenAsync();

                AgentDatos oAgentDatos = new AgentDatos();
                oAgent = await oAgentDatos.listarSupervisores(cn, Item);
            }
            return(oAgent);
        }
示例#4
0
        public override async Task <Agent> Find(Agent Item)
        {
            Agent oAgent = null;

            using (SqlConnection cn = new SqlConnection(this.stringConexion))
            {
                await cn.OpenAsync();

                AgentDatos oAgentDatos = new AgentDatos();
                oAgent = await oAgentDatos.Find(cn, Item);
            }
            return(oAgent);
        }
示例#5
0
        public async Task <IEnumerable <Agent> > GetElementsForBusiness(int pkbusiness)
        {
            IEnumerable <Agent> lAgent = null;

            try
            {
                using (SqlConnection cn = new SqlConnection(this.stringConexion))
                {
                    await cn.OpenAsync();

                    AgentDatos oAgentDatos = new AgentDatos();
                    lAgent = await oAgentDatos.GetElementsForBusiness(cn, pkbusiness);
                }
            }
            catch (Exception ex)
            {
                lAgent = null;
                throw ex;
            }

            return(lAgent);
        }
示例#6
0
        public async Task <IEnumerable <Agent> > RetrieveBossXAgent(Agent Item)
        {
            IEnumerable <Agent> lAgent = null;

            try
            {
                using (SqlConnection cn = new SqlConnection(this.stringConexion))
                {
                    await cn.OpenAsync();

                    AgentDatos oAgentDatos = new AgentDatos();
                    lAgent = await oAgentDatos.RetrieveBossXAgent(cn, Item);
                }
            }
            catch (Exception ex)
            {
                lAgent = null;
                throw ex;
            }

            return(lAgent);
        }