Esempio n. 1
0
        public Collection <PersonaModel> GetPersonaByID()
        {
            PersonaModel personaModel = new PersonaModel
            {
                IdPersona = 1,
                Apellido  = "Shark",
                Nombre    = "Quintuss",
                Direccion = "Zona 1",
                FecNac    = DateTime.Now
            };
            PersonaReader             persona = new PersonaReader(QuerysRepo.TipoQuery.PorId, personaModel);
            Collection <PersonaModel> people  = persona.Execute();

            return(people);
        }
Esempio n. 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         PersonaReader             reader   = new PersonaReader();
         Collection <PersonaModel> personas = reader.Execute();
         foreach (PersonaModel p in personas)
         {
             MessageBox.Show(string.Format("{0}, {1}, {2}", p.Nombre, p.Apellido, p.Direccion));
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 3
0
        private void Button1_Click(object sender, EventArgs e)
        {
            PersonaModel personaModel = new PersonaModel();

            //personaModel.IdPersona = 1;
            personaModel.Apellido  = "Shark";
            personaModel.Nombre    = "Quintuss";
            personaModel.Direccion = "Zona 1";
            //personaModel.FecNac = DateTime.Now;
            PersonaReader             reader = new PersonaReader(QuerysRepo.TipoQuery.AddRow, personaModel);
            Collection <PersonaModel> people = reader.Execute();

            foreach (PersonaModel p in people)
            {
                MessageBox.Show(string.Format("{0}, {1}: {2}", p.Nombre, p.Apellido, p.Direccion));
            }
        }