git-svn-id: https://192.168.0.254/svn/Proyectos.Miguelo_FactuGES/trunk@4 172823e9-465a-9d4b-80ba-0a9f016f4eb1
112 lines
3.5 KiB
ObjectPascal
112 lines
3.5 KiB
ObjectPascal
{
|
|
===============================================================================
|
|
Copyright (©) 2002. Rodax Software.
|
|
===============================================================================
|
|
Los contenidos de este fichero son propiedad de Rodax Software titular del
|
|
copyright. Este fichero sólo podrá ser copiado, distribuido y utilizado,
|
|
en su totalidad o en parte, con el permiso escrito de Rodax Software, o de
|
|
acuerdo con los términos y condiciones establecidas en el acuerdo/contrato
|
|
bajo el que se suministra.
|
|
-----------------------------------------------------------------------------
|
|
Web: www.rodax-software.com
|
|
===============================================================================
|
|
Fecha primera versión: 03-11-2002
|
|
Versión actual: 1.0.0
|
|
Fecha versión actual: 03-11-2002
|
|
===============================================================================
|
|
Modificaciones:
|
|
|
|
Fecha Comentarios
|
|
---------------------------------------------------------------------------
|
|
===============================================================================
|
|
}
|
|
|
|
unit Poblaciones;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
|
RdxFrameProvincias, Db, RdxBotones, RdxBarras, Grids, DBGrids, RXDBCtrl,
|
|
ExtCtrls, RdxPaneles, IBCustomDataSet, IBQuery, BaseDatos,
|
|
RdxFramePoblaciones, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxEdit, cxDBData,
|
|
cxGridLevel, cxClasses, cxControls, cxGridCustomView,
|
|
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGrid,
|
|
Configuracion, cxDataStorage;
|
|
|
|
type
|
|
TfrPoblaciones = class(TRdxFramePoblaciones)
|
|
BarraPoblaciones: TRdxBarraSuperior;
|
|
PanelPrincipal: TPanel;
|
|
brSeleccion: TRdxBarraInferior;
|
|
bSeleccionar: TRdxBoton;
|
|
bCancelar: TRdxBoton;
|
|
dsPoblaciones: TDataSource;
|
|
gridPoblaciones: TcxGrid;
|
|
gridPoblacionesDBTableView1: TcxGridDBTableView;
|
|
gridPoblacionesLevel1: TcxGridLevel;
|
|
procedure bSeleccionarClick(Sender: TObject);
|
|
procedure bCancelarClick(Sender: TObject);
|
|
public
|
|
constructor Create (AOwner : TComponent); override;
|
|
destructor Destroy; override;
|
|
published
|
|
property TablaPoblaciones;
|
|
property Entidad;
|
|
end;
|
|
|
|
var
|
|
frPoblaciones: TfrPoblaciones;
|
|
|
|
implementation
|
|
|
|
{$R *.DFM}
|
|
|
|
uses
|
|
IBDatabase, Entidades, TablaPoblaciones;
|
|
|
|
constructor TfrPoblaciones.Create (AOwner : TComponent);
|
|
begin
|
|
inherited Create(AOwner);
|
|
Entidad := entPoblaciones;
|
|
BaseDatos := dmBaseDatos.BD;
|
|
Transaccion := dmBaseDatos.Transaccion;
|
|
TablaPoblaciones := TIBDataSet.Create(Self);
|
|
dsPoblaciones.DataSet := TablaPoblaciones;
|
|
|
|
with TablaPoblaciones do
|
|
begin
|
|
Database := BaseDatos;
|
|
Transaction := Transaccion;
|
|
SelectSQL.Assign(dmTablaPoblaciones.sqlGrid);
|
|
Prepare;
|
|
Open;
|
|
end;
|
|
dmTablaPoblaciones.InicializarGridPoblaciones(gridPoblacionesDBTableView1);
|
|
bCancelar.Cancel := True;
|
|
end;
|
|
|
|
procedure TfrPoblaciones.bSeleccionarClick(Sender: TObject);
|
|
begin
|
|
inherited;
|
|
CodigoProvincia := TablaPoblaciones.FieldByName('CODIGOPROVINCIA').Value;
|
|
CodigoPoblacion := TablaPoblaciones.FieldByName('CODIGOPOBLACION').Value;
|
|
CloseFrame;
|
|
end;
|
|
|
|
destructor TfrPoblaciones.Destroy;
|
|
begin
|
|
TablaPoblaciones.Close;
|
|
TablaPoblaciones.UnPrepare;
|
|
TablaPoblaciones.Free;
|
|
inherited;
|
|
end;
|
|
|
|
procedure TfrPoblaciones.bCancelarClick(Sender: TObject);
|
|
begin
|
|
inherited;
|
|
CloseFrame;
|
|
end;
|
|
|
|
end.
|