Exemple #1
0
        // called to retrieve data from db
        protected override void Fetch(CriteriaEx criteria)
        {
            this.RaiseListChangedEvents = false;

            SessionCode = criteria.SessionCode;
            Childs      = criteria.Childs;

            try
            {
                if (nHMng.UseDirectSQL)
                {
                    //RespuestaExamen.DoLOCK( Session());

                    IDataReader reader = RespuestaExamens.DoNativeSELECT(AppContext.ActiveSchema.Code, Session());

                    IsReadOnly = false;

                    while (reader.Read())
                    {
                        this.AddItem(RespuestaExamenInfo.Get(reader, Childs));
                    }

                    IsReadOnly = true;
                }
                else
                {
                    IList <RespuestaExamen> list = criteria.List <RespuestaExamen>();

                    if (list.Count > 0)
                    {
                        IsReadOnly = false;

                        foreach (RespuestaExamen item in list)
                        {
                            this.AddItem(item.GetInfo());
                        }

                        IsReadOnly = true;
                    }
                }
            }
            catch (Exception ex)
            {
                iQExceptionHandler.TreatException(ex);
            }

            this.RaiseListChangedEvents = true;
        }
Exemple #2
0
 public static string SELECT_BY_PREGUNTA_EXAMEN(long oid_pregunta, long oid_examen)
 {
     return(RespuestaExamens.SELECT_BY_PREGUNTA_EXAMEN(oid_pregunta, oid_examen, false));
 }