示例#1
0
 public void CodigoTest()
 {
     Agenda target = new Agenda(); // TODO: Initialize to an appropriate value
     int expected = 0; // TODO: Initialize to an appropriate value
     int actual;
     target.Codigo = expected;
     actual = target.Codigo;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
示例#2
0
        public List<EntPessoa> SelecionarTodosPessoa()
        {
            List<EntPessoa> Pessoas = new List<EntPessoa>();
            IDbCommand Comando = Connection.CreateCommand();
            Comando.CommandText = "SELECT * FROM PESSOA";
            Connection.Open();
            IDataReader leitor = Comando.ExecuteReader();

            while (leitor.Read())
            {
                EntPessoa pessoa = new EntPessoa();
                Agenda s = new Agenda();

                pessoa.Codigo = Convert.ToInt32(leitor.GetValue(0));
                pessoa.Login = Convert.ToString(leitor.GetValue(1));
                pessoa.Senha = Convert.ToString(leitor.GetValue(2));
                pessoa.Nome = Convert.ToString(leitor.GetValue(3));
                pessoa.Email = Convert.ToString(leitor.GetValue(4));

                Pessoas.Add(pessoa);
            }
            Connection.Close();
            return Pessoas;
        }
示例#3
0
 public void InserirAgenda(Agenda Agenda)
 {
     Connection.Open();
     SqlCommand Comando = new SqlCommand("INSERT INTO AGENDA VALUES ");
     Connection.Close();
 }
示例#4
0
 public void ExcluirAgenda(Agenda Agenda)
 {
     Connection.Open();
     SqlCommand Comando = new SqlCommand("");
     Connection.Close();
 }
示例#5
0
        public List<Agenda> SelecionarTodosAgenda()
        {
            List<Agenda> Agendas = new List<Agenda>();
            IDbCommand Comando = Connection.CreateCommand();
            Comando.CommandText = "SELECT * FROM AGENDA";
            Connection.Open();
            IDataReader leitor = Comando.ExecuteReader();

            while (leitor.Read())
            {
                Agenda agenda = new Agenda();

                agenda.Codigo = Convert.ToInt32(leitor.GetValue(0));
                agenda.Comentarios = Convert.ToString(leitor.GetValue(1));

                Agendas.Add(agenda);
            }
            Connection.Close();
            return Agendas;
        }
示例#6
0
 public void InserirAgenda(Agenda agenda)
 {
     Banco.InserirAgenda(agenda);
 }
示例#7
0
 public void AgendaConstructorTest()
 {
     Agenda target = new Agenda();
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
示例#8
0
 public void hora_emailTest()
 {
     Agenda target = new Agenda(); // TODO: Initialize to an appropriate value
     string expected = string.Empty; // TODO: Initialize to an appropriate value
     string actual;
     target.hora_email = expected;
     actual = target.hora_email;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }