public void Select(int Codigo)
 {
     ProgramaEngatePL pl = null;
     try
     {
         pl = new ProgramaEngatePL();
         this.Instance = pl.SP_SELECIONAR_PROGRAMAENGATE(Codigo);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public int Insert()
 {
     ProgramaEngatePL pl = null;
     try
     {
         pl = new ProgramaEngatePL();
         return pl.SP_SALVAR_PROGRAMAENGATE(this.Instance);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         if (pl != null)
             GC.SuppressFinalize(pl);
     }
 }
 public DBLayers.DAL.Entidades.ProgramaEngate SelectLast(int CodigoPrograma)
 {
     ProgramaEngatePL pl = null;
     try
     {
         pl = new ProgramaEngatePL();
         return pl.SP_CONSULTAR_ULTIMO_PROGRAMAENGATE();
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         if (pl != null)
             pl.Dispose();
     }
 }