Ejemplo n.º 1
0
        public void dgvResidentList_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            //get data from row
            int rowIndex = e.RowIndex;

            id    = dataGridView1.Rows[rowIndex].Cells[0].Value.ToString();
            email = dataGridView1.Rows[rowIndex].Cells[1].Value.ToString();
            fname = dataGridView1.Rows[rowIndex].Cells[2].Value.ToString();
            lname = dataGridView1.Rows[rowIndex].Cells[3].Value.ToString();
            num   = dataGridView1.Rows[rowIndex].Cells[4].Value.ToString();

            ResidentsForm.Residents r = new ResidentsForm.Residents();
            r.txtResidentID.Text   = id;
            r.txtEmailAddress.Text = email;
            r.txtFirstName.Text    = fname;
            r.txtLastName.Text     = lname;
            r.txtAptNumber.Text    = num;

            r.Show();

            this.Close();
        }
Ejemplo n.º 2
0
 private void residents_Click(object sender, EventArgs e)
 {
     ResidentsForm.Residents r = new ResidentsForm.Residents();
     //this.Hide();
     r.Show();
 }