Beispiel #1
0
 public void Delete()
 {
     try
     {
         using (UsuarioPL pl = new UsuarioPL())
         {
             pl.SP_DELETAR_USUARIO(this.Instance.UserID);
         };
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #2
0
 public int Insert()
 {
     UsuarioPL pl = null;
     try
     {
         pl = new UsuarioPL();
         pl.SP_SALVAR_USUARIO(this.Instance);
         return 0;
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         if (pl != null)
             GC.SuppressFinalize(pl);
     }
 }
Beispiel #3
0
 public List<DBLayers.DAL.Entidades.Usuario> List(string NomeAdministrador)
 {
     UsuarioPL pl = null;
     List<DBLayers.DAL.Entidades.Usuario> retorno = new List<DAL.Entidades.Usuario>();
     try
     {
         pl = new UsuarioPL();
         retorno =
             pl.SP_CONSULTAR_USUARIO(NomeAdministrador);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         if (pl != null)
             pl.Dispose();
     }
     return retorno;
 }
Beispiel #4
0
 public Usuario Select(string UserID)
 {
     UsuarioPL pl = null;
     try
     {
         pl = new UsuarioPL();
         this.Instance =
             pl.SP_SELECIONAR_USUARIO(UserID.ToString(), int.MinValue);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return new Usuario();
 }
Beispiel #5
0
 public Usuario Select(string UserID, string Password)
 {
     UsuarioPL pl = null;
     try
     {
         pl = new UsuarioPL();
         this.Instance =
             pl.SP_VALIDA_USUARIO(UserID, Password);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return new Usuario();
 }
Beispiel #6
0
 public Usuario Select(int CodigoCliente)
 {
     UsuarioPL pl = null;
     try
     {
         pl = new UsuarioPL();
         this.Instance =
             pl.SP_SELECIONAR_USUARIO(null, CodigoCliente);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return new Usuario();
 }