public void fill_page(int num) { /* function that diplays all infomration for the element indicated by the int num * in the relevant fields on the window for interface * in : * int num = id number to indicate the location of element in list * out : */ if (this.CB_SORT.SelectedIndex == 1) { this.sl_people[num].GetPerson(out string FaN, out string FiN, out string SN, out DateTime DOE, out char G); this.TXT_FIRST_NAME.Text = FiN; this.TXT_SEC_NAME.Text = SN; this.TXT_FAM_NAME.Text = FaN; this.TXT_DOE.Text = DOE.ToString("dd/MM/yyyy"); this.TXT_GENDER.Text = G.ToString(); } else { this.l_people[num].GetPerson(out string FaN, out string FiN, out string SN, out DateTime DOE, out char G); this.TXT_FIRST_NAME.Text = FiN; this.TXT_SEC_NAME.Text = SN; this.TXT_FAM_NAME.Text = FaN; this.TXT_DOE.Text = DOE.ToString("dd/MM/yyyy"); this.TXT_GENDER.Text = G.ToString(); } }
public Edit_entries(List <Person> people, string old_save_loc) { InitializeComponent(); listView1.View = View.Details; // set colum sizes listView1.Columns.Add("Family Name", 80); listView1.Columns.Add("First Name", 80); listView1.Columns.Add("Second Name", 80); listView1.Columns.Add("Date of Enrolment", 100); listView1.Columns.Add("Gender", 60); foreach (Person p in people) { p.GetPerson(out string FaN, out string FiN, out string SN, out DateTime DOE, out char G); this.listView1.Items.Add(new ListViewItem(new string[] { FaN, FiN, SN, DOE.ToString("dd/MM/yyyy"), G.ToString() })); } save_loc = old_save_loc; }