示例#1
0
        private void Fetch(int session_code, IDataReader source)
        {
            try
            {
                _base.CopyValues(source);

                if (Childs)
                {
                    AccionCorrectora.LOCK(AppContext.ActiveSchema.Code);

                    string      query  = AccionesCorrectoras.SELECT_BY_INFORME_CORRECTOR(this.Oid);
                    IDataReader reader = nHManager.Instance.SQLNativeSelect(query, Session(session_code));
                    _acciones = AccionesCorrectoras.GetChildList(reader);

                    NotificacionInterna.LOCK(AppContext.ActiveSchema.Code);

                    query           = NotificacionesInternas.SELECT_BY_INFORME_CORRECTOR(this.Oid, TipoNotificacionAsociado.INFORME_ACCIONES_CORRECTORAS);
                    reader          = nHManager.Instance.SQLNativeSelect(query, Session(session_code));
                    _notificaciones = NotificacionesInternas.GetChildList(reader);
                }
            }
            catch (Exception ex)
            {
                iQExceptionHandler.TreatException(ex);
            }

            MarkOld();
        }
示例#2
0
        // called to retrieve data from the database
        private void DataPortal_Fetch(CriteriaEx criteria)
        {
            try
            {
                SessionCode = criteria.SessionCode;

                Childs = criteria.Childs;

                if (nHMng.UseDirectSQL)
                {
                    InformeCorrector.LOCK(AppContext.ActiveSchema.Code);

                    IDataReader reader = InformeCorrector.DoSELECT(AppContext.ActiveSchema.Code, Session(), criteria.Oid);

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

                    if (Childs)
                    {
                        AccionCorrectora.LOCK(AppContext.ActiveSchema.Code);

                        string query = AccionesCorrectoras.SELECT_BY_INFORME_CORRECTOR(this.Oid);
                        reader    = nHManager.Instance.SQLNativeSelect(query, Session());
                        _acciones = AccionesCorrectoras.GetChildList(reader);

                        NotificacionInterna.LOCK(AppContext.ActiveSchema.Code);

                        query           = NotificacionesInternas.SELECT_BY_INFORME_CORRECTOR(this.Oid, TipoNotificacionAsociado.INFORME_ACCIONES_CORRECTORAS);
                        reader          = nHManager.Instance.SQLNativeSelect(query, Session());
                        _notificaciones = NotificacionesInternas.GetChildList(reader);
                    }
                }
            }
            catch (Exception ex)
            {
                if (Transaction() != null)
                {
                    Transaction().Rollback();
                }
                iQExceptionHandler.TreatException(ex);
            }
        }