Exemple #1
0
 public static frmProduto GetInstancia()
 {
     if (_Instancia == null)
     {
         _Instancia = new frmProduto();
     }
     return(_Instancia);
 }
Exemple #2
0
        private void btnCadastroProduto_Click(object sender, EventArgs e)
        {
            subMenuProdutos.Visible = false;
            subMenuProdutos.Hide();
            frmProduto frm = frmProduto.GetInstancia();

            frm.ShowDialog();
        }
Exemple #3
0
        private void dataLista_DoubleClick(object sender, EventArgs e)
        {
            frmProduto form = frmProduto.GetInstancia();
            string     par1, par2;

            par1 = Convert.ToString(dataLista.CurrentRow.Cells["idcategoria"].Value);
            par2 = Convert.ToString(dataLista.CurrentRow.Cells["nome"].Value);
            form.setCategoria(par1, par2);
            this.Hide();
        }
 private void frmProduto_FormClosed(object sender, FormClosedEventArgs e)
 {
     _Instancia = null;
 }