Ejemplo n.º 1
0
        public static List <Problema> List(FiltroProblema f)
        {
            List <Problema> resulList = new List <Problema>();

            try
            {
                ProblemaDS dataservice = new ProblemaDS();
                DataSet    listado     = dataservice.List(f);

                if (listado.Tables.Count > 0)
                {
                    foreach (DataRow d in listado.Tables[0].Rows)
                    {
                        Problema p = new Problema();
                        ORM(p, d);
                        resulList.Add(p);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(resulList);
        }
Ejemplo n.º 2
0
        public static List <Problema> ListAll()
        {
            FiltroProblema f = new FiltroProblema();

            f.OrderBY = " order by DESCRIPCION ";
            return(List(f));
        }
Ejemplo n.º 3
0
        public override DataSet List(Filter f, out int RecordCount)
        {
            DataSet resultSet = new DataSet();

            try
            {
                FiltroProblema filtro     = (FiltroProblema)f;
                DBRepository   repository = DBRepository.GetDbRepository();

                List <IDbDataParameter> paramList = new List <IDbDataParameter>();

                paramList.Add(repository.DbFactory.getDataParameter("P_ID", DbType.Int32, filtro.ID));

                repository.ExecuteListProcedure(CONST_LIST_PROCEDURE_NAME, paramList, f, resultSet, out RecordCount);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(resultSet);
        }