public NotificationResult Salvar(FichaIdioma entidade) { var NotificationResult = new NotificationResult(); try { if (entidade.CodFicha != 0 && entidade.CodJogador != 0 && entidade.CodIdioma != 0) { entidade.CodFicha = entidade.CodFicha; entidade.CodJogador = entidade.CodJogador; entidade.CodIdioma = entidade.CodIdioma; if (NotificationResult.IsValid) { _fichaIdiomaRepositorio.Adicionar(entidade); NotificationResult.Add("Cadastrado!"); } return(NotificationResult); } else { return(NotificationResult.Add(new NotificationError("Erro no cadastro!", NotificationErrorType.USER))); }; } catch (Exception ex) { return(NotificationResult.Add(new NotificationError(ex.Message))); } }
public NotificationResult Excluir(FichaIdioma entidade) { var NotificationResult = new NotificationResult(); try { if (entidade.CodFicha != 0 && entidade.CodJogador != 0 && entidade.CodIdioma != 0) { if (NotificationResult.IsValid) { _fichaIdiomaRepositorio.Remover(entidade); NotificationResult.Add("Cadastro excluido com Sucesso!"); return(NotificationResult); } else { return(NotificationResult.Add(new NotificationError("O codigo informado não existe!", NotificationErrorType.USER))); } } else { return(NotificationResult.Add(new NotificationError("O codigo informado não existe!", NotificationErrorType.USER))); } } catch (Exception ex) { return(NotificationResult.Add(new NotificationError(ex.Message))); } }
public NotificationResult Atualizar(FichaIdioma entidade) { var NotificationResult = new NotificationResult(); try { if (entidade.CodFicha != 0 && entidade.CodJogador != 0 && entidade.CodIdioma != 0) { entidade.CodFicha = entidade.CodFicha; } entidade.CodJogador = entidade.CodJogador; entidade.CodIdioma = entidade.CodIdioma; if (NotificationResult.IsValid) { _fichaIdiomaRepositorio.Atualizar(entidade); NotificationResult.Add("Cadastro Alterado com Sucesso!"); return(NotificationResult); } else { return(NotificationResult.Add(new NotificationError("O codigo informado não existe!", NotificationErrorType.USER))); } } catch (Exception) { return(NotificationResult.Add(new NotificationError("O codigo informado não existe!", NotificationErrorType.USER))); } }
public NotificationResult Atualizar(FichaIdioma entidade) { return(_fichaIdiomaServico.Atualizar(entidade)); }
public NotificationResult Excluir(FichaIdioma entidade) { return(_fichaIdiomaServico.Excluir(entidade)); }
public NotificationResult Salvar(FichaIdioma entidade) { return(_fichaIdiomaServico.Salvar(entidade)); }
public NotificationResult Salvar(FichaIdioma entidade) { throw new NotImplementedException(); }