Exemplo n.º 1
0
        public List <BSP_Ticket> ObtenerPorSemana(long SemanaID)
        {
            List <BSP_Ticket> lstReturn = new List <BSP_Ticket>();

            List <SqlCeParameter> lstParameters = new List <SqlCeParameter>();

            lstParameters.Add(new SqlCeParameter("SemanaID", SemanaID));

            lstReturn = GetByParameters(lstParameters);

            Conceptos       Conceptos = new Conceptos(this.conn);
            List <Concepto> conceptos = Conceptos.GetAll();

            Companias       Companias = new Companias(this.conn);
            List <Compania> companias = Companias.GetAll();

            BSP_Ticket_Detalles BSP_Ticket_Detalles = new BSP_Ticket_Detalles(this.conn);

            lstReturn.ForEach(x =>
            {
                x.Concepto = conceptos.Find(y => y.ID == x.Concepto.ID);
                x.Compania = companias.Find(y => y.ID == x.Compania.ID);
                x.Detalle  = BSP_Ticket_Detalles.ObtenerPorTicket(x.ID);
            });

            return(lstReturn);
        }
Exemplo n.º 2
0
        public List <BO_Ticket> ObtenerPorSemana(long SemanaID)
        {
            List <BO_Ticket> lstReturn = new List <BO_Ticket>();

            List <SqlCeParameter> lstParameters = new List <SqlCeParameter>();

            lstParameters.Add(new SqlCeParameter("SemanaID", SemanaID));

            lstReturn = GetByParameters(lstParameters);
            Companias       Companias    = new Companias(this.conn);
            List <Compania> lstCompanias = Companias.GetAll();

            lstReturn.ForEach(x => {
                Compania oCompania = lstCompanias.Find(y => y.Codigo == x.Compania.Codigo);
                if (oCompania != null)
                {
                    x.Compania = oCompania;
                }
            });

            return(lstReturn);
        }