Example #1
0
        private void dataGridView1_DoubleClick(object sender, EventArgs e)
        {
            User_regitration user = new User_regitration();

            user.txtid.Clear();
            user.txtid.Text             = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
            user.txtruser.Text          = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
            user.comboBox2.SelectedItem = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
            user.txtrpass.Text          = this.dataGridView1.CurrentRow.Cells[4].Value.ToString();
            user.txtrnm.Text            = this.dataGridView1.CurrentRow.Cells[5].Value.ToString();
            user.txtremail.Text         = this.dataGridView1.CurrentRow.Cells[6].Value.ToString();
            //user.txtrcontact.Text = this.dataGridView1.CurrentRow.Cells[7].Value.ToString();
            user.cmbractiv.Text = this.dataGridView1.CurrentRow.Cells[8].Value.ToString();
            user.txtrdate.Text  = this.dataGridView1.CurrentRow.Cells[9].Value.ToString();
            if (dataGridView1.CurrentRow.Cells[10].Value != null)
            {
                byte[]       img = ((byte[])dataGridView1.CurrentRow.Cells[10].Value);
                MemoryStream ms  = new MemoryStream(img);
                user.pictureBox1.Image = Image.FromStream(ms);
            }
            else
            {
            }
            //MemoryStream ms = new MemoryStream();
            //Bitmap img = (Bitmap)dataGridView1.CurrentRow.Cells[1].Value;
            //img.Save(ms, ImageFormat.jpg);
            //user.pictureBox1.Image = Image.FromStream(ms);
            user.Show();

            //user.pictureBox1.Image = user.DisPhoto((byte[])this.dataGridView1.CurrentRow.Cells[9].Value);
        }
        private void registrationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            User_regitration ud = new User_regitration();

            ud.ShowDialog();
            ud.MdiParent = this;
        }
        private void fggfToolStripMenuItem_Click(object sender, EventArgs e)
        {
            User_regitration user = new User_regitration();

            user.ShowDialog();
        }
        private void toolStripButton4_Click(object sender, EventArgs e)
        {
            User_regitration user = new User_regitration();

            user.ShowDialog();
        }