private static OutputInvoiceLineList GetList(string query, bool childs)
        {
            CriteriaEx criteria = OutputInvoiceLine.GetCriteria(OutputInvoiceLine.OpenSession());

            criteria.Childs = childs;

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

            CloseSession(criteria.SessionCode);
            return(list);
        }
        public static OutputInvoiceLineList GetChildList(OutputInvoiceInfo parent, bool childs)
        {
            CriteriaEx criteria = OutputInvoiceLine.GetCriteria(OutputInvoiceLine.OpenSession());

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

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

            list.CloseSession();

            return(list);
        }
        public static long GetCountByExpediente(long oid_exp)
        {
            CriteriaEx criteria = OutputInvoiceLine.GetCriteria(OutputInvoiceLine.OpenSession());

            criteria.Childs = false;

            criteria.Query = OutputInvoiceLine.COUNT_BY_EXPEDIENTE(oid_exp);
            IDataReader reader = nHManager.Instance.SQLNativeSelect(criteria.Query, criteria.Session);

            reader.Read();
            long cuenta = Convert.ToInt64(reader["CUENTA"]);

            CloseSession(criteria.SessionCode);
            return(cuenta);
        }
        /// <summary>
        /// Retrieve the complete list from db
        /// </summary>
        /// <param name="get_childs">retrieving the childs</param>
        /// <returns>ConceptoFacturaList</returns>
        public static OutputInvoiceLineList GetChildList(bool childs)
        {
            CriteriaEx criteria = OutputInvoiceLine.GetCriteria(OutputInvoiceLine.OpenSession());

            criteria.Childs = childs;

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

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

            CloseSession(criteria.SessionCode);
            return(list);
        }
        public static OutputInvoiceLineList GetListByExpediente(long oidExpedient, bool childs)
        {
            CriteriaEx criteria = OutputInvoiceLine.GetCriteria(OutputInvoiceLine.OpenSession());

            criteria.Childs = childs;

            Library.Invoice.QueryConditions conditions = new Library.Invoice.QueryConditions {
                Expediente = ExpedientInfo.New(oidExpedient)
            };
            criteria.Query = OutputInvoiceLineList.SELECT(conditions);

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

            CloseSession(criteria.SessionCode);

            return(list);
        }
Ejemplo n.º 6
0
        public void CopyValues(OutputInvoiceLine source)
        {
            if (source == null)
            {
                return;
            }

            _record.CopyValues(source.Base.Record);

            _oid_almacen     = source.OidAlmacen;
            _store           = source.Almacen;
            _store_id        = source.StoreID;
            _expediente      = source.Expediente;
            _cuenta_contable = source.CuentaContable;
            _n_factura       = source.NFactura;
            _fecha_factura   = source.FechaFactura;
            _cliente         = source.Cliente;
        }
 public static string SELECT(Library.Invoice.QueryConditions conditions)
 {
     return(OutputInvoiceLine.SELECT(conditions, false));
 }
 public static string SELECT()
 {
     return(OutputInvoiceLine.SELECT(new QueryConditions(), false));
 }
Ejemplo n.º 9
0
 public void CopyFrom(OutputInvoiceLine source)
 {
     _base.CopyValues(source);
 }