private void AddUserForDGV(User user) { dataGridView1.Rows.Add(); int idx = dataGridView1.Rows.Count-1; dataGridView1.Rows[idx].Cells[0].Value = user._id; dataGridView1.Rows[idx].Cells[1].Value = user.GetName(); dataGridView1.Rows[idx].Cells[2].Value = user.GetSex(); dataGridView1.Rows[idx].Cells[3].Value = user.GetBirthday(); dataGridView1.Rows[idx].Cells[4].Value = user._phone1; dataGridView1.Rows[idx].Cells[5].Value = user._phone2; dataGridView1.Rows[idx].Cells[6].Value = user._email; dataGridView1.Rows[idx].Cells[7].Value = user._note; }
private void SetForm(User user) { id_lbl.Text = user._id; firstName_tbx.Text = user._firstName; lastName_tbx.Text = user._lastName; sex_cbx.Text = user.GetSex(); year_cbx.Text = user._bYear; month_cbx.Text = user._bMonth; day_cbx.Text = user._bDay; phone1_tbx.Text = user._phone1; phone2_tbx.Text = user._phone2; email_tbx.Text = user._email; note_tbx.Text = user._note; }