Exemple #1
0
        //info user
        private void button3_Click(object sender, EventArgs e)
        {
            registro reg = new registro();

            if (dataGridView1.SelectedRows.Count > 0)
            {
                reg.usertxt.Text        = dataGridView1.CurrentRow.Cells["username"].Value.ToString();
                reg.passtxt.Text        = dataGridView1.CurrentRow.Cells["password"].Value.ToString();
                reg.passconfirmtxt.Text = dataGridView1.CurrentRow.Cells["password"].Value.ToString();
                reg.emailtxt.Text       = dataGridView1.CurrentRow.Cells["email"].Value.ToString();
                reg.nametxt.Text        = dataGridView1.CurrentRow.Cells["firstName"].Value.ToString();
                reg.lasttxt.Text        = dataGridView1.CurrentRow.Cells["lastName"].Value.ToString();
                byte[]       img = (byte[])dataGridView1.CurrentRow.Cells[6].Value;
                MemoryStream ms  = new MemoryStream(img);
                reg.Fotouser.Image = Image.FromStream(ms, true, true);

                reg.ShowDialog();
            }
            else
            {
                MessageBox.Show("Seleccione una fila por favor");
            }
        }