//Botão Excluir
 private void btnExcluir_Click(object sender, EventArgs e)
 {
     if (base.DesejaRealmenteExcluir())
     {
         DelegateCRUD.ExecuteExcluir(() => {
             _repositorioFuncionario.Remover((tb_Colaborador)bscFuncionario.Current);
             XtraMessageBox.Show(Mensagens.ExcluirComSucesso);
         });
     }
 }
Ejemplo n.º 2
0
 //Botão Excluir
 private void btnExcluir_Click(object sender, EventArgs e)
 {
     if (base.DesejaRealmenteExcluir())
     {
         DelegateCRUD.ExecuteExcluir(() => {
             _repositorioTreinamentos.Remover((tb_Treinamentos)bscTreinamentos.Current);
             XtraMessageBox.Show(Mensagens.ExcluirComSucesso);
         });
     }
 }
Ejemplo n.º 3
0
 //Botão Excluir
 private void btnExcluir_Click(object sender, EventArgs e)
 {
     if (base.DesejaRealmenteExcluir())
     {
         DelegateCRUD.ExecuteExcluir(() =>
         {
             _repositorioEmpresa.Remover((tb_Empresa)bscEmpresa.Current);
             // Sim ou nao
             XtraMessageBox.Show(Mensagens.ExcluirComSucesso);
         });
     }
 }
Ejemplo n.º 4
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            var treinador = (tb_Palestrante)bscTreinador.Current;

            if (Validar(treinador))
            {
                DelegateCRUD.ExecuteEditar(() =>
                {
                    _repositoriotreinador.Editar((tb_Palestrante)bscTreinador.Current);
                    XtraMessageBox.Show(Mensagens.AlteracaoComSucesso);
                });
            }
        }
        //Botão Editar
        private void btnEditar_Click(object sender, EventArgs e)
        {
            var funcionario = (tb_Colaborador)bscFuncionario.Current;

            if (Validar(funcionario))
            {
                DelegateCRUD.ExecuteEditar(() =>
                {
                    _repositorioFuncionario.Editar((tb_Colaborador)bscFuncionario.Current);
                    XtraMessageBox.Show(Mensagens.AlteracaoComSucesso);
                });
            }
        }
Ejemplo n.º 6
0
        //Botão Editar
        private void btnEditar_Click(object sender, EventArgs e)
        {
            var empresa = (tb_Empresa)bscEmpresa.Current;

            if (Validar(empresa))
            {
                DelegateCRUD.ExecuteEditar(() =>
                {
                    _repositorioEmpresa.Editar((tb_Empresa)bscEmpresa.Current);
                    // Sim ou nao
                    XtraMessageBox.Show(Mensagens.AlteracaoComSucesso);
                });
            }
        }
Ejemplo n.º 7
0
 //Botão Salvar
 private void btnSalvar_Click(object sender, EventArgs e)
 {
     if (dxValidacao.Validate())
     {
         var empresa = (tb_Empresa)bscEmpresa.Current;
         if (Validar(empresa))
         {
             DelegateCRUD.ExecuteAdd(() =>
             {
                 _repositorioEmpresa.Adicionar(empresa);
                 XtraMessageBox.Show(Mensagens.SalvoComSucesso);
             });
         }
     }
     else
     {
         XtraMessageBox.Show("Houve erros de validação");
     }
 }
Ejemplo n.º 8
0
 private void btnSalvar_Click(object sender, EventArgs e)
 {
     if (dxValidacao.Validate())
     {
         var treinador = (tb_Palestrante)bscTreinador.Current;
         if (Validar(treinador))
         {
             DelegateCRUD.ExecuteAdd(() =>
             {
                 _repositoriotreinador.Adicionar(treinador);
                 XtraMessageBox.Show(Mensagens.SalvoComSucesso);
             });
         }
     }
     else
     {
         XtraMessageBox.Show("Houve erros de validação");
     }
 }
 private void btnSalvar_Click(object sender, EventArgs e)
 {
     if (dxValidacao.Validate())
     {
         var funcionario = (tb_Colaborador)bscFuncionario.Current;
         if (Validar(funcionario))
         {
             DelegateCRUD.ExecuteAdd(() =>
             {
                 _repositorioFuncionario.Adicionar(funcionario);
                 XtraMessageBox.Show(Mensagens.SalvoComSucesso);
             });
         }
     }
     else
     {
         XtraMessageBox.Show("Houve erros de validação");
     }
 }