private void Form2_Load(object sender, EventArgs e) { bool resul; Persona person1 = new Persona(); resul = person1.SeekData(1); if (resul == true) { label2.Text = Convert.ToString(person1.Id); label3.Text = person1.Name; label4.Text = person1.LastName; } }
public bool NewData(Persona person) { int i; for (i = 0; i < people.Length; i++) { if (people[i].id == 0) { break; } } if (i < people.Length) { people[i].id = person.id; people[i].name = person.name; people[i].lastname = person.lastname; return true; } else { return false; } }