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

            criteria.Childs = childs;

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

            CloseSession(criteria.SessionCode);
            return(list);
        }
Exemplo n.º 2
0
        public static InputInvoiceLineList GetChildList(InputInvoiceInfo parent, bool childs)
        {
            CriteriaEx criteria = InputInvoiceLine.GetCriteria(InputInvoiceLine.OpenSession());

            criteria.Query  = InputInvoiceLineList.SELECT(parent);
            criteria.Childs = childs;

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

            CloseSession(criteria.SessionCode);

            return(list);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Retrieve the complete list from db
        /// </summary>
        /// <param name="get_childs">retrieving the childs</param>
        /// <returns>ConceptoFacturaRecibidaList</returns>
        public static InputInvoiceLineList GetChildList(bool childs)
        {
            CriteriaEx criteria = InputInvoiceLine.GetCriteria(InputInvoiceLine.OpenSession());

            criteria.Childs = childs;

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

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

            CloseSession(criteria.SessionCode);
            return(list);
        }
Exemplo n.º 4
0
        public static InputInvoiceLineList GetChildList(IList <InputInvoiceLine> list)
        {
            InputInvoiceLineList flist = new InputInvoiceLineList();

            if (list != null)
            {
                int sessionCode = InputInvoiceLine.OpenSession();

                flist.IsReadOnly = false;

                foreach (InputInvoiceLine item in list)
                {
                    flist.AddItem(item.GetInfo());
                }

                flist.IsReadOnly = true;

                InputInvoiceLine.CloseSession(sessionCode);
            }

            return(flist);
        }