public int Alterar(Tecnica tecnica) { try { if (tecnica.Nome.Trim().Length <= 0) { throw new Exception("O nome da técnica precisa ser informado!"); } if (tecnica.TempoCiclo <= 0) { throw new Exception("O tempo do ciclo precisa ser informado!"); } if (tecnica.DescCurto <= 0) { throw new Exception("O tempo do descanso curto precisa ser informado!"); } if (tecnica.DescLongo <= 0) { throw new Exception("O tempo do descanso longo precisa ser informado!"); } if (tecnica.DataCadastro == null) { throw new Exception("A data do cadastro precisa ser informada!"); } TecnicaAcessoADados tecnicaAcessoADados = new TecnicaAcessoADados(); return(tecnicaAcessoADados.Alterar(tecnica)); } catch (Exception) { throw; } }
public void Excluir(int id) { try { TecnicaAcessoADados tecnicaAcesso = new TecnicaAcessoADados(); tecnicaAcesso.Excluir(id); } catch (Exception) { throw; } }