Ejemplo n.º 1
0
        private void Fetch(IDataReader source)
        {
            _base.CopyValues(source);

            if (Childs)
            {
                if (nHMng.UseDirectSQL)
                {
                    WorkReportResource.DoLOCK(Session());
                    string      query  = WorkReportResources.SELECT(this);
                    IDataReader reader = nHMng.SQLNativeSelect(query);
                    _lines = WorkReportResources.GetChildList(SessionCode, reader);
                }
            }

            MarkOld();
        }
Ejemplo n.º 2
0
        private void DataPortal_Fetch(CriteriaEx criteria)
        {
            try
            {
                Oid         = 0;
                SessionCode = criteria.SessionCode;
                Childs      = criteria.Childs;

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

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

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

                        //WorkReportResource.DoLOCK(Session());
                        query  = WorkReportResources.SELECT(this);
                        reader = nHMng.SQLNativeSelect(query);
                        _lines = WorkReportResources.GetChildList(SessionCode, reader);
                    }
                }

                MarkOld();
            }
            catch (Exception ex)
            {
                if (Transaction() != null)
                {
                    Transaction().Rollback();
                }
                iQExceptionHandler.TreatException(ex, new object[] { criteria.Query });
            }
        }