public void ProcessBarcode(TextBox txtReg, Label lblPerson, DataGridView dgv) { pda.FillByLpk(ds.persons, txtReg.Text, countyId); if (ds.persons.Rows.Count > 0) { DataRow rp = ds.persons.Rows[0]; lblPerson.Text = string.Format("{0}\r\n{1}\r\n{2}", rp[ds.persons.FirstNameColumn], rp[ds.persons.SecondNameColumn], rp[ds.persons.FamilyNameColumn]); if (this.EventExists) { if (!ParticipantExists(txtReg.Text)) { if (this.ParticipantActive(txtReg.Text)) { epda.Insert((int)rp[ds.persons.IdColumn], (int)ds.events.Rows[0][ds.events.IdColumn], DateTime.Now, this.countyId); LoadDataEventPresence(dgv); } else { lblPerson.Text = Messages.person_inactive; } } } else { lblPerson.Text = Messages.event_missing; } } else { lblPerson.Text = Messages.person_missing; } }