Example #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);
        }
Example #2
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;
        }
Example #3
0
 public static void ORM(Problema problema, DataRow dr)
 {
     problema._id = Int32.Parse(dr[ProblemaDS.COL_ID_PROBLEMA].ToString());
     problema.Desripcion = dr[ProblemaDS.COL_ID_DESCRIPCION].ToString();
     problema._estado = Int32.Parse(dr[ProblemaDS.COL_ID_ESTADADO].ToString())==ProblemaDS.ACTIVO;
 }
Example #4
0
 public static void ORM(Problema problema, DataRow dr)
 {
     problema._id        = Int32.Parse(dr[ProblemaDS.COL_ID_PROBLEMA].ToString());
     problema.Desripcion = dr[ProblemaDS.COL_ID_DESCRIPCION].ToString();
     problema._estado    = Int32.Parse(dr[ProblemaDS.COL_ID_ESTADADO].ToString()) == ProblemaDS.ACTIVO;
 }