public bool Alter(Usuario user)
 {
     try
     {
         DadosdoUsuario.Alterar(user);
         return true;
     }
     catch (Exception e)
     {
         throw e;
     }
 }
 public bool Delete(Usuario user)
 {
     try
     {
         DadosdoUsuario.Excluir(user);
         return true;
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Exemple #3
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Tela_de_Login());

            Usuario admin = new Usuario(1,"Administrador", "CHURCH_ADM", "cadm2015");//deve usar camada de negocio

            List <Usuario> usuarios = new List<Usuario>();

            usuarios.Add(admin);
        }
 public bool Insert(string nome, string senha, string email)
 {
     Usuario usuario = new Usuario(nome, senha, email);
     try
     {
         DadosdoUsuario.Inserir(usuario);
         return true;
     }
     catch (Exception e)
     {
         throw e;
     }
 }