public void Excluir(int pId, out int retval) { if (pId < 1) { throw new Exception("Selecione antes de excluir."); } TelefoneDAL obj = new TelefoneDAL(); obj.DELETE(pId, conStr, out retval); }
public void Excluir(int pId, out int retval) { if (pId < 1) { throw new Exception("Selecione antes de excluir."); } ContatosDAL obj = new ContatosDAL(); obj.DELETE(pId, conStr, out retval); if (retval > 0) { EmailDAL objEmail = new EmailDAL(); objEmail.DELETE(pId, conStr, out retval); TelefoneDAL objTel = new TelefoneDAL(); objTel.DELETE(pId, conStr, out retval); } }