예제 #1
0
 public void Eliminar( System.Int32 id )
 {
     try
     {
         DSucursal_ = new Datos.Sucursal ();
         DSucursal_.id = id;
         DSucursal_.Eliminar ();
     }
     catch ( System.Exception ex )
     {
         throw new System.Exception ( "Sucursal: Error al eliminar. \n" + ex.Message );
     }
 }
예제 #2
0
 public void Actualizar( System.Int32 id, System.String descripcion, System.Int32 activo )
 {
     try
     {
         DSucursal_ = new Datos.Sucursal ();
         DSucursal_.id = id;
         DSucursal_.descripcion = descripcion;
         DSucursal_.activo = activo;
         ;
         DSucursal_.Actualizar ();
     }
     catch ( System.Exception ex )
     {
         throw new System.Exception ( "Sucursal: Error al actualizar. \n" + ex.Message );
     }
 }
예제 #3
0
 public System.Int32 Insertar( System.String descripcion, System.Int32 activo )
 {
     try
     {
         DSucursal_ = new Datos.Sucursal ();
         DSucursal_.descripcion = descripcion;
         DSucursal_.activo = activo;
         int i = DSucursal_.Insertar ();
         if ( i < 0 )
             throw new System.Exception ( "Sucursal: Error al insertar. \n" );
         return i;
     }
     catch ( System.Exception ex )
     {
         throw new System.Exception ( "Sucursal: Error al insertar. \n" + ex.Message );
     }
 }
예제 #4
0
 public System.Data.DataRow Obtener( System.Int32 id )
 {
     try
     {
         DSucursal_ = new Datos.Sucursal ();
         DSucursal_.id = id;
         return DSucursal_.Obtener ();
     }
     catch ( System.Exception ex )
     {
         throw new System.Exception ( "Sucursal: Error al obtener datos. \n" + ex.Message );
     }
 }
예제 #5
0
 public System.Data.DataTable ListarActivo()
 {
     DSucursal_ = new Datos.Sucursal ();
     return DSucursal_.Listar ( "" );
 }
예제 #6
0
 public System.Data.DataTable Listar( string condicion, params object[] args )
 {
     try
     {
         DSucursal_ = new Datos.Sucursal ();
         return DSucursal_.Listar ( condicion, args );
     }
     catch ( System.Exception ex )
     {
         throw new System.Exception ( "Sucursal: Error al listar. \n" + ex.Message );
     }
 }