Esempio n. 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count < 1)
            {
                LibraryEntities context = new LibraryEntities();
                dataGridView1.DataSource = context.Members.ToList();
                MessageBox.Show("Please select Member from Member List");
                return;
            }
            EditMemberDetails EditMember = new EditMemberDetails();

            EditMember.Show();
        }
Esempio n. 2
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            this.Hide();


            EditMemberDetails Form = new EditMemberDetails();

            Form.textBox1.Text = dataGridView1.CurrentRow.Cells[0].Value.ToString();
            Form.textBox2.Text = dataGridView1.CurrentRow.Cells[5].Value.ToString();
            Form.textBox3.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString();
            Form.textBox4.Text = dataGridView1.CurrentRow.Cells[2].Value.ToString();
            Form.textBox5.Text = dataGridView1.CurrentRow.Cells[6].Value.ToString();
            Form.textBox6.Text = dataGridView1.CurrentRow.Cells[3].Value.ToString();
            Form.textBox7.Text = dataGridView1.CurrentRow.Cells[4].Value.ToString();
            Form.ShowDialog();
        }