git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES2/trunk@67 b2cfbe5a-eba1-4a0c-8b32-7feea0a119f2
57 lines
1.2 KiB
ObjectPascal
57 lines
1.2 KiB
ObjectPascal
unit uConexionOSC;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, uFrameConfiguracion, ActnList, StdCtrls, cxControls, cxContainer,
|
|
cxEdit, cxTextEdit, 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;
|
|
|
|
|
|
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.
|