Exemplo n.º 1
0
        private static ModeloList GetList(string query, bool childs)
        {
            CriteriaEx criteria = OutputInvoice.GetCriteria(OutputInvoice.OpenSession());

            criteria.Childs = childs;

            criteria.Query = query;
            ModeloList list = DataPortal.Fetch <ModeloList>(criteria);

            CloseSession(criteria.SessionCode);
            return(list);
        }
Exemplo n.º 2
0
        public static FacREAList GetNoCobradas()
        {
            CriteriaEx criteria = OutputInvoice.GetCriteria(OutputInvoice.OpenSession());

            criteria.Childs = false;

            if (nHManager.Instance.UseDirectSQL)
            {
                criteria.Query = FacREAList.SELECT_NO_COBRADAS();
            }

            FacREAList list = DataPortal.Fetch <FacREAList>(criteria);

            CloseSession(criteria.SessionCode);
            return(list);
        }
Exemplo n.º 3
0
        public static REAResumen Get(Expedient expediente)
        {
            CriteriaEx criteria = OutputInvoice.GetCriteria(OutputInvoice.OpenSession());

            if (nHManager.Instance.UseDirectSQL)
            {
                criteria.Query = REAResumen.SELECT(expediente);
            }

            OutputInvoice.BeginTransaction(criteria.Session);

            REAResumen obj = DataPortal.Fetch <REAResumen>(criteria);

            OutputInvoice.CloseSession(criteria.SessionCode);
            return(obj);
        }
Exemplo n.º 4
0
        public static FacREAList GetListByCobro(long oid_cobro)
        {
            CriteriaEx criteria = OutputInvoice.GetCriteria(OutputInvoice.OpenSession());

            criteria.Childs = false;

            //No criteria. Retrieve all de List
            if (nHManager.Instance.UseDirectSQL)
            {
                criteria.Query = FacREAList.SELECT_BY_COBRO(oid_cobro);
            }

            FacREAList list = DataPortal.Fetch <FacREAList>(criteria);

            CloseSession(criteria.SessionCode);
            return(list);
        }
Exemplo n.º 5
0
        internal static Loans GetChildList(int sessionCode, string query, bool childs)
        {
            if (!Loan.CanEditObject())
            {
                throw new System.Security.SecurityException(Library.Resources.Messages.USER_NOT_ALLOWED);
            }

            CriteriaEx criteria = OutputInvoice.GetCriteria(sessionCode);

            criteria.Childs = childs;

            if (nHManager.Instance.UseDirectSQL)
            {
                criteria.Query = query;
            }

            return(DataPortal.Fetch <Loans>(criteria));
        }