Ejemplo n.º 1
0
        private void btNovaCategoria_Click(object sender, EventArgs e)
        {
            ((Form)this.TopLevelControl).Hide();
            frmCategoriaConf cc = new frmCategoriaConf();

            cc.Show();
        }
Ejemplo n.º 2
0
        private void btEditarCategoria_Click(object sender, EventArgs e)
        {
            if (dgvCategorias.CurrentRow.Cells[0].Value != null)
            {
                List <string> campos = new List <string>();
                campos.Add(dgvCategorias.CurrentRow.Cells[0].Value.ToString());
                campos.Add(dgvCategorias.CurrentRow.Cells[1].Value.ToString());

                ((Form)this.TopLevelControl).Hide();
                frmCategoriaConf fu = new frmCategoriaConf(campos, "editar");
                fu.Show();
            }
            else
            {
                MessageBox.Show("Escolha um registro para editar.");
            }
        }