コード例 #1
0
ファイル: Selectores.java プロジェクト: ArtChl/siipapwin
  /**
   * Presenta un selector adecuado para seleccionar una {@link Venta} misma que regresa
   *
   * @param c
   * @param notas
   * @return
   */
  public static Venta seleccionarVentaCredito(final Cliente c, final EventList<Venta> ventas) {
    final Selector<Venta> selector =
        new AbstractSelector<Venta>(
            ventas,
            "Lista de venas",
            "Ventas a credito pendientes de pago",
            MessageFormat.format("{0} ({1})", c.getNombre(), c.getClave())) {

          @Override
          protected TableFormat<Venta> getTableFormat() {
            return CXCTableFormats.getVentasCreTF();
          }
        };
    selector.open();
    if (!selector.hasBeenCanceled()) {
      return selector.getSelected();
    }
    return null;
  }
コード例 #2
0
ファイル: Selectores.java プロジェクト: ArtChl/siipapwin
 public static Devolucion seleccionarDevolucion(
     final Cliente c, final EventList<Devolucion> devos) {
   final Selector<Devolucion> selector =
       new AbstractSelector<Devolucion>(
           devos,
           "Devoluciones",
           "Lista de devoluciones pendientes",
           MessageFormat.format("{0} ({1})", c.getNombre(), c.getClave())) {
         @Override
         protected TableFormat<Devolucion> getTableFormat() {
           return CXCTableFormats.getDevolucionTF();
         }
       };
   selector.open();
   if (!selector.hasBeenCanceled()) {
     return selector.getSelected();
   }
   return null;
 }
コード例 #3
0
ファイル: Selectores.java プロジェクト: ArtChl/siipapwin
  /**
   * Presenta un selector adecuado para seleccionar una {@link NotaDeCredito} misma que regresa
   *
   * @param c
   * @param notas
   * @return
   */
  public static NotaDeCredito seleccionarNotaDeCredito(
      final Cliente c, final EventList<NotaDeCredito> notas) {
    final Selector<NotaDeCredito> selector =
        new AbstractSelector<NotaDeCredito>(
            notas,
            "Notas de Crédito",
            "Disponibles para pago",
            MessageFormat.format("{0} ({1})", c.getNombre(), c.getClave())) {

          @Override
          protected TableFormat<NotaDeCredito> getTableFormat() {
            return CXCTableFormats.getNotaDeCreditoTF();
          }
        };
    selector.open();
    if (!selector.hasBeenCanceled()) {
      return selector.getSelected();
    }
    return null;
  }