unit uDialogOpcionesImpresionAlbaranesProveedor;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uDialogBase, ActnList, StdCtrls, ExtCtrls;

type
  TfDialogOpcionesImpresionAlbaranesProveedor = class(TfDialogBase)
    cbVerPrecios: TCheckBox;
    cbVerRefProveedor: TCheckBox;
    procedure actAceptarExecute(Sender: TObject);
    procedure actCancelarExecute(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

  function ElegirOpcionesImpresionAlbaranProveedor(var AVerPrecios : Boolean; var AVerRefProveedor : Boolean): Boolean;

implementation

{$R *.dfm}

function ElegirOpcionesImpresionAlbaranProveedor(var AVerPrecios : Boolean; var AVerRefProveedor : Boolean): Boolean;
var
  AEditor : TfDialogOpcionesImpresionAlbaranesProveedor;
begin
  AEditor := TfDialogOpcionesImpresionAlbaranesProveedor.Create(NIL);
  try
    AEditor.cbVerPrecios.Checked := AVerPrecios;
    AEditor.cbVerRefProveedor.Checked := AVerRefProveedor;

    Result := (AEditor.ShowModal = mrOk);
    if Result then
    begin
      AVerPrecios := AEditor.cbVerPrecios.Checked;
      AVerRefProveedor := AEditor.cbVerRefProveedor.Checked;
    end;
  finally
    AEditor.Release;
  end;
end;

procedure TfDialogOpcionesImpresionAlbaranesProveedor.actAceptarExecute(Sender: TObject);
begin
  inherited;
  ModalResult := mrOk
end;

procedure TfDialogOpcionesImpresionAlbaranesProveedor.actCancelarExecute(Sender: TObject);
begin
  inherited;
  ModalResult := mrCancel;
end;

end.
