Exemple #1
0
        /// <summary>
        /// Método que define as tarefas de exclusão do campo
        /// </summary>
        private void Excluir()
        {
            Util.CL_Files.WriteOnTheLog("UC_CadastroCampos.Excluir()", Util.Global.TipoLog.DETALHADO);

            if (tarefa == Util.Enumerator.Tarefa.INCLUIR)
            {
                principal.FecharTela(Util.Enumerator.Telas.CADASTRO_CAMPOS);
            }
            else if (tarefa == Util.Enumerator.Tarefa.EDITAR)
            {
                this.tarefa = Util.Enumerator.Tarefa.VISUALIZAR;
                this.InicializaUserControl();
            }
            else
            {
                if (Message.MensagemConfirmaçãoYesNo("Deseja excluir o campo?") == DialogResult.Yes)
                {
                    if (this.campoCorrente.DAO.Delete())
                    {
                        Message.MensagemSucesso("Excluído com sucesso!");
                        this.principal.CarregaTreeViewAutomaticamente();
                        principal.FecharTela(Util.Enumerator.Telas.CADASTRO_CAMPOS);
                    }
                    else
                    {
                        Message.MensagemErro("Erro ao excluir!");
                    }
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// Método que atualiza a tela com os dados principais
        /// </summary>
        private void AtualizaPrincipal()
        {
            Util.CL_Files.WriteOnTheLog("UC_CadastroProjeto.AtualizaPrincipal()", Util.Global.TipoLog.DETALHADO);

            this.principal.CarregaTreeViewAutomaticamente();
            principal.FecharTela(Util.Enumerator.Telas.CADASTRO_ENTRADA);
        }