private void frmSubCategoriaRegistro_FormClosing(object sender, FormClosingEventArgs e) { this.Hide(); frmSubCategoria frm = new frmSubCategoria(); frm.Show(); }
private void subCategoriaToolStripMenuItem_Click(object sender, EventArgs e) { Form subCategoria = new frmSubCategoria(); subCategoria.MdiParent = this; subCategoria.Show(); }
private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { DataGridViewRow dr = dataGridView1.SelectedRows[0]; this.Hide(); frmSubCategoria frm = new frmSubCategoria(); frm.Show(); frm.txtSubCategoriaID.Text = dr.Cells[0].Value.ToString(); frm.txtSubCategoria.Text = dr.Cells[1].Value.ToString(); frm.txtCategoriaID.Text = dr.Cells[2].Value.ToString(); frm.comboBCategoria.Text = dr.Cells[3].Value.ToString(); frm.btnDeleteSubCategoria.Enabled = true; frm.btnAtualizarSubCategoria.Enabled = true; frm.txtSubCategoria.Focus(); frm.btnSalvarSubCategoria.Enabled = false; }