private void frmCategoriaRegistro_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            frmCategoria frm = new frmCategoria();

            frm.Show();
        }
예제 #2
0
        private void categoriaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frmCat = new frmCategoria();

            frmCat.MdiParent = this;
            frmCat.Show();
        }
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            DataGridViewRow dr = dataGridView1.SelectedRows[0];

            this.Hide();
            frmCategoria frm = new frmCategoria();

            frm.Show();
            frm.txtID.Text            = dr.Cells[0].Value.ToString();
            frm.txtCategoriaNome.Text = dr.Cells[1].Value.ToString();
            frm.btnDelete.Enabled     = true;
            frm.btnAtualizar.Enabled  = true;
            frm.txtCategoriaNome.Focus();
            frm.btnSalvar.Enabled = false;
        }