private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { try { DataGridViewRow drow = dataGridView1.SelectedRows[0]; this.Hide(); frmConfig frm = new frmConfig(); BusinessManager BM = new BusinessManager(); frm.Show(); frm.txtConfigID.Text = drow.Cells[0].Value.ToString(); frm.cmbProductName.Text = drow.Cells[1].Value.ToString(); frm.txtFeatures.Text = drow.Cells[2].Value.ToString(); frm.txtPrice.Text = drow.Cells[3].Value.ToString(); byte[] data = (byte[])drow.Cells[4].Value; frm.pictureBox1.Image = BM.BbyteArrayToImage(data); frm.btnDelete.Enabled = true; frm.btnUpdate.Enabled = true; frm.btnSave.Enabled = false; frm.cmbProductName.Focus(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void FormConfigData1_FormClosing(object sender, FormClosingEventArgs e) { this.Hide(); frmConfig frm = new frmConfig(); frm.Show(); }
private void button1_Click(object sender, EventArgs e) { frmConfig frm = new frmConfig(); frm.ShowDialog(); }