//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); }); } }
//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); }); } }
//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); }); } }
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); }); } }
//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); }); } }
//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"); } }
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"); } }