Exemplo n.º 1
0
 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();
     }
 }
Exemplo n.º 2
0
 private void selected_button_Click(object sender, EventArgs e)        //снятие выделение со строки в dgv о очищение tb
 {
     button_off();
     foreach (DataGridViewRow row in Data_Person.SelectedRows)
     {
         row.Selected = false;
     }
     LN.Clear(); N.Clear(); MN.Clear(); DOB.Clear(); Act.Checked = false;
     Pasp.Clear(); DOE.Clear(); pos.Clear(); DOD.Clear(); Reas.Clear();
 }
Exemplo n.º 3
0
        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;
        }