Esempio n. 1
0
        internal void CopyValues(PrecioTrayecto source)
        {
            if (source == null)
            {
                return;
            }

            _record.CopyValues(source._base.Record);
        }
Esempio n. 2
0
        /// <summary>
        /// Builds a PrecioTrayectoList
        /// </summary>
        /// <param name="list"></param>
        /// <returns>PrecioTrayectoList</returns>
        public static PrecioTrayectoList GetList(bool childs)
        {
            CriteriaEx criteria = PrecioTrayecto.GetCriteria(PrecioTrayecto.OpenSession());

            criteria.Childs = childs;

            criteria.Query = SELECT();

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

            CloseSession(criteria.SessionCode);
            return(list);
        }
Esempio n. 3
0
        // called to copy objects data from list
        private void Fetch(IDataReader reader)
        {
            this.RaiseListChangedEvents = false;

            IsReadOnly = false;

            while (reader.Read())
            {
                this.AddItem(PrecioTrayecto.GetChild(reader).GetInfo());
            }

            IsReadOnly = true;

            this.RaiseListChangedEvents = true;
        }
Esempio n. 4
0
        private void DataPortal_Fetch(CriteriaEx criteria)
        {
            try
            {
                _base.Record.Oid = 0;
                SessionCode      = criteria.SessionCode;
                Childs           = criteria.Childs;

                if (nHMng.UseDirectSQL)
                {
                    Naviera.DoLOCK(Session());
                    IDataReader reader = nHMng.SQLNativeSelect(criteria.Query, Session());

                    if (reader.Read())
                    {
                        CopyValues(reader);
                    }

                    if (Childs)
                    {
                        string query = string.Empty;

                        ProductoProveedor.DoLOCK(Session());
                        query  = ProductoProveedores.SELECT(this);
                        reader = nHMng.SQLNativeSelect(query, Session());
                        _base.ProviderBase.Productos = ProductoProveedores.GetChildList(SessionCode, reader);

                        PrecioTrayecto.DoLOCK(Session());
                        query             = Store.PrecioTrayectos.SELECT(this);
                        reader            = nHManager.Instance.SQLNativeSelect(query, Session());
                        _precio_trayectos = PrecioTrayectos.GetChildList(reader);

                        //Pago.DoLOCK(Session());
                        //query = Pagos.SELECT(this);
                        //reader = nHManager.Instance.SQLNativeSelect(query, Session());
                        //_proveedor_base._pagos = Pagos.GetChildList(SessionCode, reader);
                    }
                }
            }
            catch (Exception ex)
            {
                if (Transaction() != null)
                {
                    Transaction().Rollback();
                }
                iQExceptionHandler.TreatException(ex);
            }
        }
Esempio n. 5
0
 public static string SELECT(QueryConditions conditions)
 {
     return(PrecioTrayecto.SELECT(conditions, false));
 }