Example #1
0
        private void frmConfigRecord_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            frmConfig frm = new frmConfig();

            frm.Show();
        }
Example #2
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                DataGridViewRow dr = dataGridView1.SelectedRows[0];
                this.Hide();
                frmConfig obj = new frmConfig();
                // or simply use column name instead of index
                //dr.Cells["id"].Value.ToString();
                obj.Show();
                obj.txtConfigID.Text    = dr.Cells[0].Value.ToString();
                obj.cmbProductName.Text = dr.Cells[1].Value.ToString();
                obj.txtFeatures.Text    = dr.Cells[2].Value.ToString();
                obj.txtPrice.Text       = dr.Cells[3].Value.ToString();
                obj.textBox1.Text       = dr.Cells[5].Value.ToString();
                obj.textBox2.Text       = dr.Cells[6].Value.ToString();
                obj.textBox3.Text       = dr.Cells[7].Value.ToString();
                obj.textBox4.Text       = dr.Cells[8].Value.ToString();
                //   byte[] data = (byte[])dr.Cells[4].Value;
                //  MemoryStream ms = new MemoryStream(data);
                // obj.pictureBox1.Image = Image.FromStream(ms);
                obj.btnUpdate.Enabled = true;
                obj.btnDelete.Enabled = true;
                obj.btnSave.Enabled   = false;
                obj.cmbProductName.Focus();
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #3
0
        private void configurationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmConfig frm = new frmConfig();

            frm.Show();
        }