private void btnConfirma_Click(object sender, EventArgs e)
 {
     mMenu modelMenu = new mMenu();
     BUSINESS.rMenu regraMenu = new BUSINESS.rMenu();
     try
     {
         modelMenu = this.PegaDadosTela();
         regraMenu.CadastraMenu(modelMenu);
         MessageBox.Show("Cadastrado com sucesso!!");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     finally
     {
         modelMenu = null;
     }
 }
示例#2
0
        private void btnConfirma_Click(object sender, EventArgs e)
        {
            mMenu modelMenu = new mMenu();

            BUSINESS.rMenu regraMenu = new BUSINESS.rMenu();
            try
            {
                modelMenu = this.PegaDadosTela();
                regraMenu.CadastraMenu(modelMenu);
                MessageBox.Show("Cadastrado com sucesso!!");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                modelMenu = null;
            }
        }