git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@2 c93665c3-c93d-084d-9b98-7d5f4a9c3376
59 lines
1.3 KiB
ObjectPascal
59 lines
1.3 KiB
ObjectPascal
unit uConexionOSC;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, uFrameConfiguracion, ActnList, StdCtrls, cxControls, cxContainer,
|
|
cxEdit, cxTextEdit, cxDBEdit, DB;
|
|
|
|
type
|
|
TfrConexionOSC = class(TFrameConfiguracion)
|
|
GroupBox1: TGroupBox;
|
|
Label1: TLabel;
|
|
bComprobar: TButton;
|
|
ActionList1: TActionList;
|
|
actAceptar: TAction;
|
|
actCancelar: TAction;
|
|
actComprobar: TAction;
|
|
edtBDSERVER: TcxTextEdit;
|
|
procedure actComprobarExecute(Sender: TObject);
|
|
protected
|
|
procedure Finalize; override;
|
|
public
|
|
procedure Init; override;
|
|
end;
|
|
|
|
var
|
|
frConexionOSC: TfrConexionOSC;
|
|
|
|
implementation
|
|
|
|
uses
|
|
uTiendaWebUtils, uDataModuleServer;
|
|
|
|
{$R *.dfm}
|
|
|
|
procedure TfrConexionOSC.actComprobarExecute(Sender: TObject);
|
|
var
|
|
AErrorMsg : String;
|
|
begin
|
|
if HayConexionConTienda(edtBDSERVER.Text, AErrorMsg) then
|
|
ShowMessage('Conexión válida con la tienda')
|
|
else
|
|
ShowMessage('No se ha podido establecer la conexión con la tienda web.' +
|
|
#10#13 + #10#13 + AErrorMsg);
|
|
end;
|
|
|
|
procedure TfrConexionOSC.Finalize;
|
|
begin
|
|
dmServer.FOSCServer := edtBDSERVER.Text;
|
|
end;
|
|
|
|
procedure TfrConexionOSC.Init;
|
|
begin
|
|
edtBDSERVER.Text := dmServer.FOSCServer;
|
|
end;
|
|
|
|
end.
|