示例#1
0
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                DataGridViewRow dr = dataGridView1.SelectedRows[0];
                this.Hide();
                frmConfig obj = new frmConfig();
                obj.Show();
                obj.cmbProductName.Text = dr.Cells[0].Value.ToString();
                obj.txtConfigID.Text    = dr.Cells[1].Value.ToString();
                obj.txtThickness.Text   = dr.Cells[2].Value.ToString();
                obj.txtColour.Text      = dr.Cells[3].Value.ToString();
                obj.txtSize.Text        = dr.Cells[4].Value.ToString();
                obj.txtPrice.Text       = dr.Cells[5].Value.ToString();
                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);
            }
        }
示例#2
0
        private void frmConfigRecord_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            frmConfig frm = new frmConfig();

            frm.Show();
        }
        private void configurationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmConfig frm = new frmConfig();

            frm.Show();
        }