private void dataGridView1_DoubleClick(object sender, EventArgs e) { Cust_edite customer = new Cust_edite(); customer.txtid.Clear(); customer.txtid.Text = this.dataGridView1.CurrentRow.Cells[0].Value.ToString(); customer.txtname.Text = this.dataGridView1.CurrentRow.Cells[1].Value.ToString(); if (dataGridView1.CurrentRow.Cells[2].Value.ToString() == "Male") { customer.rdbm.Checked = true; } else if (dataGridView1.CurrentRow.Cells[2].Value.ToString() == "Female") { customer.rdbf.Checked = true; } else { customer.rdbo.Checked = true; } customer.txtaddress.Text = this.dataGridView1.CurrentRow.Cells[3].Value.ToString(); // customer.txtaadhar.Text = this.dataGridView1.CurrentRow.Cells[4].Value.ToString(); customer.cmbcity.SelectedItem = this.dataGridView1.CurrentRow.Cells[5].Value.ToString(); customer.cmbstate.SelectedItem = this.dataGridView1.CurrentRow.Cells[6].Value.ToString(); customer.txtdate.Text = this.dataGridView1.CurrentRow.Cells[8].Value.ToString(); customer.cmbcountry.SelectedItem = this.dataGridView1.CurrentRow.Cells[7].Value.ToString(); // customer.txtdate =Convert.ToDateTime(dataGridView1.CurrentRow.Cells[8].Value); customer.txtpin.Text = this.dataGridView1.CurrentRow.Cells[9].Value.ToString(); //customer.txtcontact.Text = this.dataGridView1.CurrentRow.Cells[10].Value.ToString(); customer.txtemail.Text = this.dataGridView1.CurrentRow.Cells[11].Value.ToString(); if (dataGridView1.CurrentRow.Cells[12].Value != null) { byte[] img = ((byte[])dataGridView1.CurrentRow.Cells[12].Value); MemoryStream ms = new MemoryStream(img); customer.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); customer.Show(); }
private void editToolStripMenuItem_Click(object sender, EventArgs e) { Cust_edite edit = new Cust_edite(); edit.ShowDialog(); }
private void toolStripButton2_Click_1(object sender, EventArgs e) { Cust_edite user = new Cust_edite(); user.ShowDialog(); }