Esempio n. 1
0
 public void Delete()
 {
     try
     {
         using (AdministradorPL pl = new AdministradorPL())
         {
             pl.SP_DELETAR_ADMINISTRADOR(this.Instance.UserID);
         };
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 2
0
 public int Insert()
 {
     AdministradorPL pl = null;
     try
     {
         pl = new AdministradorPL();
         return pl.SP_SALVAR_ADMINISTRADOR(this.Instance);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         if (pl != null)
             GC.SuppressFinalize(pl);
     }
 }
Esempio n. 3
0
 public List<DBLayers.DAL.Entidades.Administrador> List(string NomeAdministrador)
 {
     AdministradorPL pl = null;
     List<DBLayers.DAL.Entidades.Administrador> retorno = new List<DAL.Entidades.Administrador>();
     try
     {
         pl = new AdministradorPL();
         retorno =
             pl.SP_CONSULTAR_ADMINISTRADOR(NomeAdministrador);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         if (pl != null)
             pl.Dispose();
     }
     return retorno;
 }
Esempio n. 4
0
 public Administrador Select(string UserID)
 {
     AdministradorPL pl = null;
     try
     {
         pl = new AdministradorPL();
         this.Instance =
             pl.SP_SELECIONAR_ADMINISTRADOR(UserID.ToString());
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return new Administrador();
 }