Version 1.0.3

Tareas #789:Añador el campo 'Doctor' para los pacientes
Se adapta el programa para contemplar pabellones y doctores

git-svn-id: https://192.168.0.254/svn/Proyectos.FarmaciaPH_Etiquetas/trunk@30 7b0b1a58-4aa1-b946-8089-8453ede31e50
This commit is contained in:
roberto 2012-03-15 15:45:02 +00:00
parent 8cf408bcc1
commit 496290a109
42 changed files with 2773 additions and 310 deletions

View File

@ -101,6 +101,12 @@ SET GENERATOR GEN_ARTICULOS_ID TO 1;
CREATE GENERATOR GEN_CATEGORIAS_ID;
SET GENERATOR GEN_CATEGORIAS_ID TO 1;
CREATE GENERATOR GEN_DOCTORES_ID;
SET GENERATOR GEN_DOCTORES_ID TO 1;
CREATE GENERATOR GEN_PABELLONES_ID;
SET GENERATOR GEN_PABELLONES_ID TO 1;
CREATE GENERATOR GEN_CONFIGURACION_ID;
SET GENERATOR GEN_CONFIGURACION_ID TO 1;
@ -179,6 +185,15 @@ CREATE TABLE ARTICULOS (
MANO_OBRA TIPO_IMPORTE
);
CREATE TABLE DOCTORES (
ID TIPO_ID NOT NULL,
DESCRIPCION VARCHAR(255)
);
CREATE TABLE PABELLONES (
ID TIPO_ID NOT NULL,
DESCRIPCION VARCHAR(255)
);
CREATE TABLE CATEGORIAS (
ID TIPO_ID NOT NULL,
@ -367,7 +382,8 @@ CREATE TABLE PACIENTES_DATOS (
NUMERO_SS VARCHAR(255),
FECHA_BAJA DATE,
CAUSA_BAJA VARCHAR(255),
PABELLON VARCHAR(255)
PABELLON VARCHAR(255) COLLATE ES_ES,
DOCTOR VARCHAR(255) COLLATE ES_ES
);
@ -578,7 +594,8 @@ CREATE VIEW V_PACIENTES(
NUMERO_SS,
FECHA_BAJA,
CAUSA_BAJA,
PABELLON)
PABELLON,
DOCTOR)
AS
SELECT V_CONTACTOS.ID,
V_CONTACTOS.ID_CATEGORIA,
@ -608,7 +625,8 @@ SELECT V_CONTACTOS.ID,
PACIENTES_DATOS.NUMERO_SS,
PACIENTES_DATOS.FECHA_BAJA,
PACIENTES_DATOS.CAUSA_BAJA,
PACIENTES_DATOS.PABELLON
PACIENTES_DATOS.PABELLON,
PACIENTES_DATOS.DOCTOR
FROM V_CONTACTOS
INNER JOIN PACIENTES_DATOS ON (PACIENTES_DATOS.ID_PACIENTE = V_CONTACTOS.ID)
@ -621,6 +639,8 @@ WHERE V_CONTACTOS.ID_CATEGORIA = 4
ALTER TABLE ARTICULOS ADD CONSTRAINT PK_ARTICULOS PRIMARY KEY (ID);
ALTER TABLE CATEGORIAS ADD CONSTRAINT PK_CATEGORIAS PRIMARY KEY (ID);
ALTER TABLE DOCTORES ADD CONSTRAINT PK_DOCTORES PRIMARY KEY (ID);
ALTER TABLE PABELLONES ADD CONSTRAINT PK_PABELLONES PRIMARY KEY (ID);
ALTER TABLE CONFIGURACION ADD CONSTRAINT PK_CONFIGURACION PRIMARY KEY (ID);
ALTER TABLE CONTACTOS ADD CONSTRAINT PK_CONTACTOS PRIMARY KEY (ID);
ALTER TABLE CONTACTOS_CATEGORIAS ADD CONSTRAINT PK_CONTACTOS_CATEGORIAS PRIMARY KEY (ID_CONTACTO, ID_CATEGORIA);

View File

@ -17,6 +17,38 @@ inherited fEditorEmpresa: TfEditorEmpresa
ExplicitWidth = 674
inherited Image1: TImage
Left = 541
Picture.Data = {
0B546478504E47496D61676589504E470D0A1A0A0000000D4948445200000018
000000180806000000E0773DF8000000017352474200AECE1CE9000000046741
4D410000B18F0BFC6105000000206348524D00007A26000080840000FA000000
80E8000075300000EA6000003A98000017709CBA513C00000009704859730000
17110000171101CA26F33F0000033549444154484BD595FB4F536718C7DD7FA1
3FCEEA964ACB1832F0366457334CBC206284C6A843132F2C5B9CC934C4B0856C
D3A0035922A0D6726B6DC2458A23FBC188E8A6162908E5626D8B3DB420B72220
A228E6E33927A1823D4513E5074FF2F492369FCFF779DE73DEF70360DE9C5E92
602E6B4EE1F274A497AADA36E6A26608C42F81EBD9133FC28D23DC2ED36133A7
E069344EFF39F07972F2391313938C8F3F6574EC090F46C6191C1AA37770944F
D7EC91FEF7B283E9045F7D069D1792692A4CA036F75B6AB2BFC371CB3C43321B
BCBB6F38B440B87E88BB65C97498B7537F66339773D662F93D8ED2742D5EC715
5932053F60788C5275F50C290BC6FA6DD82B52B09E4D10E149B2A0E95C12D682
0D5CFC630575A6B4005C692C5272097ECFE757160CBA2BB86DDA44A321893B62
079ECA5D0895DFE33AAFA3459F40F99FD181998F8C2AA7973A727A06420B5C96
147C965DF4D5ECA5A77A3742C50E5190427B6122552713187B348104F70F3FA2
DFFF90FBFD23787B1FE0E9F6D3D93528C33BDC7DCA82119F957B353FC9506FE5
4E84F2EDB8CD3A1C255B68C85FCFE5B2E36F046FBD7B3FF4227BAFE7E1326F93
533B4DC9DC294EC2AEDFC0BFD98938ECF5AF4D2EC19B3BBA430B5A856BFC63D4
D1A04FA459BF8986827558C4DB546F3888DDD536EB58A6E0B636AFB2E0AAF73F
E2CB37A2F95B4DC689755C32FE4851DE36B68A77902AF3237697FE40B3DB1998
B9EEE74294AABE450816788605F6D71C447B6615AA222D51D951E45E3AC681B2
34D4F9E1A80BA3519F5846AA611F75ADB6190B2A256F6AF7D160EFE266B387FF
1B3B8305558E6A56E6C5139EF7056A5334AAE2257C762A86F0B391A84C5AC28A
57A0C9896341FA87A416EDC3D1D9AF985EEAE8EA2D57B0E094AD808547971291
F3359A73ABF8D81CC5C2A23054A5627A630CDAD3AB89C85AC3FCC38BF9FCD897
B43B7B6971F4042597E0B55667B0A0A2C34264562C6199B17C92FB9538AA5834
8695B24C9B1F47C45FDFB028239AF9BF881D94A4C9F0506BA028901E7DABDB46
AA712F11BFC5A0C98824EC57B1A4F72362A52F252A6B392575D5B32697E08A82
57B7DBE9FB8A4B189067FEBAB14CC11505D3F7F2B7852B0AA403E25D57E0C079
AF0FFD1710958E1DD5F715C50000000049454E44AE426082}
ExplicitLeft = 607
end
inherited lblDesbloquear: TcxLabel

View File

@ -13,7 +13,7 @@ uses
JvAppStorage, JvAppRegistryStorage, JvFormPlacement, JvComponentBase,
uViewEmpresa, uIEditorEmpresa, uEmpresasController, dxLayoutLookAndFeels,
JvExComCtrls, JvStatusBar, uViewDetallesGenerico, uViewDatosBancarios,
uDAInterfaces, cxControls, cxContainer, cxEdit, cxLabel;
uDAInterfaces, cxControls, cxContainer, cxEdit, cxLabel, dxGDIPlusClasses;
type
TfEditorEmpresa = class(TfEditorDBItem, IEditorEmpresa)

Binary file not shown.

View File

@ -53,7 +53,7 @@
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.2.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">Etiquetas</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">Etiquetas</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.2.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages></Excluded_Packages><Source><Source Name="MainSource">Etiquetas.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">3</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.3.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">Etiquetas</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">Etiquetas</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.3.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages></Excluded_Packages><Source><Source Name="MainSource">Etiquetas.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>
</ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
<ItemGroup>

View File

@ -1,7 +1,7 @@
MAINICON ICON "C:\Codigo farmacia\Resources\Iconos\Etiquetas.ico"
1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEVERSION 1,0,3,0
PRODUCTVERSION 1,0,3,0
FILEFLAGSMASK 0x3FL
FILEFLAGS 0x00L
FILEOS 0x40004L
@ -13,10 +13,10 @@ BEGIN
BLOCK "0C0A04E4"
BEGIN
VALUE "CompanyName", "Rodax Software S.L.\0"
VALUE "FileVersion", "1.0.0.0\0"
VALUE "FileVersion", "1.0.3.0\0"
VALUE "InternalName", "Etiquetas\0"
VALUE "ProductName", "Etiquetas\0"
VALUE "ProductVersion", "1.0.2.0\0"
VALUE "ProductVersion", "1.0.3.0\0"
END
END
BLOCK "VarFileInfo"

View File

@ -317,6 +317,29 @@ object fPantallaPrincipal: TfPantallaPrincipal
end
object ModulesSmallImageList: TPngImageList
PngImages = <
item
PngImage.Data = {
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
610000000970485973000017120000171201679FD252000001EC4944415478DA
A5934B6813511486BF541B88CD26620DA262A51BDB8520158308D5852055B01B
A3E8CEBD2E7CE063512852D09D2E82E04604AB1B5D4451B059D8A6010D84D842
5B6B6B1A8D414A4C9B18EB4C27F3F466D41943ED4233309C3BDC39DFFFDF9F7B
3C9665D1C8E379323CD510C1061C3DD0697F48C531BEE7A7EDB57F6B072DADBB
9C1F4DE154D74D34DD70DE43272FB9805AF3975484E56F1A856289C2D23CFB4F
44D8D4BE17DD30B932A8D629B7358D70F7C1D39F8023FBB6917B35C0D78F590C
43EC5A06954A8505A5C4B1CB2947F14F07D158D205F48436F03E761E640FEB7C
3ED660204B3263B9597A2F24ED866B8F59DD414F28C8E7443FDE6A55A883AAA9
28F232F3FA7ABA8EDFAC53FEBD1E1A4DBB805A0685370F91E65E0880084BD358
9255CCB65EDAF784571E413378F97ABC1E90C8C6C88EDC6687E9150EAAA415D8
BCFB14DD9D875734D76A2235E102B674A85C1CEEA3B498E374F020A666727F21
4E662ECFDBAB19BBB9EFD6B3BA0C423B37BA80A4F188E733A32881327EA91991
22924FA7B9E427373B45FADCB4A3ACFD72929E78E702EE1506C8E68B18AD0AEA
5A595C2F44A02D3495BD7CF8344EF2CC24D7EFC4567770361EA65C2EFCF5AA06
0241A2E1215BD5302DBB9AA24ECE645C4077D77606A3F17F9E0307D07F23F2FF
C3D4E838FF008E7263BE13CA147C0000000049454E44AE426082}
Name = 'PngImage2'
Background = clWindow
end
item
PngImage.Data = {
89504E470D0A1A0A0000000D49484452000000100000001008060000001FF3FF
@ -371,6 +394,40 @@ object fPantallaPrincipal: TfPantallaPrincipal
Height = 24
Width = 24
PngImages = <
item
PngImage.Data = {
89504E470D0A1A0A0000000D4948445200000018000000180806000000E0773D
F80000000970485973000017120000171201679FD2520000033B4944415478DA
DD957F68565518C73F77EF0FDFBDB9B94DC1214D5BB2FD61A3B0399236D66424
96A32874A1329D2D322C7F24686C0D539318FE964419E29F6AFF5810D982821C
BA0D57292846A4AD36B7D770BEEFF6FEBA7BEF3DF7DEB773A72EDFDE3BD71FEE
1F0F3CDC7378CEF97E9EE73CE79CAB24934926B3298F07E0EB73BF4E0AE5B5AA
79CA18400EC61C86162270F93043033D986692E9454B99337F459A80695AA37E
FB6B58D6BDF1DDFE2BAB3EE2D277479D01033FED440FFC4E389C60381263C474
31B7BC9EE205B5FF4BDCFED6AC6E7406F47535A1057AE5242FD1689C585C9516
27AA06A9ACFB9C278B5F1A136F3A2D1CB766D3E2115E5FFB713A203E78893F2F
1C401D1A91C571CBA9493C2E055DE80C066F93F55429E5CB0F3D34F251B392BC
D9D09C0E08F67C457FF7492CCD853FD38FCFEB41C142681AAAAA72FD763F351F
768E8A08C364D797CEC57DAF2A46EDBAEDCE80E16B67F0E1C7E3F64821032104
42D7D125E47AD8A2BAE1F4B8D15B7666327A43F657AEDF910E880C7413BAF205
198961321419BB5C681806868444E30922D32B295DBC7E42717B5CB761977391
FBBB5AD16E76CAED37B17DA66167A13310715358BD8D1905CF4C286E5BFDE6DD
CE806B7D17E8ED68656622814716591882802AB893534259453D3373674F286E
FBDED9F2593AE07C7F072DDDFBE9BBF51BCBF4222AF29F261009D13674836EF3
0ED5854B787FE106F29E98312AD47CF01BC7226F5C5DC5BAAD2DA980E7E64F65
5FE711DA035DA8DE30B9A129AC29A9E5AFE19B7C1B6C079F0F821994E79552B7
E06D0AB2E7A4446E9FAA0733FBA0716F2A80593DECF9F118514610D3E2E8468C
BC58169A5710F70B7C46164AC84B70B097A5C5AFB2B5E2133E3DDAE698C1BB6F
95B3A9797F2A2090DDC1DE1F5AC9F6E5626427107E699ABC702E175E251377DC
872BECE3EF500F453905B4BE71EAA1176DCBF603A90033FF0F769FDD879600F7
340F56A620E936E569525074372ED5432C1C269618A4A6A4868D658DEC39FEBD
63060DCB5F4C07BCFC4211576F5DE5F8C513FC7CE3171991B0B5EDD7027999A5
2964E678D95CD6C4B3F9A5E3467EBFA5011695CD1D77D1442FE77FC51D0195CF
173E327147C08E96238FFA87F62F6032DBA403FE011B7940FEE55D65A3000000
0049454E44AE426082}
Name = 'PngImage2'
Background = clWindow
end
item
PngImage.Data = {
89504E470D0A1A0A0000000D4948445200000018000000180806000000E0773D

View File

@ -38,7 +38,17 @@ requires
vclx,
vclactnband,
designide,
ccpackD11;
ccpackD11,
dbrtl,
cxLibraryD11,
dxThemeD11,
dxGDIPlusD11,
dxCoreD11,
RemObjects_Core_D11,
DataAbstract_Core_D11,
vcldb,
dsnap,
adortl;
contains
uContactosController in 'uContactosController.pas',
@ -58,6 +68,10 @@ contains
uPersonalContactoController in 'uPersonalContactoController.pas',
uIEditorDireccionContacto in 'View\uIEditorDireccionContacto.pas',
uIEditorDatoBancarioContacto in 'View\uIEditorDatoBancarioContacto.pas',
uIEditorPersonalContacto in 'View\uIEditorPersonalContacto.pas';
uIEditorPersonalContacto in 'View\uIEditorPersonalContacto.pas',
uDoctoresController in 'uDoctoresController.pas',
uIEditorDoctores in 'View\uIEditorDoctores.pas',
uPabellonesController in 'uPabellonesController.pas',
uIEditorPabellones in 'View\uIEditorPabellones.pas';
end.

View File

@ -54,6 +54,15 @@
@ -74,33 +83,47 @@
<DCCReference Include="uContactosController.pas" />
<DCCReference Include="uDatosBancariosContactoController.pas" />
<DCCReference Include="uDireccionesContactoController.pas" />
<DCCReference Include="uDoctoresController.pas" />
<DCCReference Include="uEtiquetasContactosReportController.pas" />
<DCCReference Include="uFichasPacienteReportController.pas" />
<DCCReference Include="uPabellonesController.pas" />
<DCCReference Include="uPacientesController.pas" />
<DCCReference Include="uPersonalContactoController.pas" />
<DCCReference Include="View\adortl.dcp" />
<DCCReference Include="View\ApplicationBase.dcp" />
<DCCReference Include="View\Base.dcp" />
<DCCReference Include="View\ccpackD11.dcp" />
<DCCReference Include="View\cfpack_d11.dcp" />
<DCCReference Include="View\Contactos_data.dcp" />
<DCCReference Include="View\Contactos_model.dcp" />
<DCCReference Include="View\cxLibraryD11.dcp" />
<DCCReference Include="View\DataAbstract_Core_D11.dcp" />
<DCCReference Include="View\dbrtl.dcp" />
<DCCReference Include="View\designide.dcp" />
<DCCReference Include="View\dsnap.dcp" />
<DCCReference Include="View\dxCoreD11.dcp" />
<DCCReference Include="View\dxGDIPlusD11.dcp" />
<DCCReference Include="View\dxThemeD11.dcp" />
<DCCReference Include="View\GUIBase.dcp" />
<DCCReference Include="View\GUISDK_D11R.dcp" />
<DCCReference Include="View\RemObjects_Core_D11.dcp" />
<DCCReference Include="View\rtl.dcp" />
<DCCReference Include="View\uIEditorContacto.pas" />
<DCCReference Include="View\uIEditorContactos.pas" />
<DCCReference Include="View\uIEditorDatoBancarioContacto.pas" />
<DCCReference Include="View\uIEditorDireccionContacto.pas" />
<DCCReference Include="View\uIEditorDoctores.pas" />
<DCCReference Include="View\uIEditorElegirContactos.pas" />
<DCCReference Include="View\uIEditorElegirPacientes.pas" />
<DCCReference Include="View\uIEditorEtiquetasContactosPreview.pas" />
<DCCReference Include="View\uIEditorFichasPacientePreview.pas" />
<DCCReference Include="View\uIEditorPabellones.pas" />
<DCCReference Include="View\uIEditorPaciente.pas" />
<DCCReference Include="View\uIEditorPacientes.pas" />
<DCCReference Include="View\uIEditorPersonalContacto.pas" />
<DCCReference Include="View\vcl.dcp" />
<DCCReference Include="View\vclactnband.dcp" />
<DCCReference Include="View\vcldb.dcp" />
<DCCReference Include="View\vclx.dcp" />
<DCCReference Include="View\xmlrtl.dcp" />
</ItemGroup>

View File

@ -0,0 +1,23 @@
unit uIEditorDoctores;
interface
uses
uEditorDBBase, uBizDoctores, uDoctoresController;
type
IEditorDoctores = interface(IEditorDBBase)
['{E4FD5FEA-9771-40FD-AC69-600BE859ECCE}']
function GetDoctores: IBizDoctor;
procedure SetDoctores(const Value: IBizDoctor);
property Doctores: IBizDoctor read GetDoctores write SetDoctores;
function GetController : IDoctoresController;
procedure SetController (const Value : IDoctoresController);
property Controller : IDoctoresController read GetController write SetController;
end;
implementation
end.

View File

@ -0,0 +1,23 @@
unit uIEditorPabellones;
interface
uses
uEditorDBBase, uBizPabellones, uPabellonesController;
type
IEditorPabellones = interface(IEditorDBBase)
['{022A7745-22FA-4BD4-A913-6990B3886F96}']
function GetPabellones: IBizPabellon;
procedure SetPabellones(const Value: IBizPabellon);
property Pabellones: IBizPabellon read GetPabellones write SetPabellones;
function GetController : IPabellonesController;
procedure SetController (const Value : IPabellonesController);
property Controller : IPabellonesController read GetController write SetController;
end;
implementation
end.

View File

@ -0,0 +1,219 @@
unit uDoctoresController;
interface
uses
Classes, SysUtils, uDADataTable, uEditorDBItem,
uIDataModulePacientes, uBizDoctores, uControllerBase;
type
IDoctoresController = interface(IControllerBase)
['{9466E214-61F1-4ACB-8432-52C946363D2A}']
function BuscarTodos: IBizDoctor;
procedure VerTodos(ADoctores: IBizDoctor);
procedure Anadir(ADoctores : IBizDoctor);
function Eliminar(ADoctores : IBizDoctor): Boolean;
function Guardar(ADoctores : IBizDoctor): Boolean;
procedure DescartarCambios(ADoctores : IBizDoctor);
function Localizar(ADoctores: IBizDoctor; ADescripcion:String): Boolean;
function DarListaDoctores: TStringList;
end;
TDoctoresController = class(TControllerBase, IDoctoresController)
protected
FDataModule : IDataModulePacientes;
procedure RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable); override;
function CreateEditor(const AName : String; const IID: TGUID; out Intf): Boolean;
function ValidarDoctor(ADoctores: IBizDoctor): Boolean;
procedure AsignarDataModule; virtual;
public
constructor Create; override;
destructor Destroy; override;
function Eliminar(ADoctores : IBizDoctor): Boolean;
function Guardar(ADoctores : IBizDoctor): Boolean;
procedure DescartarCambios(ADoctores : IBizDoctor); virtual;
procedure Anadir(ADoctores : IBizDoctor);
function BuscarTodos: IBizDoctor;
procedure VerTodos(ADoctores: IBizDoctor);
function Localizar(ADoctores: IBizDoctor; ADescripcion:String): Boolean;
function DarListaDoctores: TStringList;
end;
implementation
uses
cxControls, DB, uEditorRegistryUtils,
uIEditorDoctores, uDataModulePacientes,
uDAInterfaces, uDataTableUtils,
uDateUtils, uROTypes, DateUtils, Controls, Windows, schContactosClient_Intf;
{ TDoctoresController }
procedure TDoctoresController.Anadir(ADoctores: IBizDoctor);
begin
ADoctores.Insert;
end;
procedure TDoctoresController.AsignarDataModule;
begin
FDataModule := TDataModulePacientes.Create(Nil);
end;
function TDoctoresController.BuscarTodos: IBizDoctor;
begin
Result := FDataModule.GetDoctores;
end;
constructor TDoctoresController.Create;
begin
inherited;
AsignarDataModule;
end;
function TDoctoresController.CreateEditor(const AName: String; const IID: TGUID; out Intf): Boolean;
begin
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
end;
function TDoctoresController.DarListaDoctores: TStringList;
var
ADoctores: IBizDoctor;
begin
ADoctores := BuscarTodos;
ADoctores.DataTable.Active := True;
Result := TStringList.Create;
try
with Result do
begin
ADoctores.DataTable.First;
while not ADoctores.DataTable.EOF do
begin
Add(ADoctores.DESCRIPCION);
ADoctores.DataTable.Next;
end;
end;
finally
ADoctores := NIL;
end;
end;
procedure TDoctoresController.DescartarCambios(ADoctores: IBizDoctor);
begin
if not Assigned(ADoctores) then
raise Exception.Create ('Doctores no asignado');
ShowHourglassCursor;
try
if (ADoctores.State in dsEditModes) then
ADoctores.Cancel;
ADoctores.DataTable.CancelUpdates;
finally
HideHourglassCursor;
end;
end;
destructor TDoctoresController.Destroy;
begin
FDataModule := Nil;
inherited;
end;
function TDoctoresController.ValidarDoctor(ADoctores: IBizDoctor): Boolean;
begin
if not Assigned(ADoctores) then
raise Exception.Create ('Doctores no asignada');
if (ADoctores.DataTable.State in dsEditModes) then
ADoctores.DataTable.Post;
if Length(ADoctores.DESCRIPCION) = 0 then
raise Exception.Create('Debe indicar al menos nombre del doctor.');
Result := True;
end;
procedure TDoctoresController.VerTodos(ADoctores: IBizDoctor);
var
AEditor : IEditorDoctores;
begin
AEditor := NIL;
CreateEditor('EditorDoctores', IEditorDoctores, AEditor);
if Assigned(AEditor) then
try
AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
AEditor.Doctores := ADoctores;
AEditor.ShowModal;
finally
AEditor.Release;
AEditor := NIL;
end;
end;
function TDoctoresController.Eliminar(ADoctores: IBizDoctor): Boolean;
begin
if not Assigned(ADoctores) then
raise Exception.Create ('ADoctores no asignada');
ShowHourglassCursor;
try
if (ADoctores.State in dsEditModes) then
ADoctores.Cancel;
ADoctores.Delete;
ADoctores.DataTable.ApplyUpdates;
HideHourglassCursor;
Result := True;
finally
HideHourglassCursor;
end;
end;
procedure TDoctoresController.RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable);
begin
inherited;
//
end;
function TDoctoresController.Guardar(ADoctores: IBizDoctor): Boolean;
begin
Result := False;
if ValidarDoctor(ADoctores) then
begin
ShowHourglassCursor;
try
if (ADoctores.DataTable.State in dsEditModes) then
ADoctores.DataTable.Post;
ADoctores.DataTable.ApplyUpdates;
Result := True;
finally
HideHourglassCursor;
end;
end;
end;
function TDoctoresController.Localizar(ADoctores: IBizDoctor; ADescripcion: String): Boolean;
begin
Result := True;
ShowHourglassCursor;
try
with ADoctores.DataTable do
begin
DisableControls;
First;
if not Locate(fld_DoctoresDESCRIPCION, ADescripcion, []) then
Result := False;
EnableControls;
end;
finally
HideHourglassCursor;
end;
end;
end.

View File

@ -0,0 +1,219 @@
unit uPabellonesController;
interface
uses
Classes, SysUtils, uDADataTable, uEditorDBItem,
uIDataModulePacientes, uBizPabellones, uControllerBase;
type
IPabellonesController = interface(IControllerBase)
['{DF1530A1-EB37-4DBB-8888-EBE1E06D4141}']
function BuscarTodos: IBizPabellon;
procedure VerTodos(APabellones: IBizPabellon);
procedure Anadir(APabellones : IBizPabellon);
function Eliminar(APabellones : IBizPabellon): Boolean;
function Guardar(APabellones : IBizPabellon): Boolean;
procedure DescartarCambios(APabellones : IBizPabellon);
function Localizar(APabellones: IBizPabellon; ADescripcion:String): Boolean;
function DarListaPabellones: TStringList;
end;
TPabellonesController = class(TControllerBase, IPabellonesController)
protected
FDataModule : IDataModulePacientes;
procedure RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable); override;
function CreateEditor(const AName : String; const IID: TGUID; out Intf): Boolean;
function ValidarPabellon(APabellones: IBizPabellon): Boolean;
procedure AsignarDataModule; virtual;
public
constructor Create; override;
destructor Destroy; override;
function Eliminar(APabellones : IBizPabellon): Boolean;
function Guardar(APabellones : IBizPabellon): Boolean;
procedure DescartarCambios(APabellones : IBizPabellon); virtual;
procedure Anadir(APabellones : IBizPabellon);
function BuscarTodos: IBizPabellon;
procedure VerTodos(APabellones: IBizPabellon);
function Localizar(APabellones: IBizPabellon; ADescripcion:String): Boolean;
function DarListaPabellones: TStringList;
end;
implementation
uses
cxControls, DB, uEditorRegistryUtils,
uIEditorPabellones, uDataModulePacientes,
uDAInterfaces, uDataTableUtils,
uDateUtils, uROTypes, DateUtils, Controls, Windows, schContactosClient_Intf;
{ TPabellonesController }
procedure TPabellonesController.Anadir(APabellones: IBizPabellon);
begin
APabellones.Insert;
end;
procedure TPabellonesController.AsignarDataModule;
begin
FDataModule := TDataModulePacientes.Create(Nil);
end;
function TPabellonesController.BuscarTodos: IBizPabellon;
begin
Result := FDataModule.GetPabellones;
end;
constructor TPabellonesController.Create;
begin
inherited;
AsignarDataModule;
end;
function TPabellonesController.CreateEditor(const AName: String; const IID: TGUID; out Intf): Boolean;
begin
Result := Supports(EditorRegistry.CreateEditor(AName), IID, Intf);
end;
function TPabellonesController.DarListaPabellones: TStringList;
var
APabellones: IBizPabellon;
begin
APabellones := BuscarTodos;
APabellones.DataTable.Active := True;
Result := TStringList.Create;
try
with Result do
begin
APabellones.DataTable.First;
while not APabellones.DataTable.EOF do
begin
Add(APabellones.DESCRIPCION);
APabellones.DataTable.Next;
end;
end;
finally
APabellones := NIL;
end;
end;
procedure TPabellonesController.DescartarCambios(APabellones: IBizPabellon);
begin
if not Assigned(APabellones) then
raise Exception.Create ('Pabellones no asignado');
ShowHourglassCursor;
try
if (APabellones.State in dsEditModes) then
APabellones.Cancel;
APabellones.DataTable.CancelUpdates;
finally
HideHourglassCursor;
end;
end;
destructor TPabellonesController.Destroy;
begin
FDataModule := Nil;
inherited;
end;
function TPabellonesController.ValidarPabellon(APabellones: IBizPabellon): Boolean;
begin
if not Assigned(APabellones) then
raise Exception.Create ('Pabellones no asignada');
if (APabellones.DataTable.State in dsEditModes) then
APabellones.DataTable.Post;
if Length(APabellones.DESCRIPCION) = 0 then
raise Exception.Create('Debe indicar al menos nombre del pabellón.');
Result := True;
end;
procedure TPabellonesController.VerTodos(APabellones: IBizPabellon);
var
AEditor : IEditorPabellones;
begin
AEditor := NIL;
CreateEditor('EditorPabellones', IEditorPabellones, AEditor);
if Assigned(AEditor) then
try
AEditor.Controller := Self; //OJO ORDEN MUY IMPORTANTE
AEditor.Pabellones := APabellones;
AEditor.ShowModal;
finally
AEditor.Release;
AEditor := NIL;
end;
end;
function TPabellonesController.Eliminar(APabellones: IBizPabellon): Boolean;
begin
if not Assigned(APabellones) then
raise Exception.Create ('APabellones no asignada');
ShowHourglassCursor;
try
if (APabellones.State in dsEditModes) then
APabellones.Cancel;
APabellones.Delete;
APabellones.DataTable.ApplyUpdates;
HideHourglassCursor;
Result := True;
finally
HideHourglassCursor;
end;
end;
procedure TPabellonesController.RecibirAviso(ASujeto: ISujeto; ADataTable: IDAStronglyTypedDataTable);
begin
inherited;
//
end;
function TPabellonesController.Guardar(APabellones: IBizPabellon): Boolean;
begin
Result := False;
if ValidarPabellon(APabellones) then
begin
ShowHourglassCursor;
try
if (APabellones.DataTable.State in dsEditModes) then
APabellones.DataTable.Post;
APabellones.DataTable.ApplyUpdates;
Result := True;
finally
HideHourglassCursor;
end;
end;
end;
function TPabellonesController.Localizar(APabellones: IBizPabellon; ADescripcion: String): Boolean;
begin
Result := True;
ShowHourglassCursor;
try
with APabellones.DataTable do
begin
DisableControls;
First;
if not Locate(fld_PabellonesDESCRIPCION, ADescripcion, []) then
Result := False;
EnableControls;
end;
finally
HideHourglassCursor;
end;
end;
end.

View File

@ -1,164 +1,6 @@
inherited DataModulePacientes: TDataModulePacientes
Height = 302
Width = 543
inherited tbl_Contactos: TDAMemDataTable
Fields = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_CONTACTOS_ID'
ServerAutoRefresh = True
DictionaryEntry = 'Contactos_ID'
InPrimaryKey = True
end
item
Name = 'ID_CATEGORIA'
DataType = datInteger
end
item
Name = 'NIF_CIF'
DataType = datString
Size = 15
DisplayLabel = 'NIF/CIF'
DictionaryEntry = 'Contactos_NIF_CIF'
end
item
Name = 'NOMBRE'
DataType = datString
Size = 255
Required = True
DisplayLabel = 'Nombre'
DictionaryEntry = 'Contactos_NOMBRE'
end
item
Name = 'PERSONA_CONTACTO'
DataType = datString
Size = 255
DisplayLabel = 'Persona de contacto'
DictionaryEntry = 'Contactos_PERSONA_CONTACTO'
end
item
Name = 'CALLE'
DataType = datString
Size = 255
DisplayLabel = 'Direcci'#243'n'
DictionaryEntry = 'Contactos_CALLE'
end
item
Name = 'POBLACION'
DataType = datString
Size = 255
DisplayLabel = 'Poblaci'#243'n'
DictionaryEntry = 'Contactos_POBLACION'
end
item
Name = 'PROVINCIA'
DataType = datString
Size = 255
DisplayLabel = 'Provincia'
DictionaryEntry = 'Contactos_PROVINCIA'
end
item
Name = 'CODIGO_POSTAL'
DataType = datString
Size = 10
DisplayLabel = 'C'#243'digo postal'
DictionaryEntry = 'Contactos_CODIGO_POSTAL'
end
item
Name = 'TELEFONO_1'
DataType = datString
Size = 25
DisplayLabel = 'Tlf. trabajo'
DictionaryEntry = 'Contactos_TELEFONO_1'
end
item
Name = 'TELEFONO_2'
DataType = datString
Size = 25
DisplayLabel = 'Tlf. particular'
DictionaryEntry = 'Contactos_TELEFONO_2'
end
item
Name = 'MOVIL_1'
DataType = datString
Size = 25
DisplayLabel = 'M'#243'vil'
DictionaryEntry = 'Contactos_MOVIL_1'
end
item
Name = 'MOVIL_2'
DataType = datString
Size = 25
DictionaryEntry = 'Contactos_MOVIL_2'
end
item
Name = 'FAX'
DataType = datString
Size = 25
DisplayLabel = 'Fax'
DictionaryEntry = 'Contactos_FAX'
end
item
Name = 'EMAIL_1'
DataType = datString
Size = 255
DisplayLabel = 'E-mail trabajo'
DictionaryEntry = 'Contactos_EMAIL_1'
end
item
Name = 'EMAIL_2'
DataType = datString
Size = 255
DisplayLabel = 'E-mail particular'
DictionaryEntry = 'Contactos_EMAIL_2'
end
item
Name = 'PAGINA_WEB'
DataType = datString
Size = 255
DisplayLabel = 'Web'
DictionaryEntry = 'Contactos_PAGINA_WEB'
end
item
Name = 'NOTAS'
DataType = datMemo
BlobType = dabtMemo
DisplayLabel = 'Observaciones'
DictionaryEntry = 'Contactos_NOTAS'
end
item
Name = 'FECHA_ALTA'
DataType = datDateTime
DisplayLabel = 'Fecha de alta'
DictionaryEntry = 'Contactos_FECHA_ALTA'
end
item
Name = 'FECHA_MODIFICACION'
DataType = datDateTime
DisplayLabel = 'Fecha de modificaci'#243'n'
DictionaryEntry = 'Contactos_FECHA_MODIFICACION'
end
item
Name = 'USUARIO'
DataType = datString
Size = 20
DisplayLabel = 'Usuario'
DictionaryEntry = 'Contactos_USUARIO'
end
item
Name = 'ID_EMPRESA'
DataType = datInteger
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
DisplayLabel = 'Referencia'
ServerAutoRefresh = True
DictionaryEntry = 'Contactos_REFERENCIA'
end>
end
inherited ds_Contactos: TDADataSource
DataSet = tbl_Contactos.Dataset
end
@ -365,6 +207,11 @@ inherited DataModulePacientes: TDataModulePacientes
Size = 255
DisplayLabel = 'Pabell'#243'n'
DictionaryEntry = 'Pacientes_PABELLON'
end
item
Name = 'DOCTOR'
DataType = datString
Size = 255
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
@ -381,4 +228,68 @@ inherited DataModulePacientes: TDataModulePacientes
Left = 296
Top = 232
end
object tbl_Doctores: TDAMemDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_DOCTORES_ID'
Required = True
DictionaryEntry = 'Doctores_ID'
InPrimaryKey = True
end
item
Name = 'DESCRIPCION'
DataType = datString
Size = 255
DisplayLabel = 'Doctores_DESCRIPCION'
DictionaryEntry = 'Doctores_DESCRIPCION'
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_Contactos
LogicalName = 'Doctores'
IndexDefs = <>
Left = 392
Top = 224
end
object ds_Doctores: TDADataSource
DataSet = tbl_Doctores.Dataset
DataTable = tbl_Doctores
Left = 392
Top = 152
end
object tbl_Pabellones: TDAMemDataTable
RemoteUpdatesOptions = []
Fields = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_PABELLONES_ID'
Required = True
DictionaryEntry = 'Pabellones_ID'
InPrimaryKey = True
end
item
Name = 'DESCRIPCION'
DataType = datString
Size = 255
DisplayLabel = 'Pabellones_DESCRIPCION'
DictionaryEntry = 'Pabellones_DESCRIPCION'
end>
Params = <>
StreamingOptions = [soDisableEventsWhileStreaming]
RemoteDataAdapter = rda_Contactos
LogicalName = 'Pabellones'
IndexDefs = <>
Left = 464
Top = 224
end
object ds_Pabellones: TDADataSource
DataSet = tbl_Pabellones.Dataset
DataTable = tbl_Pabellones
Left = 464
Top = 152
end
end

View File

@ -9,17 +9,23 @@ uses
uROClient, uROBinMessage, uROWinInetHttpChannel, uROTypes,
uIDataModulePacientes, uBizContactos, uDADesigntimeCall, uIDataModuleFichasPacienteReport,
uDAInterfaces, uDAMemDataTable, uDADataStreamer, uDABin2DataStreamer,
uDARemoteDataAdapter, uIntegerListUtils;
uDARemoteDataAdapter, uIntegerListUtils, uBizDoctores, uBizPabellones;
type
TDataModulePacientes = class(TDataModuleContactos, IDataModulePacientes, IDataModuleFichasPacienteReport)
tbl_Pacientes: TDAMemDataTable;
ds_Pacientes: TDADataSource;
tbl_Doctores: TDAMemDataTable;
ds_Doctores: TDADataSource;
tbl_Pabellones: TDAMemDataTable;
ds_Pabellones: TDADataSource;
protected
public
function GetItem(const ID : Integer) : IBizPaciente;
function NewItem : IBizPaciente;
function GetItems : IBizPaciente;
function GetDoctores : IBizDoctor;
function GetPabellones : IBizPabellon;
// Report
function GetReport(const ListaID: TIntegerList): Binary;
@ -36,6 +42,20 @@ uses
{ TDataModuleVendedores }
function TDataModulePacientes.GetDoctores: IBizDoctor;
var
ADoctor : TDAMemDataTable;
begin
ShowHourglassCursor;
try
ADoctor := CloneDataTable(tbl_Doctores);
ADoctor.BusinessRulesID := BIZ_CLIENT_DOCTORES;
Result := (ADoctor as IBizDoctor);
finally
HideHourglassCursor;
end;
end;
function TDataModulePacientes.GetItem(const ID: Integer): IBizPaciente;
var
Condicion: TDAWhereExpression;
@ -80,6 +100,20 @@ begin
end;
end;
function TDataModulePacientes.GetPabellones: IBizPabellon;
var
APabellon : TDAMemDataTable;
begin
ShowHourglassCursor;
try
APabellon := CloneDataTable(tbl_Pabellones);
APabellon.BusinessRulesID := BIZ_CLIENT_PABELLONES;
Result := (APabellon as IBizPabellon);
finally
HideHourglassCursor;
end;
end;
function TDataModulePacientes.GetReport(const ListaID: TIntegerList): Binary;
var
AParam : TIntegerArray;

View File

@ -46,6 +46,8 @@ contains
schContactosClient_Intf in 'schContactosClient_Intf.pas',
uBizContactosPersonal in 'uBizContactosPersonal.pas',
uIDataModulePacientes in 'Data\uIDataModulePacientes.pas',
uIDataModuleFichasPacienteReport in 'Data\uIDataModuleFichasPacienteReport.pas';
uIDataModuleFichasPacienteReport in 'Data\uIDataModuleFichasPacienteReport.pas',
uBizDoctores in 'uBizDoctores.pas',
uBizPabellones in 'uBizPabellones.pas';
end.

View File

@ -49,15 +49,10 @@
<DelphiCompile Include="Contactos_model.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="Data\adortl.dcp" />
<DCCReference Include="Data\ApplicationBase.dcp" />
<DCCReference Include="Data\Base.dcp" />
<DCCReference Include="Data\DataAbstract_Core_D11.dcp" />
<DCCReference Include="Data\dbrtl.dcp" />
<DCCReference Include="Data\dsnap.dcp" />
<DCCReference Include="Data\GUIBase.dcp" />
<DCCReference Include="Data\RemObjects_Core_D11.dcp" />
<DCCReference Include="Data\rtl.dcp" />
<DCCReference Include="adortl.dcp" />
<DCCReference Include="ApplicationBase.dcp" />
<DCCReference Include="Base.dcp" />
<DCCReference Include="DataAbstract_Core_D11.dcp" />
<DCCReference Include="Data\uIDataModuleClientes.pas" />
<DCCReference Include="Data\uIDataModuleContactos.pas" />
<DCCReference Include="Data\uIDataModuleEmpleados.pas" />
@ -67,14 +62,21 @@
<DCCReference Include="Data\uIDataModuleFichasPacienteReport.pas" />
<DCCReference Include="Data\uIDataModulePacientes.pas" />
<DCCReference Include="Data\uIDataModuleProveedores.pas" />
<DCCReference Include="Data\vcl.dcp" />
<DCCReference Include="Data\vcldb.dcp" />
<DCCReference Include="dbrtl.dcp" />
<DCCReference Include="dsnap.dcp" />
<DCCReference Include="GUIBase.dcp" />
<DCCReference Include="RemObjects_Core_D11.dcp" />
<DCCReference Include="rtl.dcp" />
<DCCReference Include="schContactosClient_Intf.pas" />
<DCCReference Include="uBizClientesDescuentos.pas" />
<DCCReference Include="uBizContactos.pas" />
<DCCReference Include="uBizContactosDatosBancarios.pas" />
<DCCReference Include="uBizContactosPersonal.pas" />
<DCCReference Include="uBizDireccionesContacto.pas" />
<DCCReference Include="uBizDoctores.pas" />
<DCCReference Include="uBizPabellones.pas" />
<DCCReference Include="vcl.dcp" />
<DCCReference Include="vcldb.dcp" />
</ItemGroup>
</Project>
<!-- EurekaLog First Line

View File

@ -3,7 +3,7 @@ unit uIDataModulePacientes;
interface
uses
Classes, uBizContactos, uIDataModuleContactos;
Classes, uBizContactos, uBizPabellones, uBizDoctores, uIDataModuleContactos;
type
IDataModulePacientes = interface(IDataModuleContactos)
@ -11,6 +11,8 @@ type
function GetItem(const ID : Integer) : IBizPaciente;
function NewItem : IBizPaciente;
function GetItems : IBizPaciente;
function GetDoctores : IBizDoctor;
function GetPabellones : IBizPabellon;
end;

View File

@ -9,20 +9,32 @@ const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_Contactos = '{C70F7D0E-F4A7-4CFE-9944-779D78462802}';
RID_DatosBancarios = '{28E8899E-75BE-4198-A469-BD7707476A56}';
RID_DireccionesContacto = '{A946294F-D917-45C4-BC14-6DB2AFB13954}';
RID_Contactos_Refresh = '{F268DFE8-EE77-4A04-BAED-893AC62B40CD}';
RID_PersonalContacto = '{D665EAA8-4B09-478A-9FC1-F7E40234097C}';
RID_Pacientes = '{F9D8AC20-2D16-43D9-8571-2319BD6371B2}';
RID_Doctores = '{3E864983-DD64-4EF4-863D-102054B62696}';
RID_Contactos = '{800D9A48-9505-488D-9916-B7BB8BD82112}';
RID_DatosBancarios = '{2048E5AC-046F-4566-A3DF-E87462F9E3AF}';
RID_DireccionesContacto = '{3AB9D632-7707-46B9-95D0-8DC4C18AF3BE}';
RID_Contactos_Refresh = '{249235DA-FBCE-4F06-AD88-53B2628C621F}';
RID_PersonalContacto = '{51CB7C5A-2FAD-42A7-B8F7-F78CB67397D5}';
RID_Pacientes = '{A4D929A2-E324-4F40-8D50-1A3574A721A9}';
RID_Pabellones = '{F7AB3D3F-62A2-4D0A-AD78-D0C5A3BBE902}';
{ Data table names }
nme_Doctores = 'Doctores';
nme_Contactos = 'Contactos';
nme_DatosBancarios = 'DatosBancarios';
nme_DireccionesContacto = 'DireccionesContacto';
nme_Contactos_Refresh = 'Contactos_Refresh';
nme_PersonalContacto = 'PersonalContacto';
nme_Pacientes = 'Pacientes';
nme_Pabellones = 'Pabellones';
{ Doctores fields }
fld_DoctoresID = 'ID';
fld_DoctoresDESCRIPCION = 'DESCRIPCION';
{ Doctores field indexes }
idx_DoctoresID = 0;
idx_DoctoresDESCRIPCION = 1;
{ Contactos fields }
fld_ContactosID = 'ID';
@ -231,6 +243,7 @@ const
fld_PacientesFECHA_BAJA = 'FECHA_BAJA';
fld_PacientesCAUSA_BAJA = 'CAUSA_BAJA';
fld_PacientesPABELLON = 'PABELLON';
fld_PacientesDOCTOR = 'DOCTOR';
{ Pacientes field indexes }
idx_PacientesID = 0;
@ -261,11 +274,67 @@ const
idx_PacientesFECHA_BAJA = 25;
idx_PacientesCAUSA_BAJA = 26;
idx_PacientesPABELLON = 27;
idx_PacientesDOCTOR = 28;
{ Pabellones fields }
fld_PabellonesID = 'ID';
fld_PabellonesDESCRIPCION = 'DESCRIPCION';
{ Pabellones field indexes }
idx_PabellonesID = 0;
idx_PabellonesDESCRIPCION = 1;
type
{ IDoctores }
IDoctores = interface(IDAStronglyTypedDataTable)
['{20A25966-2B21-407F-935A-1C1065115FB5}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
function GetIDIsNull: Boolean;
procedure SetIDIsNull(const aValue: Boolean);
function GetDESCRIPCIONValue: String;
procedure SetDESCRIPCIONValue(const aValue: String);
function GetDESCRIPCIONIsNull: Boolean;
procedure SetDESCRIPCIONIsNull(const aValue: Boolean);
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
end;
{ TDoctoresDataTableRules }
TDoctoresDataTableRules = class(TIntfObjectDADataTableRules, IDoctores)
private
protected
{ Property getters and setters }
function GetIDValue: Integer; virtual;
procedure SetIDValue(const aValue: Integer); virtual;
function GetIDIsNull: Boolean; virtual;
procedure SetIDIsNull(const aValue: Boolean); virtual;
function GetDESCRIPCIONValue: String; virtual;
procedure SetDESCRIPCIONValue(const aValue: String); virtual;
function GetDESCRIPCIONIsNull: Boolean; virtual;
procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
{ IContactos }
IContactos = interface(IDAStronglyTypedDataTable)
['{CD8D0182-85A8-4864-B68C-8881352B60BC}']
['{FD6C799E-E833-4CD0-8F25-6B6A162BC497}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -564,7 +633,7 @@ type
{ IDatosBancarios }
IDatosBancarios = interface(IDAStronglyTypedDataTable)
['{C69A3D95-8E46-40B2-B58B-62D44ECE77CC}']
['{A4C96A58-18CA-4E43-9754-3126339A2887}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -695,7 +764,7 @@ type
{ IDireccionesContacto }
IDireccionesContacto = interface(IDAStronglyTypedDataTable)
['{DF647E54-B42B-4AE9-B644-F658124C61CC}']
['{C560BCEA-DD5C-4E7C-9CF9-CA3C85F125A1}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -910,7 +979,7 @@ type
{ IContactos_Refresh }
IContactos_Refresh = interface(IDAStronglyTypedDataTable)
['{F229F382-4386-4D8B-A6B7-B44A621DC612}']
['{A0564370-4FA9-4661-B772-CCFDB39796DC}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -1185,7 +1254,7 @@ type
{ IPersonalContacto }
IPersonalContacto = interface(IDAStronglyTypedDataTable)
['{7E45B5B2-567C-4AB4-8235-0A9FB607859C}']
['{75C4175C-04F7-4257-B046-13DBEAF4D107}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -1328,7 +1397,7 @@ type
{ IPacientes }
IPacientes = interface(IDAStronglyTypedDataTable)
['{0E86AB13-9946-4952-8A92-775A2993A788}']
['{11E360A2-9838-4DE0-9986-A1D6F55481C7}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
@ -1441,6 +1510,10 @@ type
procedure SetPABELLONValue(const aValue: String);
function GetPABELLONIsNull: Boolean;
procedure SetPABELLONIsNull(const aValue: Boolean);
function GetDOCTORValue: String;
procedure SetDOCTORValue(const aValue: String);
function GetDOCTORIsNull: Boolean;
procedure SetDOCTORIsNull(const aValue: Boolean);
{ Properties }
@ -1500,6 +1573,8 @@ type
property CAUSA_BAJAIsNull: Boolean read GetCAUSA_BAJAIsNull write SetCAUSA_BAJAIsNull;
property PABELLON: String read GetPABELLONValue write SetPABELLONValue;
property PABELLONIsNull: Boolean read GetPABELLONIsNull write SetPABELLONIsNull;
property DOCTOR: String read GetDOCTORValue write SetDOCTORValue;
property DOCTORIsNull: Boolean read GetDOCTORIsNull write SetDOCTORIsNull;
end;
{ TPacientesDataTableRules }
@ -1620,6 +1695,10 @@ type
procedure SetPABELLONValue(const aValue: String); virtual;
function GetPABELLONIsNull: Boolean; virtual;
procedure SetPABELLONIsNull(const aValue: Boolean); virtual;
function GetDOCTORValue: String; virtual;
procedure SetDOCTORValue(const aValue: String); virtual;
function GetDOCTORIsNull: Boolean; virtual;
procedure SetDOCTORIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
@ -1678,6 +1757,55 @@ type
property CAUSA_BAJAIsNull: Boolean read GetCAUSA_BAJAIsNull write SetCAUSA_BAJAIsNull;
property PABELLON: String read GetPABELLONValue write SetPABELLONValue;
property PABELLONIsNull: Boolean read GetPABELLONIsNull write SetPABELLONIsNull;
property DOCTOR: String read GetDOCTORValue write SetDOCTORValue;
property DOCTORIsNull: Boolean read GetDOCTORIsNull write SetDOCTORIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
{ IPabellones }
IPabellones = interface(IDAStronglyTypedDataTable)
['{F58D0C7F-9592-43BD-93AF-ADDDE32CEF3F}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
function GetIDIsNull: Boolean;
procedure SetIDIsNull(const aValue: Boolean);
function GetDESCRIPCIONValue: String;
procedure SetDESCRIPCIONValue(const aValue: String);
function GetDESCRIPCIONIsNull: Boolean;
procedure SetDESCRIPCIONIsNull(const aValue: Boolean);
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
end;
{ TPabellonesDataTableRules }
TPabellonesDataTableRules = class(TIntfObjectDADataTableRules, IPabellones)
private
protected
{ Property getters and setters }
function GetIDValue: Integer; virtual;
procedure SetIDValue(const aValue: Integer); virtual;
function GetIDIsNull: Boolean; virtual;
procedure SetIDIsNull(const aValue: Boolean); virtual;
function GetDESCRIPCIONValue: String; virtual;
procedure SetDESCRIPCIONValue(const aValue: String); virtual;
function GetDESCRIPCIONIsNull: Boolean; virtual;
procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
@ -1689,6 +1817,60 @@ implementation
uses Variants, uROBinaryHelpers;
{ TDoctoresDataTableRules }
constructor TDoctoresDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TDoctoresDataTableRules.Destroy;
begin
inherited;
end;
function TDoctoresDataTableRules.GetIDValue: Integer;
begin
result := DataTable.Fields[idx_DoctoresID].AsInteger;
end;
procedure TDoctoresDataTableRules.SetIDValue(const aValue: Integer);
begin
DataTable.Fields[idx_DoctoresID].AsInteger := aValue;
end;
function TDoctoresDataTableRules.GetIDIsNull: boolean;
begin
result := DataTable.Fields[idx_DoctoresID].IsNull;
end;
procedure TDoctoresDataTableRules.SetIDIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_DoctoresID].AsVariant := Null;
end;
function TDoctoresDataTableRules.GetDESCRIPCIONValue: String;
begin
result := DataTable.Fields[idx_DoctoresDESCRIPCION].AsString;
end;
procedure TDoctoresDataTableRules.SetDESCRIPCIONValue(const aValue: String);
begin
DataTable.Fields[idx_DoctoresDESCRIPCION].AsString := aValue;
end;
function TDoctoresDataTableRules.GetDESCRIPCIONIsNull: boolean;
begin
result := DataTable.Fields[idx_DoctoresDESCRIPCION].IsNull;
end;
procedure TDoctoresDataTableRules.SetDESCRIPCIONIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_DoctoresDESCRIPCION].AsVariant := Null;
end;
{ TContactosDataTableRules }
constructor TContactosDataTableRules.Create(aDataTable: TDADataTable);
var
@ -4035,13 +4217,90 @@ begin
DataTable.Fields[idx_PacientesPABELLON].AsVariant := Null;
end;
function TPacientesDataTableRules.GetDOCTORValue: String;
begin
result := DataTable.Fields[idx_PacientesDOCTOR].AsString;
end;
procedure TPacientesDataTableRules.SetDOCTORValue(const aValue: String);
begin
DataTable.Fields[idx_PacientesDOCTOR].AsString := aValue;
end;
function TPacientesDataTableRules.GetDOCTORIsNull: boolean;
begin
result := DataTable.Fields[idx_PacientesDOCTOR].IsNull;
end;
procedure TPacientesDataTableRules.SetDOCTORIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_PacientesDOCTOR].AsVariant := Null;
end;
{ TPabellonesDataTableRules }
constructor TPabellonesDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TPabellonesDataTableRules.Destroy;
begin
inherited;
end;
function TPabellonesDataTableRules.GetIDValue: Integer;
begin
result := DataTable.Fields[idx_PabellonesID].AsInteger;
end;
procedure TPabellonesDataTableRules.SetIDValue(const aValue: Integer);
begin
DataTable.Fields[idx_PabellonesID].AsInteger := aValue;
end;
function TPabellonesDataTableRules.GetIDIsNull: boolean;
begin
result := DataTable.Fields[idx_PabellonesID].IsNull;
end;
procedure TPabellonesDataTableRules.SetIDIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_PabellonesID].AsVariant := Null;
end;
function TPabellonesDataTableRules.GetDESCRIPCIONValue: String;
begin
result := DataTable.Fields[idx_PabellonesDESCRIPCION].AsString;
end;
procedure TPabellonesDataTableRules.SetDESCRIPCIONValue(const aValue: String);
begin
DataTable.Fields[idx_PabellonesDESCRIPCION].AsString := aValue;
end;
function TPabellonesDataTableRules.GetDESCRIPCIONIsNull: boolean;
begin
result := DataTable.Fields[idx_PabellonesDESCRIPCION].IsNull;
end;
procedure TPabellonesDataTableRules.SetDESCRIPCIONIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_PabellonesDESCRIPCION].AsVariant := Null;
end;
initialization
RegisterDataTableRules(RID_Doctores, TDoctoresDataTableRules);
RegisterDataTableRules(RID_Contactos, TContactosDataTableRules);
RegisterDataTableRules(RID_DatosBancarios, TDatosBancariosDataTableRules);
RegisterDataTableRules(RID_DireccionesContacto, TDireccionesContactoDataTableRules);
RegisterDataTableRules(RID_Contactos_Refresh, TContactos_RefreshDataTableRules);
RegisterDataTableRules(RID_PersonalContacto, TPersonalContactoDataTableRules);
RegisterDataTableRules(RID_Pacientes, TPacientesDataTableRules);
RegisterDataTableRules(RID_Pabellones, TPabellonesDataTableRules);
end.

View File

@ -9,17 +9,65 @@ const
{ Delta rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_ContactosDelta = '{83090F71-F00B-4D1A-88EE-8A5FDEA11091}';
RID_DatosBancariosDelta = '{657B549F-B362-41BE-88BA-D5D9A949DEEC}';
RID_DireccionesContactoDelta = '{4C3C24B7-E822-435C-A50F-A5277C128EB7}';
RID_Contactos_RefreshDelta = '{28CA07B8-EFF9-4CCD-9BC5-131999C9AD63}';
RID_PersonalContactoDelta = '{0017AE39-9949-4AE6-984E-371BC57EFA3B}';
RID_PacientesDelta = '{442B4BC7-B6D6-4637-839F-5EC54A16674A}';
RID_DoctoresDelta = '{E89BE105-8CBA-49E3-8180-7A728C1B231C}';
RID_ContactosDelta = '{6E95CF54-C1D3-450B-9CA3-7BF11C63F0F7}';
RID_DatosBancariosDelta = '{DEA3B217-7C5B-4255-8F50-57386619D05C}';
RID_DireccionesContactoDelta = '{4A089152-E5D3-4064-9F0F-A90AC9AE1858}';
RID_Contactos_RefreshDelta = '{73D43132-7CB1-4D1F-AB06-3AD83DF063FE}';
RID_PersonalContactoDelta = '{874E346D-3F5D-45FD-AA3C-B1FCFB39E72B}';
RID_PacientesDelta = '{15119009-9B83-49DC-96EB-D11DB1E7B5BD}';
RID_PabellonesDelta = '{D4D04445-8F70-4C11-A774-7EAEBDF45F36}';
type
{ IDoctoresDelta }
IDoctoresDelta = interface(IDoctores)
['{E89BE105-8CBA-49E3-8180-7A728C1B231C}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldDESCRIPCIONValue : String;
{ Properties }
property OldID : Integer read GetOldIDValue;
property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
end;
{ TDoctoresBusinessProcessorRules }
TDoctoresBusinessProcessorRules = class(TDABusinessProcessorRules, IDoctores, IDoctoresDelta)
private
protected
{ Property getters and setters }
function GetIDValue: Integer; virtual;
function GetIDIsNull: Boolean; virtual;
function GetOldIDValue: Integer; virtual;
function GetOldIDIsNull: Boolean; virtual;
procedure SetIDValue(const aValue: Integer); virtual;
procedure SetIDIsNull(const aValue: Boolean); virtual;
function GetDESCRIPCIONValue: String; virtual;
function GetDESCRIPCIONIsNull: Boolean; virtual;
function GetOldDESCRIPCIONValue: String; virtual;
function GetOldDESCRIPCIONIsNull: Boolean; virtual;
procedure SetDESCRIPCIONValue(const aValue: String); virtual;
procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
property IDIsNull : Boolean read GetIDIsNull write SetIDIsNull;
property OldID : Integer read GetOldIDValue;
property OldIDIsNull : Boolean read GetOldIDIsNull;
property DESCRIPCION : String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property DESCRIPCIONIsNull : Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
property OldDESCRIPCIONIsNull : Boolean read GetOldDESCRIPCIONIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
destructor Destroy; override;
end;
{ IContactosDelta }
IContactosDelta = interface(IContactos)
['{83090F71-F00B-4D1A-88EE-8A5FDEA11091}']
['{6E95CF54-C1D3-450B-9CA3-7BF11C63F0F7}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_CATEGORIAValue : Integer;
@ -318,7 +366,7 @@ type
{ IDatosBancariosDelta }
IDatosBancariosDelta = interface(IDatosBancarios)
['{657B549F-B362-41BE-88BA-D5D9A949DEEC}']
['{DEA3B217-7C5B-4255-8F50-57386619D05C}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_CONTACTOValue : Integer;
@ -448,7 +496,7 @@ type
{ IDireccionesContactoDelta }
IDireccionesContactoDelta = interface(IDireccionesContacto)
['{4C3C24B7-E822-435C-A50F-A5277C128EB7}']
['{4A089152-E5D3-4064-9F0F-A90AC9AE1858}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_CONTACTOValue : Integer;
@ -663,7 +711,7 @@ type
{ IContactos_RefreshDelta }
IContactos_RefreshDelta = interface(IContactos_Refresh)
['{28CA07B8-EFF9-4CCD-9BC5-131999C9AD63}']
['{73D43132-7CB1-4D1F-AB06-3AD83DF063FE}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldNIF_CIFValue : String;
@ -938,7 +986,7 @@ type
{ IPersonalContactoDelta }
IPersonalContactoDelta = interface(IPersonalContacto)
['{0017AE39-9949-4AE6-984E-371BC57EFA3B}']
['{874E346D-3F5D-45FD-AA3C-B1FCFB39E72B}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_CONTACTOValue : Integer;
@ -1080,7 +1128,7 @@ type
{ IPacientesDelta }
IPacientesDelta = interface(IPacientes)
['{442B4BC7-B6D6-4637-839F-5EC54A16674A}']
['{15119009-9B83-49DC-96EB-D11DB1E7B5BD}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldID_CATEGORIAValue : Integer;
@ -1110,6 +1158,7 @@ type
function GetOldFECHA_BAJAValue : DateTime;
function GetOldCAUSA_BAJAValue : String;
function GetOldPABELLONValue : String;
function GetOldDOCTORValue : String;
{ Properties }
property OldID : Integer read GetOldIDValue;
@ -1140,6 +1189,7 @@ type
property OldFECHA_BAJA : DateTime read GetOldFECHA_BAJAValue;
property OldCAUSA_BAJA : String read GetOldCAUSA_BAJAValue;
property OldPABELLON : String read GetOldPABELLONValue;
property OldDOCTOR : String read GetOldDOCTORValue;
end;
{ TPacientesBusinessProcessorRules }
@ -1316,6 +1366,12 @@ type
function GetOldPABELLONIsNull: Boolean; virtual;
procedure SetPABELLONValue(const aValue: String); virtual;
procedure SetPABELLONIsNull(const aValue: Boolean); virtual;
function GetDOCTORValue: String; virtual;
function GetDOCTORIsNull: Boolean; virtual;
function GetOldDOCTORValue: String; virtual;
function GetOldDOCTORIsNull: Boolean; virtual;
procedure SetDOCTORValue(const aValue: String); virtual;
procedure SetDOCTORIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
@ -1430,6 +1486,56 @@ type
property PABELLONIsNull : Boolean read GetPABELLONIsNull write SetPABELLONIsNull;
property OldPABELLON : String read GetOldPABELLONValue;
property OldPABELLONIsNull : Boolean read GetOldPABELLONIsNull;
property DOCTOR : String read GetDOCTORValue write SetDOCTORValue;
property DOCTORIsNull : Boolean read GetDOCTORIsNull write SetDOCTORIsNull;
property OldDOCTOR : String read GetOldDOCTORValue;
property OldDOCTORIsNull : Boolean read GetOldDOCTORIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
destructor Destroy; override;
end;
{ IPabellonesDelta }
IPabellonesDelta = interface(IPabellones)
['{D4D04445-8F70-4C11-A774-7EAEBDF45F36}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldDESCRIPCIONValue : String;
{ Properties }
property OldID : Integer read GetOldIDValue;
property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
end;
{ TPabellonesBusinessProcessorRules }
TPabellonesBusinessProcessorRules = class(TDABusinessProcessorRules, IPabellones, IPabellonesDelta)
private
protected
{ Property getters and setters }
function GetIDValue: Integer; virtual;
function GetIDIsNull: Boolean; virtual;
function GetOldIDValue: Integer; virtual;
function GetOldIDIsNull: Boolean; virtual;
procedure SetIDValue(const aValue: Integer); virtual;
procedure SetIDIsNull(const aValue: Boolean); virtual;
function GetDESCRIPCIONValue: String; virtual;
function GetDESCRIPCIONIsNull: Boolean; virtual;
function GetOldDESCRIPCIONValue: String; virtual;
function GetOldDESCRIPCIONIsNull: Boolean; virtual;
procedure SetDESCRIPCIONValue(const aValue: String); virtual;
procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID : Integer read GetIDValue write SetIDValue;
property IDIsNull : Boolean read GetIDIsNull write SetIDIsNull;
property OldID : Integer read GetOldIDValue;
property OldIDIsNull : Boolean read GetOldIDIsNull;
property DESCRIPCION : String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property DESCRIPCIONIsNull : Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
property OldDESCRIPCIONIsNull : Boolean read GetOldDESCRIPCIONIsNull;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
@ -1442,6 +1548,80 @@ implementation
uses
Variants, uROBinaryHelpers, uDAInterfaces;
{ TDoctoresBusinessProcessorRules }
constructor TDoctoresBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
begin
inherited;
end;
destructor TDoctoresBusinessProcessorRules.Destroy;
begin
inherited;
end;
function TDoctoresBusinessProcessorRules.GetIDValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DoctoresID];
end;
function TDoctoresBusinessProcessorRules.GetIDIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_DoctoresID]);
end;
function TDoctoresBusinessProcessorRules.GetOldIDValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DoctoresID];
end;
function TDoctoresBusinessProcessorRules.GetOldIDIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_DoctoresID]);
end;
procedure TDoctoresBusinessProcessorRules.SetIDValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DoctoresID] := aValue;
end;
procedure TDoctoresBusinessProcessorRules.SetIDIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_DoctoresID] := Null;
end;
function TDoctoresBusinessProcessorRules.GetDESCRIPCIONValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_DoctoresDESCRIPCION];
end;
function TDoctoresBusinessProcessorRules.GetDESCRIPCIONIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_DoctoresDESCRIPCION]);
end;
function TDoctoresBusinessProcessorRules.GetOldDESCRIPCIONValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_DoctoresDESCRIPCION];
end;
function TDoctoresBusinessProcessorRules.GetOldDESCRIPCIONIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_DoctoresDESCRIPCION]);
end;
procedure TDoctoresBusinessProcessorRules.SetDESCRIPCIONValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_DoctoresDESCRIPCION] := aValue;
end;
procedure TDoctoresBusinessProcessorRules.SetDESCRIPCIONIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_DoctoresDESCRIPCION] := Null;
end;
{ TContactosBusinessProcessorRules }
constructor TContactosBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
var
@ -4862,13 +5042,120 @@ begin
BusinessProcessor.CurrentChange.NewValueByName[fld_PacientesPABELLON] := Null;
end;
function TPacientesBusinessProcessorRules.GetDOCTORValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_PacientesDOCTOR];
end;
function TPacientesBusinessProcessorRules.GetDOCTORIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PacientesDOCTOR]);
end;
function TPacientesBusinessProcessorRules.GetOldDOCTORValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_PacientesDOCTOR];
end;
function TPacientesBusinessProcessorRules.GetOldDOCTORIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PacientesDOCTOR]);
end;
procedure TPacientesBusinessProcessorRules.SetDOCTORValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_PacientesDOCTOR] := aValue;
end;
procedure TPacientesBusinessProcessorRules.SetDOCTORIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_PacientesDOCTOR] := Null;
end;
{ TPabellonesBusinessProcessorRules }
constructor TPabellonesBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
begin
inherited;
end;
destructor TPabellonesBusinessProcessorRules.Destroy;
begin
inherited;
end;
function TPabellonesBusinessProcessorRules.GetIDValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_PabellonesID];
end;
function TPabellonesBusinessProcessorRules.GetIDIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PabellonesID]);
end;
function TPabellonesBusinessProcessorRules.GetOldIDValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_PabellonesID];
end;
function TPabellonesBusinessProcessorRules.GetOldIDIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PabellonesID]);
end;
procedure TPabellonesBusinessProcessorRules.SetIDValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_PabellonesID] := aValue;
end;
procedure TPabellonesBusinessProcessorRules.SetIDIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_PabellonesID] := Null;
end;
function TPabellonesBusinessProcessorRules.GetDESCRIPCIONValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_PabellonesDESCRIPCION];
end;
function TPabellonesBusinessProcessorRules.GetDESCRIPCIONIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_PabellonesDESCRIPCION]);
end;
function TPabellonesBusinessProcessorRules.GetOldDESCRIPCIONValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_PabellonesDESCRIPCION];
end;
function TPabellonesBusinessProcessorRules.GetOldDESCRIPCIONIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_PabellonesDESCRIPCION]);
end;
procedure TPabellonesBusinessProcessorRules.SetDESCRIPCIONValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_PabellonesDESCRIPCION] := aValue;
end;
procedure TPabellonesBusinessProcessorRules.SetDESCRIPCIONIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_PabellonesDESCRIPCION] := Null;
end;
initialization
RegisterBusinessProcessorRules(RID_DoctoresDelta, TDoctoresBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_ContactosDelta, TContactosBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_DatosBancariosDelta, TDatosBancariosBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_DireccionesContactoDelta, TDireccionesContactoBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_Contactos_RefreshDelta, TContactos_RefreshBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_PersonalContactoDelta, TPersonalContactoBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_PacientesDelta, TPacientesBusinessProcessorRules);
RegisterBusinessProcessorRules(RID_PabellonesDelta, TPabellonesBusinessProcessorRules);
end.

View File

@ -61,11 +61,19 @@ type
function GetCAUSA_BAJAValue: String;
procedure SetCAUSA_BAJAValue(const aValue: String);
function GetPABELLONValue: String;
procedure SetPABELLONValue(const aValue: String);
function GetDOCTORValue: String;
procedure SetDOCTORValue(const aValue: String);
property FECHA_NACIMIENTO: TDateTime read GetFECHA_NACIMIENTOValue write SetFECHA_NACIMIENTOValue;
property NUMERO_SS: String read GetNUMERO_SSValue write SetNUMERO_SSValue;
property FECHA_BAJA: TDateTime read GetFECHA_BAJAValue write SetFECHA_BAJAValue;
property FECHA_BAJAIsNull: Boolean read GetFECHA_BAJAIsNull write SetFECHA_BAJAIsNull;
property CAUSA_BAJA: String read GetCAUSA_BAJAValue write SetCAUSA_BAJAValue;
property PABELLON: String read GetPABELLONValue write SetPABELLONValue;
property DOCTOR: String read GetDOCTORValue write SetDOCTORValue;
end;
TBizContacto = class(TContactosDataTableRules, IBizContacto, ISeleccionable)
@ -128,12 +136,21 @@ type
function GetCAUSA_BAJAValue: String;
procedure SetCAUSA_BAJAValue(const aValue: String);
function GetPABELLONValue: String;
procedure SetPABELLONValue(const aValue: String);
function GetDOCTORValue: String;
procedure SetDOCTORValue(const aValue: String);
public
property FECHA_NACIMIENTO: TDateTime read GetFECHA_NACIMIENTOValue write SetFECHA_NACIMIENTOValue;
property NUMERO_SS: String read GetNUMERO_SSValue write SetNUMERO_SSValue;
property FECHA_BAJA: TDateTime read GetFECHA_BAJAValue write SetFECHA_BAJAValue;
property FECHA_BAJAIsNull: Boolean read GetFECHA_BAJAIsNull write SetFECHA_BAJAIsNull;
property CAUSA_BAJA: String read GetCAUSA_BAJAValue write SetCAUSA_BAJAValue;
property PABELLON: String read GetPABELLONValue write SetPABELLONValue;
property DOCTOR: String read GetDOCTORValue write SetDOCTORValue;
procedure IniciarValoresContactoNuevo; override;
end;
@ -242,6 +259,11 @@ begin
result := DataTable.Fields[idx_PacientesNUMERO_SS].AsString;
end;
function TBizPaciente.GetPABELLONValue: String;
begin
result := DataTable.Fields[idx_PacientesPABELLON].AsString;
end;
function TBizPaciente.GetFECHA_NACIMIENTOValue: TDateTime;
begin
result := DataTable.Fields[idx_PacientesFECHA_NACIMIENTO].AsDateTime;
@ -258,6 +280,11 @@ begin
DataTable.Fields[idx_PacientesNUMERO_SS].AsString := aValue;
end;
procedure TBizPaciente.SetPABELLONValue(const aValue: String);
begin
DataTable.Fields[idx_PacientesPABELLON].AsString := aValue;
end;
procedure TBizPaciente.SetFECHA_NACIMIENTOValue(const aValue: TDateTime);
begin
DataTable.Fields[idx_PacientesFECHA_NACIMIENTO].AsDateTime := aValue;
@ -273,6 +300,16 @@ begin
DataTable.Fields[idx_PacientesCAUSA_BAJA].AsString := aValue;
end;
function TBizPaciente.GetDOCTORValue: String;
begin
result := DataTable.Fields[idx_PacientesDOCTOR].AsString;
end;
procedure TBizPaciente.SetDOCTORValue(const aValue: String);
begin
DataTable.Fields[idx_PacientesPABELLON].AsString := aValue;
end;
function TBizPaciente.GetFECHA_BAJAIsNull: Boolean;
begin
result := DataTable.Fields[idx_PacientesFECHA_BAJA].IsNull;

View File

@ -0,0 +1,26 @@
unit uBizDoctores;
interface
uses
uDAInterfaces, uDADataTable, schContactosClient_Intf;
const
BIZ_CLIENT_DOCTORES = 'Client.Doctores';
type
IBizDoctor = interface(IDoctores)
['{B18DD89A-FA5F-4B1D-8846-5C8AC90D33BE}']
end;
TBizDoctor = class(TDoctoresDataTableRules, IBizDoctor)
end;
implementation
initialization
RegisterDataTableRules(BIZ_CLIENT_DOCTORES, TBizDoctor);
finalization
end.

View File

@ -0,0 +1,26 @@
unit uBizPabellones;
interface
uses
uDAInterfaces, uDADataTable, schContactosClient_Intf;
const
BIZ_CLIENT_PABELLONES = 'Client.Pabellones';
type
IBizPabellon = interface(IPabellones)
['{EBC1EB45-52FA-42C4-BC2E-7BC980FDB191}']
end;
TBizPabellon = class(TPabellonesDataTableRules, IBizPabellon)
end;
implementation
initialization
RegisterDataTableRules(BIZ_CLIENT_PABELLONES, TBizPabellon);
finalization
end.

View File

@ -85,6 +85,7 @@ begin
ParamByName('FECHA_BAJA').Value := aChange.NewValueByName[fld_PacientesFECHA_BAJA];
ParamByName('CAUSA_BAJA').Value := aChange.NewValueByName[fld_PacientesCAUSA_BAJA];
ParamByName('PABELLON').Value := aChange.NewValueByName[fld_PacientesPABELLON];
ParamByName('DOCTOR').Value := aChange.NewValueByName[fld_PacientesDOCTOR];
Execute;
end;
finally
@ -112,7 +113,8 @@ begin
ParamByName('NUMERO_SS').Value := aChange.NewValueByName[fld_PacientesNUMERO_SS];
ParamByName('FECHA_BAJA').Value := aChange.NewValueByName[fld_PacientesFECHA_BAJA];
ParamByName('CAUSA_BAJA').Value := aChange.NewValueByName[fld_PacientesCAUSA_BAJA];
ParamByName('PABELLON').Value := aChange.NewValueByName[fld_PacientesPABELLON];
ParamByName('PABELLON').Value := aChange.NewValueByName[fld_PacientesPABELLON];
ParamByName('DOCTOR').Value := aChange.NewValueByName[fld_PacientesDOCTOR];
Execute;
end;
finally

View File

@ -207,6 +207,36 @@ object PluginContactos: TPluginContactos
000049454E44AE426082}
Name = 'PngImage7'
Background = clWindow
end
item
PngImage.Data = {
89504E470D0A1A0A0000000D4948445200000018000000180806000000E0773D
F8000000097048597300004E2000004E2001167D99DE000002D14944415478DA
B5965F4853511CC7BF238A120DD9437F1E621B0D7D547AE8C18712F1DF42D1C0
87081F7C08121FFA4744B190A0B70211A2B208315965A0CDE58386A5CBD61FC5
6C2B373633B76BC66C19AD6DEA74BBF776EECDDDEEDDBDFBF390077E9CB373EF
F97CCEF9FDCE85A95896C56636D5A60BB279A9BD1945A4B3274D179FE980831B
3C849E0D61969FFC49C228E2661424E0A5A5C59279ABD52E481202864C2C9168
CD5620867BBD7E84C32BFC7C5E5E0E74BABD82645787DE1E248265F2E307896B
D908C4709F6F910F71D36AF7F0C1497698B6221C896171E3045D990462F89CEF
17E67D140AEA86A056ABF9E7C160086E7339343A2D749A7C5EE2370154040890
E723E90492B4CC8741CD7DE1E186EA2AC97BC3CF47E1EA2B8376BF1EDA7DB9BC
C4DA0738498E3EA71248764E919D7B2914127875129C21579BA619BC181985C7
5C213949A705F8E8571028E5BCB0EE1981572AC2E3711A71D2DB6C36CCF45748
6A02D1155629DD168AFAAE989664381F710693136F3163A98446B35B72BB3889
4A69E79AAA27A8AF3F9A153C31FE303106EF609DEC249C8015E7BC80A4C59021
2DC9707AA3F738A730FBB44A52135E9000A52B6826384DFF7DEE763AB0306410
D60B45AE39D6C20E3CBA29812716769CDEA6F831D61A9764F2D793D3B8DD6684
CB3EA54A2B10EFEADEB9ED686E6AFA772A86C1DDEE6E1CB918909D6CDCEECA2C
10C3B9455D17720401CB32585B5B46574F1F2ACFFB65697BFFC99D5E900CE77A
D3A55C41108D86B1BA1AC263CB30CACE7E93D5C4E19A492D309B6EC8E05CF45C
DE89138DC7118B45115909612918C5CB57361C3AF55556F069CF6C6A41EFFD76
199C1BF75EC94763432DD97D0881DF71B40E14A13CFF164A5A28099C6B69053D
9D6D3238D7F75F55A3A1E6309F1E2ED663AB181B5FC0C1935E093CA3A0FBCE75
3CB08CC9AE23FDC6809AF203041EE14FB11E5BC18423842D25838AD737A560CE
FD0EFFAB0982CDFE57F107B61AA443A57B28CB0000000049454E44AE426082}
Name = 'PngImage6'
Background = clWindow
end>
Left = 232
Top = 16
@ -219,10 +249,23 @@ object PluginContactos: TPluginContactos
object actPacientes: TAction
Category = 'Pacientes'
Caption = 'Pacientes'
ImageIndex = 0
ImageIndex = 2
OnExecute = actPacientesExecute
OnUpdate = actPacientesUpdate
end
object actDoctores: TAction
Category = 'Doctores'
Caption = 'Doctores'
ImageIndex = 1
OnExecute = actDoctoresExecute
end
object actPabellones: TAction
Category = 'Pabellones'
Caption = 'Pabellones'
ImageIndex = 6
OnExecute = actPabellonesExecute
OnUpdate = actPabellonesUpdate
end
end
object MainMenu: TMainMenu
Images = SmallImages
@ -237,6 +280,12 @@ object PluginContactos: TPluginContactos
Tag = 500
Action = actPacientes
end
object actDoctores1: TMenuItem
Action = actDoctores
end
object Pabellones1: TMenuItem
Action = actPabellones
end
end
end
object SmallImages: TPngImageList

View File

@ -21,8 +21,15 @@ type
SmallImages: TPngImageList;
Ventas1: TMenuItem;
Pacientes1: TMenuItem;
actDoctores: TAction;
actDoctores1: TMenuItem;
actPabellones: TAction;
Pabellones1: TMenuItem;
procedure actPacientesExecute(Sender: TObject);
procedure actPacientesUpdate(Sender: TObject);
procedure actDoctoresExecute(Sender: TObject);
procedure actPabellonesExecute(Sender: TObject);
procedure actPabellonesUpdate(Sender: TObject);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
@ -34,8 +41,8 @@ implementation
uses
Forms, Dialogs, uGUIBase, uCustomEditor, SysUtils, uContactosController,
uPacientesController,
uContactosViewRegister, uBizContactos, uFactuGES_App;
uPacientesController, uDoctoresController, uPabellonesController,
uContactosViewRegister, uBizContactos, uBizDoctores, uBizPabellones, uFactuGES_App;
function GetModule : TModuleController;
begin
@ -48,6 +55,31 @@ exports
{
******************************* TModuleContactos *******************************
}
procedure TPluginContactos.actDoctoresExecute(Sender: TObject);
var
ADoctoresController : IDoctoresController;
ADoctores : IBizDoctor;
begin
ADoctoresController := TDoctoresController.Create;
ADoctores := (ADoctoresController.BuscarTodos as IBizDoctor);
ADoctoresController.VerTodos(ADoctores);
end;
procedure TPluginContactos.actPabellonesExecute(Sender: TObject);
var
APabellonesController : IPabellonesController;
APabellones : IBizPabellon;
begin
APabellonesController := TPabellonesController.Create;
APabellones := (APabellonesController.BuscarTodos as IBizPabellon);
APabellonesController.VerTodos(APabellones);
end;
procedure TPluginContactos.actPabellonesUpdate(Sender: TObject);
begin
(Sender as TAction).Enabled := Assigned(AppFactuGES.EmpresaActiva);
end;
procedure TPluginContactos.actPacientesExecute(Sender: TObject);
var
APacientesController : IPacientesController;
@ -80,6 +112,7 @@ begin
inherited;
end;
initialization
uHostManager.RegisterModuleClass(TPluginContactos);

View File

@ -13,6 +13,42 @@ object srvContactos: TsrvContactos
DataDictionary = DataDictionary
Diagrams = Diagrams
Datasets = <
item
Params = <>
Statements = <
item
Connection = 'IBX'
ConnectionType = 'MSSQL'
Default = True
TargetTable = 'DOCTORES'
Name = 'IBX'
StatementType = stAutoSQL
ColumnMappings = <
item
DatasetField = 'ID'
TableField = 'ID'
end
item
DatasetField = 'DESCRIPCION'
TableField = 'DESCRIPCION'
end>
end>
Name = 'Doctores'
Fields = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_DOCTORES_ID'
DictionaryEntry = 'Doctores_ID'
InPrimaryKey = True
end
item
Name = 'DESCRIPCION'
DataType = datString
Size = 255
DictionaryEntry = 'Doctores_DESCRIPCION'
end>
end
item
Params = <>
Statements = <
@ -965,6 +1001,10 @@ object srvContactos: TsrvContactos
item
DatasetField = 'PABELLON'
TableField = 'PABELLON'
end
item
DatasetField = 'DOCTOR'
TableField = 'DOCTOR'
end>
end>
Name = 'Pacientes'
@ -1133,6 +1173,46 @@ object srvContactos: TsrvContactos
DataType = datString
Size = 255
DictionaryEntry = 'Pacientes_PABELLON'
end
item
Name = 'DOCTOR'
DataType = datString
Size = 255
end>
end
item
Params = <>
Statements = <
item
Connection = 'IBX'
ConnectionType = 'MSSQL'
Default = True
TargetTable = 'PABELLONES'
StatementType = stAutoSQL
ColumnMappings = <
item
DatasetField = 'ID'
TableField = 'ID'
end
item
DatasetField = 'DESCRIPCION'
TableField = 'DESCRIPCION'
end>
end>
Name = 'Pabellones'
Fields = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_PABELLONES_ID'
DictionaryEntry = 'Pabellones_ID'
InPrimaryKey = True
end
item
Name = 'DESCRIPCION'
DataType = datString
Size = 255
DictionaryEntry = 'Pabellones_DESCRIPCION'
end>
end>
JoinDataTables = <>
@ -2074,6 +2154,12 @@ object srvContactos: TsrvContactos
DataType = datString
Size = 255
Value = ''
end
item
Name = 'DOCTOR'
DataType = datString
Size = 255
Value = ''
end>
Statements = <
item
@ -2081,9 +2167,9 @@ object srvContactos: TsrvContactos
TargetTable = 'PACIENTES_DATOS'
SQL =
'INSERT'#10' INTO PACIENTES_DATOS'#10' (ID_PACIENTE, FECHA_NACIMIENTO' +
', NUMERO_SS, FECHA_BAJA, CAUSA_BAJA, PABELLON)'#10' VALUES'#10' (:ID' +
'_PACIENTE, :FECHA_NACIMIENTO, :NUMERO_SS, :FECHA_BAJA, :CAUSA_BA' +
'JA, :PABELLON)'#10
', NUMERO_SS, FECHA_BAJA, CAUSA_BAJA, PABELLON, DOCTOR)'#10' VALUES'#10 +
' (:ID_PACIENTE, :FECHA_NACIMIENTO, :NUMERO_SS, :FECHA_BAJA, :' +
'CAUSA_BAJA, :PABELLON, :DOCTOR)'#10
StatementType = stSQL
ColumnMappings = <>
end>
@ -2119,6 +2205,12 @@ object srvContactos: TsrvContactos
Size = 255
Value = ''
end
item
Name = 'DOCTOR'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'OLD_ID_PACIENTE'
Value = ''
@ -2130,8 +2222,8 @@ object srvContactos: TsrvContactos
SQL =
'UPDATE PACIENTES_DATOS'#10' SET '#10' FECHA_NACIMIENTO = :FECHA_NACI' +
'MIENTO,'#10' NUMERO_SS = :NUMERO_SS,'#10' FECHA_BAJA = :FECHA_BAJA' +
','#10' CAUSA_BAJA = :CAUSA_BAJA,'#10' PABELLON = :PABELLON'#10' WHERE' +
#10' (ID_PACIENTE = :OLD_ID_PACIENTE)'#10
','#10' CAUSA_BAJA = :CAUSA_BAJA,'#10' PABELLON = :PABELLON,'#10' DO' +
'CTOR = :DOCTOR'#10' WHERE'#10' (ID_PACIENTE = :OLD_ID_PACIENTE)'#10
StatementType = stSQL
ColumnMappings = <>
end>
@ -2942,6 +3034,30 @@ object srvContactos: TsrvContactos
DataType = datString
Size = 255
DisplayLabel = 'Pabell'#243'n'
end
item
Name = 'Pabellones_ID'
DataType = datAutoInc
GeneratorName = 'GEN_PABELLONES_ID'
Required = True
DisplayLabel = 'ID'
end
item
Name = 'Pabellones_DESCRIPCION'
DataType = datString
Size = 255
end
item
Name = 'Doctores_ID'
DataType = datAutoInc
GeneratorName = 'GEN_DOCTORES_ID'
Required = True
DisplayLabel = 'ID'
end
item
Name = 'Doctores_DESCRIPCION'
DataType = datString
Size = 255
end>
Left = 126
Top = 14

View File

@ -54,7 +54,10 @@ requires
adortl,
RemObjects_Core_D11,
dxLayoutControlD11,
dxComnD11;
dxComnD11,
GUISDK_D11R,
designide,
xmlrtl;
contains
uContactosViewRegister in 'uContactosViewRegister.pas',
@ -72,6 +75,8 @@ contains
uViewPacientes in 'uViewPacientes.pas' {frViewPacientes: TCustomView},
uViewPersonalContacto in 'uViewPersonalContacto.pas' {frViewPersonalContacto: TCustomView},
uViewContactoDatosBancarios in 'uViewContactoDatosBancarios.pas' {frViewContactoDatosBancarios: TCustomView},
uViewContactoListaDatosBancarios in 'uViewContactoListaDatosBancarios.pas' {frViewContactoListaDatosBancarios: TCustomView};
uViewContactoListaDatosBancarios in 'uViewContactoListaDatosBancarios.pas' {frViewContactoListaDatosBancarios: TCustomView},
uEditorDoctores in 'uEditorDoctores.pas' {fEditorDoctores: TCustomEditor},
uEditorPabellones in 'uEditorPabellones.pas' {fEditorPabellones: TCustomEditor};
end.

View File

@ -49,36 +49,33 @@
<DelphiCompile Include="Contactos_view.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\adortl.dcp" />
<DCCReference Include="..\ApplicationBase.dcp" />
<DCCReference Include="..\Base.dcp" />
<DCCReference Include="..\Contactos_controller.dcp" />
<DCCReference Include="..\Contactos_model.dcp" />
<DCCReference Include="..\cxDataD11.dcp" />
<DCCReference Include="..\cxEditorsD11.dcp" />
<DCCReference Include="..\cxExportD11.dcp" />
<DCCReference Include="..\cxExtEditorsD11.dcp" />
<DCCReference Include="..\cxGridD11.dcp" />
<DCCReference Include="..\cxLibraryD11.dcp" />
<DCCReference Include="..\cxPageControlD11.dcp" />
<DCCReference Include="..\DataAbstract_Core_D11.dcp" />
<DCCReference Include="..\dbrtl.dcp" />
<DCCReference Include="..\dsnap.dcp" />
<DCCReference Include="..\dxComnD11.dcp" />
<DCCReference Include="..\dxCoreD11.dcp" />
<DCCReference Include="..\dxGDIPlusD11.dcp" />
<DCCReference Include="..\dxLayoutControlD11.dcp" />
<DCCReference Include="..\dxThemeD11.dcp" />
<DCCReference Include="..\GUIBase.dcp" />
<DCCReference Include="..\PngComponentsD10.dcp" />
<DCCReference Include="..\PNG_D10.dcp" />
<DCCReference Include="..\RemObjects_Core_D11.dcp" />
<DCCReference Include="..\rtl.dcp" />
<DCCReference Include="..\vcl.dcp" />
<DCCReference Include="..\vclactnband.dcp" />
<DCCReference Include="..\vcldb.dcp" />
<DCCReference Include="..\vcljpg.dcp" />
<DCCReference Include="..\vclx.dcp" />
<DCCReference Include="adortl.dcp" />
<DCCReference Include="ApplicationBase.dcp" />
<DCCReference Include="Base.dcp" />
<DCCReference Include="Contactos_controller.dcp" />
<DCCReference Include="Contactos_model.dcp" />
<DCCReference Include="cxDataD11.dcp" />
<DCCReference Include="cxEditorsD11.dcp" />
<DCCReference Include="cxExportD11.dcp" />
<DCCReference Include="cxExtEditorsD11.dcp" />
<DCCReference Include="cxGridD11.dcp" />
<DCCReference Include="cxLibraryD11.dcp" />
<DCCReference Include="cxPageControlD11.dcp" />
<DCCReference Include="DataAbstract_Core_D11.dcp" />
<DCCReference Include="dbrtl.dcp" />
<DCCReference Include="designide.dcp" />
<DCCReference Include="dsnap.dcp" />
<DCCReference Include="dxComnD11.dcp" />
<DCCReference Include="dxCoreD11.dcp" />
<DCCReference Include="dxGDIPlusD11.dcp" />
<DCCReference Include="dxLayoutControlD11.dcp" />
<DCCReference Include="dxThemeD11.dcp" />
<DCCReference Include="GUIBase.dcp" />
<DCCReference Include="GUISDK_D11R.dcp" />
<DCCReference Include="PngComponentsD10.dcp" />
<DCCReference Include="PNG_D10.dcp" />
<DCCReference Include="RemObjects_Core_D11.dcp" />
<DCCReference Include="rtl.dcp" />
<DCCReference Include="uContactosViewRegister.pas" />
<DCCReference Include="uEditorContacto.pas">
<Form>fEditorContacto</Form>
@ -88,6 +85,10 @@
<Form>fEditorContactos</Form>
<DesignClass>TCustomEditor</DesignClass>
</DCCReference>
<DCCReference Include="uEditorDoctores.pas">
<Form>fEditorDoctores</Form>
<DesignClass>TCustomEditor</DesignClass>
</DCCReference>
<DCCReference Include="uEditorElegirPacientes.pas">
<Form>fEditorElegirPacientes</Form>
<DesignClass>TCustomEditor</DesignClass>
@ -100,6 +101,10 @@
<Form>fEditorFichasPacienteReport</Form>
<DesignClass>TCustomEditor</DesignClass>
</DCCReference>
<DCCReference Include="uEditorPabellones.pas">
<Form>fEditorPabellone</Form>
<DesignClass>TCustomEditor</DesignClass>
</DCCReference>
<DCCReference Include="uEditorPaciente.pas">
<Form>fEditorPaciente</Form>
<DesignClass>TCustomEditor</DesignClass>
@ -140,6 +145,12 @@
<Form>frViewPersonalContacto</Form>
<DesignClass>TCustomView</DesignClass>
</DCCReference>
<DCCReference Include="vcl.dcp" />
<DCCReference Include="vclactnband.dcp" />
<DCCReference Include="vcldb.dcp" />
<DCCReference Include="vcljpg.dcp" />
<DCCReference Include="vclx.dcp" />
<DCCReference Include="xmlrtl.dcp" />
</ItemGroup>
</Project>
<!-- EurekaLog First Line

View File

@ -9,14 +9,15 @@ implementation
uses
uEditorRegistryUtils,
uEditorPacientes,
uEditorPacientes, uEditorDoctores, uEditorPabellones,
uEditorPaciente, uEditorElegirPacientes,
uEditorFichasPacienteReport, uEditorEtiquetasContactosReport;
procedure RegisterViews;
begin
EditorRegistry.RegisterClass(TfEditorPacientes, 'EditorPacientes');
EditorRegistry.RegisterClass(TfEditorDoctores, 'EditorDoctores');
EditorRegistry.RegisterClass(TfEditorPabellones, 'EditorPabellones');
EditorRegistry.RegisterClass(TfEditorPaciente, 'EditorPaciente');
EditorRegistry.RegisterClass(TfEditorElegirPacientes, 'EditorElegirPacientes');
@ -28,6 +29,8 @@ end;
procedure UnregisterViews;
begin
EditorRegistry.UnRegisterClass(TfEditorPacientes);
EditorRegistry.UnRegisterClass(TfEditorDoctores);
EditorRegistry.UnRegisterClass(TfEditorPabellones);
EditorRegistry.UnRegisterClass(TfEditorPaciente);

View File

@ -0,0 +1,178 @@
object fEditorDoctores: TfEditorDoctores
Left = 453
Top = 234
ActiveControl = ListaDoctores
BorderIcons = [biSystemMenu]
BorderStyle = bsSingle
Caption = 'Administraci'#243'n de doctores'
ClientHeight = 499
ClientWidth = 404
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnClose = CustomEditorClose
OnShow = FormShow
InstanceID = 0
ReadOnly = False
PixelsPerInch = 96
TextHeight = 13
object bAceptar: TButton
Left = 226
Top = 464
Width = 75
Height = 25
Action = actAceptar
Default = True
TabOrder = 1
end
object bCancelar: TButton
Left = 314
Top = 464
Width = 75
Height = 25
Action = actCancelar
Cancel = True
TabOrder = 2
end
object PageControl1: TPageControl
Left = 8
Top = 8
Width = 390
Height = 442
ActivePage = TabSheet1
TabOrder = 0
object TabSheet1: TTabSheet
Caption = 'Doctores'
ExplicitLeft = 0
object Label1: TLabel
Left = 47
Top = 15
Width = 81
Height = 13
Caption = 'Lista de doctores'
end
object Image1: TImage
Left = 3
Top = 4
Width = 38
Height = 23
Picture.Data = {
0B546478504E47496D61676589504E470D0A1A0A0000000D4948445200000018
000000180806000000E0773DF8000000017352474200AECE1CE9000000046741
4D410000B18F0BFC6105000000206348524D00007A26000080840000FA000000
80E8000075300000EA6000003A98000017709CBA513C00000009704859730000
17110000171101CA26F33F0000032B49444154484BD595EB4B537118C7EBBF30
825E64146B9BCD4B514A21BD282A283133D0115DD428128A0ABA48584837ACB4
82B4CCE66D6BA42D47492F24B31B6D794967EA72DAE6A6A9B9525B96657C3AE7
804BDBD182F245079E5DD8F87CBECFF33BE7F79B09CC98D64B144C674D2B5C9A
8EF8525EF58AE9A80902E18BFFFAE6F3E2AA3AC6CB522DB5371371D6E9C7FFEC
FF3C3AFA9D9191518687BF32E4FBC287C161FADFFBE8E91F2274F52EF17F3F3B
184FF03C4CA7E34E02F505B1545D5A4545D61AEC2F8C132453C1BB7A072617B8
2A0FF3FA56022DC6AD58F336F1207B1DE693D194A4A971DB1F4A9231F87EDD67
E4AAB3FBBDBCC0D7558BAD2C11CBF558011E2F09EA6FC463B91AC3DD5391541B
52FD70B9B188C945F81B8F575ED06FBBCD4BFD46EA74F1B40A1D384DC9B84C3B
7018B4340AD2B2D34BFC331F1C924F2F76D4E67C37B9C0614EC4634EA6B76237
DDE6145C65DB70080BDD5C1047F9C5587C9F4610E1DE814FF4793FF2B66F1077
CF079C5D5E3A3AFB25784B7BAFBC60D063E14DC53E09EA366D17DEB7D26ED462
2FDE4C4DEE061E949EFB2378D3EBB7932FB2FB590E0EE31629759B2181D6A278
6CF931DCCF8AC36EB3FE36B9086F68E99AE22E7ADCCABDA35A6AF2E368C8DF48
CDD5F59885DB5477300347936DCAB18CC16B5FB9E505EE474F285B1BC3654524
E7D79FA652BF97C27D5B3815B9838C6015252929B4DB1BFC33D71E2840AEAC8D
AE40C180D345C59E54F2D46A0A831564454453793697D2D4A3E42AC229502839
AF54A04B4AA6C95A3D6141C5E4F5CD1E6A6C9D3C6F70F2B4AE2350602FBF4BCE
8A2872C243302854140989AF2C8EE67AC8520CC10B29522AC90E5791366B0E85
82C4DED1279B5EECE8D10B47A0A0F6CA35CECC9F4BF6520D37D42A8C0B9414CE
55502274A317D25F0B559319A5E14850106797AFA4B9AD87467B774072115E65
690B14B4DC36911916464698924B4B1691A751A353A924596E989A0BCB34A42F
9CC7A1A0D914272749F0C9D64056203EFAED560BFAA49D9CD04490AE0AE5B872
11E9421D132A4D1942664414D5A6E229938B7059C1AFDBEDF87DC5E17A27CDFC
77631983CB0AC6EFE57F0B97158807C4BF2EFF81F35F1FFA3F0038EC8C2AD627
CC940000000049454E44AE426082}
Transparent = True
end
object ListaDoctores: TDBLookupListBox
Left = 3
Top = 34
Width = 281
Height = 251
KeyField = 'RecID'
ListField = 'DESCRIPCION'
ListSource = DADataSource
TabOrder = 0
end
object bEliminar: TButton
Left = 304
Top = 34
Width = 75
Height = 25
Action = actEliminar
TabOrder = 1
end
object GroupBox1: TGroupBox
Left = 6
Top = 318
Width = 369
Height = 84
Caption = 'A'#241'adir un nuevo doctor'
TabOrder = 2
object eCategoria: TLabel
Left = 18
Top = 20
Width = 37
Height = 13
Caption = 'Nombre'
end
object bAnadir: TButton
Left = 282
Top = 38
Width = 75
Height = 25
Action = actAnadir
TabOrder = 1
end
object editDoctor: TEdit
Left = 18
Top = 40
Width = 255
Height = 21
TabOrder = 0
end
end
end
end
object ActionList1: TActionList
Left = 144
Top = 16
object actAnadir: TAction
Caption = '&A'#241'adir'
OnExecute = actAnadirExecute
OnUpdate = actAnadirUpdate
end
object actEliminar: TAction
Caption = '&Eliminar'
OnExecute = actEliminarExecute
OnUpdate = actEliminarUpdate
end
object actAceptar: TAction
Caption = 'A&ceptar'
OnExecute = actAceptarExecute
end
object actCancelar: TAction
Caption = '&Cancelar'
OnExecute = actCancelarExecute
end
object actCerrar: TAction
Caption = 'actCerrar'
OnExecute = actCerrarExecute
end
end
object DADataSource: TDADataSource
Left = 168
Top = 16
end
end

View File

@ -0,0 +1,207 @@
{
===============================================================================
Copyright (©) 2006. 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: 22-05-2006
Versión actual: 1.0.0
Fecha versión actual: 22-05-2006
===============================================================================
Modificaciones:
Fecha Comentarios
---------------------------------------------------------------------------
===============================================================================
}
unit uEditorDoctores;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, StdCtrls, DBCtrls, uDADataTable, ActnList,
uIEditorDoctores, uCustomEditor, uGUIBase, ExtCtrls,
ComCtrls, uBizDoctores, uDoctoresController, uDAInterfaces, dxGDIPlusClasses;
type
TfEditorDoctores = class(TCustomEditor, IEditorDoctores)
ActionList1: TActionList;
DADataSource: TDADataSource;
ListaDoctores: TDBLookupListBox;
editDoctor: TEdit;
bAnadir: TButton;
actAnadir: TAction;
actEliminar: TAction;
bEliminar: TButton;
actAceptar: TAction;
actCancelar: TAction;
bAceptar: TButton;
bCancelar: TButton;
actCerrar: TAction;
PageControl1: TPageControl;
TabSheet1: TTabSheet;
GroupBox1: TGroupBox;
Label1: TLabel;
Image1: TImage;
procedure FormShow(Sender: TObject);
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
procedure actAnadirExecute(Sender: TObject);
procedure actEliminarExecute(Sender: TObject);
procedure actAceptarExecute(Sender: TObject);
procedure actCancelarExecute(Sender: TObject);
procedure actCerrarExecute(Sender: TObject);
procedure actAnadirUpdate(Sender: TObject);
procedure actEliminarUpdate(Sender: TObject);
protected
FDoctores: IBizDoctor;
FController: IDoctoresController;
function GetDoctores: IBizDoctor;
procedure SetDoctores(const Value: IBizDoctor);
function GetController : IDoctoresController;
procedure SetController (const Value : IDoctoresController);
function GetWindowCaption : String;
procedure SetWindowCaption(const AValue : String);
property WindowCaption : String read GetWindowCaption write SetWindowCaption;
function GetHeaderText : String;
procedure SetHeaderText(const AValue : String);
property HeaderText : String read GetHeaderText write SetHeaderText;
public
property Doctores: IBizDoctor read GetDoctores write SetDoctores;
property Controller : IDoctoresController read GetController write SetController;
end;
implementation
{$R *.dfm}
{ TfEditorDoctores }
uses
uDialogUtils;
function TfEditorDoctores.GetController: IDoctoresController;
begin
Result := FController;
end;
function TfEditorDoctores.GetDoctores: IBizDoctor;
begin
Result := FDoctores;
end;
function TfEditorDoctores.GetHeaderText: String;
begin
//
end;
function TfEditorDoctores.GetWindowCaption: String;
begin
//
end;
procedure TfEditorDoctores.SetController(const Value: IDoctoresController);
begin
FController := Value;
end;
procedure TfEditorDoctores.SetDoctores(const Value: IBizDoctor);
begin
FDoctores := Value;
DADataSource.DataTable := (FDoctores as IBizDoctor).DataTable;
DADataSource.DataTable.Open;
end;
procedure TfEditorDoctores.SetHeaderText(const AValue: String);
begin
//
end;
procedure TfEditorDoctores.SetWindowCaption(const AValue: String);
begin
//
end;
procedure TfEditorDoctores.actAnadirExecute(Sender: TObject);
begin
if not FController.Localizar(Doctores, editDoctor.Text) then
begin
Doctores.Append;
Doctores.DESCRIPCION := editDoctor.Text;
Doctores.Post;
editDoctor.Clear;
ListaDoctores.SetFocus;
end
else
ShowErrorMessage('Ya existe el doctor ' + editDoctor.Text,
'Ya existe el doctor ''' + editDoctor.Text + ''' en la lista.');
end;
procedure TfEditorDoctores.actEliminarExecute(Sender: TObject);
begin
Doctores.Delete;
ListaDoctores.SetFocus;
end;
procedure TfEditorDoctores.actEliminarUpdate(Sender: TObject);
begin
(Sender as TAction).Enabled := (FDoctores.DataTable.RecordCount > 0) and
(Length(ListaDoctores.SelectedItem) > 0);
end;
procedure TfEditorDoctores.CustomEditorClose(Sender: TObject; var Action: TCloseAction);
begin
FDoctores := Nil;
FController := Nil;
end;
procedure TfEditorDoctores.actAceptarExecute(Sender: TObject);
begin
try
Doctores.DataTable.ApplyUpdates;
except
on E : Exception do begin
Doctores.DataTable.CancelUpdates;
ShowErrorMessage('Error al guardar cambios', 'Se ha producido un error grave', E);
exit;
end;
end;
actCerrar.Execute;
end;
procedure TfEditorDoctores.actCancelarExecute(Sender: TObject);
begin
Doctores.DataTable.CancelUpdates;
actCerrar.Execute;
end;
procedure TfEditorDoctores.actCerrarExecute(Sender: TObject);
begin
Close;
end;
procedure TfEditorDoctores.actAnadirUpdate(Sender: TObject);
begin
(Sender as TAction).Enabled := (Length(editDoctor.Text) > 0)
end;
procedure TfEditorDoctores.FormShow(Sender: TObject);
begin
if not FDoctores.DataTable.Active then
FDoctores.DataTable.Active := true;
editDoctor.SetFocus;
end;
end.

View File

@ -0,0 +1,171 @@
object fEditorPabellones: TfEditorPabellones
Left = 453
Top = 234
ActiveControl = ListaPabellones
BorderIcons = [biSystemMenu]
BorderStyle = bsSingle
Caption = 'Administraci'#243'n de pabellones'
ClientHeight = 499
ClientWidth = 404
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnClose = CustomEditorClose
OnShow = FormShow
InstanceID = 0
ReadOnly = False
PixelsPerInch = 96
TextHeight = 13
object bAceptar: TButton
Left = 226
Top = 464
Width = 75
Height = 25
Action = actAceptar
Default = True
TabOrder = 1
end
object bCancelar: TButton
Left = 314
Top = 464
Width = 75
Height = 25
Action = actCancelar
Cancel = True
TabOrder = 2
end
object PageControl1: TPageControl
Left = 8
Top = 8
Width = 390
Height = 442
ActivePage = TabSheet1
TabOrder = 0
object TabSheet1: TTabSheet
Caption = 'Pabellones'
object Label1: TLabel
Left = 47
Top = 16
Width = 91
Height = 13
Caption = 'Lista de pabellones'
end
object Image1: TImage
Left = 3
Top = 4
Width = 38
Height = 24
Picture.Data = {
0B546478504E47496D61676589504E470D0A1A0A0000000D4948445200000018
000000180806000000E0773DF8000000017352474200AECE1CE9000000046741
4D410000B18F0BFC6105000000206348524D00007A26000080840000FA000000
80E8000075300000EA6000003A98000017709CBA513C00000009704859730000
4E2000004E2001167D99DE0000026E49444154484BB5965F48537114C76F0FBD
596FA1415090FAD0438AAF0541D45B41D48BF4203E46CF51D0631069F61004FD
8120908C1E647FC07637958C88A5223344A49AA6B6E9C69A6EAEB5CDBFDF7EE7
CCDFE5DEDFEEEE6ED02E1C18C7BBCFE7FCCE39BFE101005A5D1F12D4335C15FF
F886D626024AB4C92FBFD19AF15CD338EE8B7005952F49F897B7ED30C7BE8C25
52F054C0EFFD8BC00CF73E6844FFDD431CF4996452420282F789B8ED566086FB
7A9AD4F6807252F2A2E1201E09F02D11DD6E0466B8A7E738C3037A10E313931C
C1D028E7BCBD270CC99D060D9D027EBE96C0D29687270DB8D834CB333CF29EFF
E6EB6B3624578E68687112582AEF2D57AE8BCAD567776F0F5BDB3BD043231527
397DB4CA16D9F55CD74355E185E22672F92202C1B2C43C1362595655DD16D9F3
6A954BF8FAC61FA4D67E8BF90C974FA26C174BEC2AF77A3D352B97F0D5D4067E
2632F0FBFDF6272133AD9B67BFE701176D51E18BF13544977F612810AA98099D
C0D871A781AA6D91954BF8D71F49CC465731E8D32D77C698C5A5CE9B156DD9DE
D9456973ABE292C9A21662697C5F4A616E3E81996F2B88CCC5F0A45FC7A9F68E
CADF235520E1F9428905A5F16E230AE12ECEA9F0C999657702333C9B2B5804C5
CF5DC87EB8C63973E5040F4F2FD616A8F074266F11103CA15FE49C6C8B847F9C
5A7016D8C193E91CC3F29FAE23337615B17717303D709673D473337C6C22EA2C
A08152CFA92D5439C1E3C92CC3D2A397111F3A87C8C019D0BC28A7C26B0AECE0
4B2BEB0C23F8FC6007665FB720F2EA18E7A8E7D41602CB70DC22BA40F4821A04
2BC35B31F5B209E167875960F7AEA380F6F77F8571C1EAF91F05B1FF02D00DDF
9B87525B540000000049454E44AE426082}
Transparent = True
end
object ListaPabellones: TDBLookupListBox
Left = 3
Top = 37
Width = 281
Height = 251
KeyField = 'RecID'
ListField = 'DESCRIPCION'
ListSource = DADataSource
TabOrder = 0
end
object bEliminar: TButton
Left = 302
Top = 37
Width = 75
Height = 25
Action = actEliminar
TabOrder = 1
end
object GroupBox1: TGroupBox
Left = 6
Top = 318
Width = 369
Height = 84
Caption = 'A'#241'adir un nuevo pabell'#243'n'
TabOrder = 2
object eCategoria: TLabel
Left = 18
Top = 20
Width = 37
Height = 13
Caption = 'Nombre'
end
object bAnadir: TButton
Left = 282
Top = 38
Width = 75
Height = 25
Action = actAnadir
TabOrder = 1
end
object editPabellon: TEdit
Left = 21
Top = 39
Width = 255
Height = 21
TabOrder = 0
end
end
end
end
object ActionList1: TActionList
Left = 144
Top = 16
object actAnadir: TAction
Caption = '&A'#241'adir'
OnExecute = actAnadirExecute
OnUpdate = actAnadirUpdate
end
object actEliminar: TAction
Caption = '&Eliminar'
OnExecute = actEliminarExecute
OnUpdate = actEliminarUpdate
end
object actAceptar: TAction
Caption = 'A&ceptar'
OnExecute = actAceptarExecute
end
object actCancelar: TAction
Caption = '&Cancelar'
OnExecute = actCancelarExecute
end
object actCerrar: TAction
Caption = 'actCerrar'
OnExecute = actCerrarExecute
end
end
object DADataSource: TDADataSource
Left = 168
Top = 16
end
end

View File

@ -0,0 +1,208 @@
{
===============================================================================
Copyright (©) 2006. 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: 22-05-2006
Versión actual: 1.0.0
Fecha versión actual: 22-05-2006
===============================================================================
Modificaciones:
Fecha Comentarios
---------------------------------------------------------------------------
===============================================================================
}
unit uEditorPabellones;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, StdCtrls, DBCtrls, uDADataTable, ActnList,
uIEditorPabellones, uCustomEditor, uGUIBase, ExtCtrls,
ComCtrls, uBizPabellones, uPabellonesController, uDAInterfaces,
dxGDIPlusClasses;
type
TfEditorPabellones = class(TCustomEditor, IEditorPabellones)
ActionList1: TActionList;
DADataSource: TDADataSource;
ListaPabellones: TDBLookupListBox;
editPabellon: TEdit;
bAnadir: TButton;
actAnadir: TAction;
actEliminar: TAction;
bEliminar: TButton;
actAceptar: TAction;
actCancelar: TAction;
bAceptar: TButton;
bCancelar: TButton;
actCerrar: TAction;
PageControl1: TPageControl;
TabSheet1: TTabSheet;
GroupBox1: TGroupBox;
Label1: TLabel;
Image1: TImage;
procedure FormShow(Sender: TObject);
procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);
procedure actAnadirExecute(Sender: TObject);
procedure actEliminarExecute(Sender: TObject);
procedure actAceptarExecute(Sender: TObject);
procedure actCancelarExecute(Sender: TObject);
procedure actCerrarExecute(Sender: TObject);
procedure actAnadirUpdate(Sender: TObject);
procedure actEliminarUpdate(Sender: TObject);
protected
FPabellones: IBizPabellon;
FController: IPabellonesController;
function GetPabellones: IBizPabellon;
procedure SetPabellones(const Value: IBizPabellon);
function GetController : IPabellonesController;
procedure SetController (const Value : IPabellonesController);
function GetWindowCaption : String;
procedure SetWindowCaption(const AValue : String);
property WindowCaption : String read GetWindowCaption write SetWindowCaption;
function GetHeaderText : String;
procedure SetHeaderText(const AValue : String);
property HeaderText : String read GetHeaderText write SetHeaderText;
public
property Pabellones: IBizPabellon read GetPabellones write SetPabellones;
property Controller : IPabellonesController read GetController write SetController;
end;
implementation
{$R *.dfm}
{ TfEditorPabellones }
uses
uDialogUtils;
function TfEditorPabellones.GetController: IPabellonesController;
begin
Result := FController;
end;
function TfEditorPabellones.GetPabellones: IBizPabellon;
begin
Result := FPabellones;
end;
function TfEditorPabellones.GetHeaderText: String;
begin
//
end;
function TfEditorPabellones.GetWindowCaption: String;
begin
//
end;
procedure TfEditorPabellones.SetController(const Value: IPabellonesController);
begin
FController := Value;
end;
procedure TfEditorPabellones.SetPabellones(const Value: IBizPabellon);
begin
FPabellones := Value;
DADataSource.DataTable := (FPabellones as IBizPabellon).DataTable;
DADataSource.DataTable.Open;
end;
procedure TfEditorPabellones.SetHeaderText(const AValue: String);
begin
//
end;
procedure TfEditorPabellones.SetWindowCaption(const AValue: String);
begin
//
end;
procedure TfEditorPabellones.actAnadirExecute(Sender: TObject);
begin
if not FController.Localizar(Pabellones, editPabellon.Text) then
begin
Pabellones.Append;
Pabellones.DESCRIPCION := editPabellon.Text;
Pabellones.Post;
editPabellon.Clear;
ListaPabellones.SetFocus;
end
else
ShowErrorMessage('Ya existe el pabellón ' + editPabellon.Text,
'Ya existe el pabellón ''' + editPabellon.Text + ''' en la lista.');
end;
procedure TfEditorPabellones.actEliminarExecute(Sender: TObject);
begin
Pabellones.Delete;
ListaPabellones.SetFocus;
end;
procedure TfEditorPabellones.actEliminarUpdate(Sender: TObject);
begin
(Sender as TAction).Enabled := (FPabellones.DataTable.RecordCount > 0) and
(Length(ListaPabellones.SelectedItem) > 0);
end;
procedure TfEditorPabellones.CustomEditorClose(Sender: TObject; var Action: TCloseAction);
begin
FPabellones := Nil;
FController := Nil;
end;
procedure TfEditorPabellones.actAceptarExecute(Sender: TObject);
begin
try
Pabellones.DataTable.ApplyUpdates;
except
on E : Exception do begin
Pabellones.DataTable.CancelUpdates;
ShowErrorMessage('Error al guardar cambios', 'Se ha producido un error grave', E);
exit;
end;
end;
actCerrar.Execute;
end;
procedure TfEditorPabellones.actCancelarExecute(Sender: TObject);
begin
Pabellones.DataTable.CancelUpdates;
actCerrar.Execute;
end;
procedure TfEditorPabellones.actCerrarExecute(Sender: TObject);
begin
Close;
end;
procedure TfEditorPabellones.actAnadirUpdate(Sender: TObject);
begin
(Sender as TAction).Enabled := (Length(editPabellon.Text) > 0)
end;
procedure TfEditorPabellones.FormShow(Sender: TObject);
begin
if not FPabellones.DataTable.Active then
FPabellones.DataTable.Active := true;
editPabellon.SetFocus;
end;
end.

View File

@ -98,6 +98,7 @@ inherited fEditorPacientes: TfEditorPacientes
FieldName = 'ID'
Column = frViewPacientes1.cxGridViewNIF_CIF
end>
OptionsCustomize.ColumnHidingOnGrouping = False
end
end
inherited frViewFiltroBase1: TfrViewFiltroBase

View File

@ -1,6 +1,8 @@
inherited frViewPaciente: TfrViewPaciente
Width = 673
Height = 518
OnCreate = CustomViewCreate
OnDestroy = CustomViewDestroy
ExplicitWidth = 673
ExplicitHeight = 518
inherited dxLayoutControlContacto: TdxLayoutControl
@ -22,62 +24,62 @@ inherited frViewPaciente: TfrViewPaciente
end
inherited eCalle: TcxDBTextEdit
Left = 121
Top = 247
Top = 301
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 8
TabOrder = 10
ExplicitLeft = 121
ExplicitTop = 247
ExplicitTop = 301
ExplicitWidth = 239
Width = 239
end
inherited cbProvincia: TcxDBComboBox
Left = 121
Top = 274
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 9
ExplicitLeft = 121
ExplicitTop = 274
ExplicitWidth = 138
Width = 138
end
inherited cbPoblacion: TcxDBComboBox
Left = 121
Top = 301
Top = 328
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 11
ExplicitLeft = 121
ExplicitTop = 301
ExplicitTop = 328
ExplicitWidth = 138
Width = 138
end
inherited cbPoblacion: TcxDBComboBox
Left = 121
Top = 355
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 13
ExplicitLeft = 121
ExplicitTop = 355
ExplicitWidth = 239
Width = 239
end
inherited eCodigoPostal: TcxDBTextEdit
Left = 295
Top = 274
Top = 328
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 10
TabOrder = 12
ExplicitLeft = 295
ExplicitTop = 274
ExplicitTop = 328
end
inherited eObservaciones: TcxDBMemo
Top = 385
Top = 439
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 20
ExplicitTop = 385
TabOrder = 22
ExplicitTop = 439
ExplicitWidth = 629
ExplicitHeight = 38
Height = 38
@ -85,7 +87,7 @@ inherited frViewPaciente: TfrViewPaciente
end
object eFechaNacimiento: TcxDBDateEdit [8]
Left = 121
Top = 136
Top = 190
DataBinding.DataField = 'FECHA_NACIMIENTO'
DataBinding.DataSource = dsContacto
Style.BorderColor = clWindowFrame
@ -97,7 +99,7 @@ inherited frViewPaciente: TfrViewPaciente
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 5
TabOrder = 7
Width = 239
end
object eNumeroSS: TcxDBTextEdit [9]
@ -120,7 +122,7 @@ inherited frViewPaciente: TfrViewPaciente
end
object eFechaBaja: TcxDBDateEdit [10]
Left = 121
Top = 163
Top = 217
DataBinding.DataField = 'FECHA_BAJA'
DataBinding.DataSource = dsContacto
Style.BorderColor = clWindowFrame
@ -132,12 +134,12 @@ inherited frViewPaciente: TfrViewPaciente
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 6
TabOrder = 8
Width = 229
end
object eCausaBaja: TcxDBTextEdit [11]
Left = 121
Top = 190
Top = 244
DataBinding.DataField = 'CAUSA_BAJA'
DataBinding.DataSource = dsContacto
Style.BorderColor = clWindowFrame
@ -152,7 +154,7 @@ inherited frViewPaciente: TfrViewPaciente
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 7
TabOrder = 9
Width = 229
end
inherited eTlfParticular: TcxDBTextEdit
@ -161,7 +163,7 @@ inherited frViewPaciente: TfrViewPaciente
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 14
TabOrder = 16
ExplicitLeft = 485
ExplicitWidth = 166
Width = 166
@ -172,18 +174,36 @@ inherited frViewPaciente: TfrViewPaciente
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 13
TabOrder = 15
ExplicitLeft = 485
ExplicitWidth = 166
Width = 166
end
object ePabellon: TcxDBTextEdit [14]
Left = 121
Top = 163
DataBinding.DataField = 'PABELLON'
DataBinding.DataSource = dsContacto
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 6
Width = 239
end
inherited eTlfMovil: TcxDBTextEdit
Left = 485
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 15
TabOrder = 17
ExplicitLeft = 485
ExplicitWidth = 166
Width = 166
@ -194,7 +214,7 @@ inherited frViewPaciente: TfrViewPaciente
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 16
TabOrder = 18
ExplicitLeft = 485
ExplicitWidth = 166
Width = 166
@ -209,6 +229,34 @@ inherited frViewPaciente: TfrViewPaciente
ExplicitWidth = 239
Width = 239
end
object cbDoctor: TcxDBComboBox [18]
Left = 121
Top = 109
DataBinding.DataField = 'DOCTOR'
DataBinding.DataSource = dsContacto
Properties.ImmediatePost = True
Properties.OnInitPopup = cbDoctorPropertiesInitPopup
Properties.OnValidate = cbDoctorPropertiesValidate
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.LookAndFeel.SkinName = ''
Style.ButtonStyle = bts3D
Style.PopupBorderStyle = epbsFrame3D
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 4
Width = 183
end
inherited eNIFCIF: TcxDBTextEdit
Left = 231
Style.LookAndFeel.SkinName = ''
@ -226,7 +274,7 @@ inherited frViewPaciente: TfrViewPaciente
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 17
TabOrder = 19
ExplicitLeft = 485
ExplicitWidth = 137
Width = 137
@ -238,7 +286,7 @@ inherited frViewPaciente: TfrViewPaciente
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 18
TabOrder = 20
ExplicitLeft = 485
ExplicitWidth = 137
Width = 137
@ -249,7 +297,7 @@ inherited frViewPaciente: TfrViewPaciente
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 19
TabOrder = 21
ExplicitLeft = 485
ExplicitWidth = 137
Width = 137
@ -266,33 +314,43 @@ inherited frViewPaciente: TfrViewPaciente
end
inherited ePersonaContacto: TcxDBTextEdit
Left = 121
Top = 328
Top = 382
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 12
TabOrder = 14
ExplicitLeft = 121
ExplicitTop = 328
ExplicitTop = 382
ExplicitWidth = 239
Width = 239
end
object ePabellon: TcxDBTextEdit [23]
object cbPabellon: TcxDBComboBox [25]
Left = 121
Top = 109
Top = 136
DataBinding.DataField = 'PABELLON'
DataBinding.DataSource = dsContacto
Properties.ImmediatePost = True
Properties.OnInitPopup = cbPabellonPropertiesInitPopup
Properties.OnValidate = cbPabellonPropertiesValidate
Style.BorderColor = clWindowFrame
Style.BorderStyle = ebs3D
Style.HotTrack = False
Style.LookAndFeel.Kind = lfStandard
Style.LookAndFeel.NativeStyle = True
Style.LookAndFeel.SkinName = ''
Style.ButtonStyle = bts3D
Style.PopupBorderStyle = epbsFrame3D
StyleDisabled.LookAndFeel.Kind = lfStandard
StyleDisabled.LookAndFeel.NativeStyle = True
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.Kind = lfStandard
StyleFocused.LookAndFeel.NativeStyle = True
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.Kind = lfStandard
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 4
StyleHot.LookAndFeel.SkinName = ''
TabOrder = 5
Width = 239
end
inherited dxLayoutControlContactoGroup_Root: TdxLayoutGroup
@ -313,6 +371,16 @@ inherited frViewPaciente: TfrViewPaciente
Control = eNumeroSS
ControlOptions.ShowBorder = False
end
object dxLayoutControlContactoItem20: TdxLayoutItem
Caption = 'Doctor:'
Control = cbDoctor
ControlOptions.ShowBorder = False
end
object dxLayoutControlContactoItem21: TdxLayoutItem
Caption = 'Pabell'#243'n:'
Control = cbPabellon
ControlOptions.ShowBorder = False
end
object dxLayoutControlContactoItem19: TdxLayoutItem
Caption = 'Pabell'#243'n:'
Control = ePabellon

View File

@ -8,7 +8,7 @@ uses
dxLayoutControl, cxMemo, cxDBEdit, cxContainer, cxEdit, cxTextEdit, cxControls,
cxMaskEdit, cxSpinEdit, ImgList, PngImageList, ActnList, cxHyperLinkEdit,
Buttons, PngSpeedButton, cxDropDownEdit, cxCalendar, cxGraphics,
uDAInterfaces;
uDAInterfaces, uDoctoresController, uPabellonesController;
type
IViewPaciente = interface(IViewContacto)
@ -26,14 +26,128 @@ type
eCausaBaja: TcxDBTextEdit;
ePabellon: TcxDBTextEdit;
dxLayoutControlContactoItem19: TdxLayoutItem;
public
{ Public declarations }
dxLayoutControlContactoItem20: TdxLayoutItem;
cbDoctor: TcxDBComboBox;
dxLayoutControlContactoItem21: TdxLayoutItem;
cbPabellon: TcxDBComboBox;
procedure cbDoctorPropertiesInitPopup(Sender: TObject);
procedure cbDoctorPropertiesValidate(Sender: TObject;
var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
procedure cbPabellonPropertiesInitPopup(Sender: TObject);
procedure cbPabellonPropertiesValidate(Sender: TObject;
var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
procedure CustomViewCreate(Sender: TObject);
procedure CustomViewDestroy(Sender: TObject);
protected
FDoctoresController: IDoctoresController;
FPabellonesController: IPabellonesController;
end;
implementation
{$R *.dfm}
uses
uBizContactos, uPacientesController;
uBizContactos, uBizDoctores, uBizPabellones, uPacientesController;
procedure TfrViewPaciente.cbDoctorPropertiesInitPopup(Sender: TObject);
begin
inherited;
with cbDoctor.Properties.Items do
begin
BeginUpdate;
try
Clear;
AddStrings(FDoctoresController.DarListaDoctores);
finally
EndUpdate;
end;
end;
end;
procedure TfrViewPaciente.cbDoctorPropertiesValidate(Sender: TObject;
var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
var
ADoctor : IBizDoctor;
begin
inherited;
with (Sender as TcxDBComboBox) do
begin
if (Length(DisplayValue) > 0) and (DisplayValue <> (Contacto as IBizPaciente).DOCTOR) then
if Properties.LookupItems.IndexOf(DisplayValue) < 0 then
begin
Properties.LookupItems.BeginUpdate;
ADoctor := FDoctoresController.BuscarTodos;
ADoctor.DataTable.Active := True;
try
FDoctoresController.Anadir(ADoctor);
ADoctor.DESCRIPCION := DisplayValue;
FDoctoresController.Guardar(ADoctor);
Properties.LookupItems.Add(DisplayValue);
finally
Properties.LookupItems.EndUpdate;
ADoctor := NIL;
end;
end;
end;
end;
procedure TfrViewPaciente.cbPabellonPropertiesInitPopup(Sender: TObject);
begin
inherited;
with cbPabellon.Properties.Items do
begin
BeginUpdate;
try
Clear;
AddStrings(FPabellonesController.DarListaPabellones);
finally
EndUpdate;
end;
end;
end;
procedure TfrViewPaciente.cbPabellonPropertiesValidate(Sender: TObject;
var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
var
APabellon : IBizPabellon;
begin
inherited;
with (Sender as TcxDBComboBox) do
begin
if (Length(DisplayValue) > 0) and (DisplayValue <> (Contacto as IBizPaciente).PABELLON) then
if Properties.LookupItems.IndexOf(DisplayValue) < 0 then
begin
Properties.LookupItems.BeginUpdate;
APabellon := FPabellonesController.BuscarTodos;
APabellon.DataTable.Active := True;
try
FPabellonesController.Anadir(APabellon);
APabellon.DESCRIPCION := DisplayValue;
FPabellonesController.Guardar(APabellon);
Properties.LookupItems.Add(DisplayValue);
finally
Properties.LookupItems.EndUpdate;
APabellon := NIL;
end;
end;
end;
end;
procedure TfrViewPaciente.CustomViewCreate(Sender: TObject);
begin
inherited;
FDoctoresController := TDoctoresController.Create;
FPabellonesController := TPabellonesController.Create;
end;
procedure TfrViewPaciente.CustomViewDestroy(Sender: TObject);
begin
FDoctoresController:= NIL;
FPabellonesController:= NIL;
inherited;
end;
end.

View File

@ -11,6 +11,7 @@ inherited frViewPacientes: TfrViewPacientes
ExplicitWidth = 754
ExplicitHeight = 374
inherited cxGridView: TcxGridDBTableView
DataController.Options = [dcoAnsiSort, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoGroupsAlwaysExpanded]
DataController.Summary.FooterSummaryItems = <
item
Format = '0 agentes'
@ -23,7 +24,7 @@ inherited frViewPacientes: TfrViewPacientes
VisibleForCustomization = False
end
inherited cxGridViewREFERENCIA: TcxGridDBColumn
Width = 134
Width = 105
end
inherited cxGridViewNIF_CIF: TcxGridDBColumn
Caption = 'DNI'
@ -32,12 +33,12 @@ inherited frViewPacientes: TfrViewPacientes
end
inherited cxGridViewNOMBRE: TcxGridDBColumn
Caption = 'Nombre y apellidos'
Width = 328
Width = 259
end
object cxGridViewNUMERO_SS: TcxGridDBColumn [5]
Caption = 'N'#250'mero SS'
DataBinding.FieldName = 'NUMERO_SS'
Width = 128
Width = 100
end
inherited cxGridViewCALLE: TcxGridDBColumn
VisibleForCustomization = False
@ -48,12 +49,17 @@ inherited frViewPacientes: TfrViewPacientes
object cxGridViewPABELLON: TcxGridDBColumn
Caption = 'Pabell'#243'n'
DataBinding.FieldName = 'PABELLON'
Width = 128
Width = 101
end
object cxGridViewDOCTOR: TcxGridDBColumn
Caption = 'Doctor'
DataBinding.FieldName = 'DOCTOR'
Width = 80
end
object cxGridViewFECHA_BAJA: TcxGridDBColumn
Caption = 'Fecha de baja'
DataBinding.FieldName = 'FECHA_BAJA'
Width = 128
Width = 71
end
object cxGridViewFECHA_NACIMIENTO: TcxGridDBColumn
Caption = 'Fecha de nacim.'
@ -126,6 +132,7 @@ inherited frViewPacientes: TfrViewPacientes
end
inherited pnlAgrupaciones: TTBXDockablePanel
Top = 476
Visible = True
ExplicitTop = 476
ExplicitWidth = 754
inherited TBXAlignmentPanel1: TTBXAlignmentPanel
@ -134,6 +141,16 @@ inherited frViewPacientes: TfrViewPacientes
inherited TBXToolbar1: TTBXToolbar
Width = 744
ExplicitWidth = 744
object TBXSeparatorItem1: TTBXSeparatorItem
end
object TBXItem2: TTBXItem
Action = actDoctor
end
object TBXSeparatorItem2: TTBXSeparatorItem
end
object TBXItem3: TTBXItem
Action = actPabellon
end
end
end
end
@ -162,6 +179,18 @@ inherited frViewPacientes: TfrViewPacientes
TextColor = clSilver
end
end
inherited ActionList1: TActionList
object actDoctor: TAction
Caption = 'Doctor'
OnExecute = actDoctorExecute
OnUpdate = actDoctorUpdate
end
object actPabellon: TAction
Caption = 'Pabell'#243'n'
OnExecute = actPabellonExecute
OnUpdate = actPabellonUpdate
end
end
inherited cxStyleRepositoryInforme: TcxStyleRepository
Top = 192
end

View File

@ -28,10 +28,21 @@ type
cxGridViewNUMERO_SS: TcxGridDBColumn;
cxGridViewFECHA_NACIMIENTO: TcxGridDBColumn;
cxGridViewPABELLON: TcxGridDBColumn;
cxGridViewDOCTOR: TcxGridDBColumn;
TBXSeparatorItem1: TTBXSeparatorItem;
TBXItem2: TTBXItem;
TBXSeparatorItem2: TTBXSeparatorItem;
TBXItem3: TTBXItem;
actDoctor: TAction;
actPabellon: TAction;
procedure cxGridActiveTabChanged(Sender: TcxCustomGrid; ALevel: TcxGridLevel);
procedure cxGridViewStylesGetContentStyle(Sender: TcxCustomGridTableView;
ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
out AStyle: TcxStyle);
procedure actDoctorExecute(Sender: TObject);
procedure actDoctorUpdate(Sender: TObject);
procedure actPabellonExecute(Sender: TObject);
procedure actPabellonUpdate(Sender: TObject);
private
//Filtros relativos a la vista
procedure AnadirFiltroSituaciones;
@ -45,6 +56,46 @@ implementation
uses schContactosClient_Intf;
procedure TfrViewPacientes.actDoctorExecute(Sender: TObject);
begin
if (cxGridViewDOCTOR.GroupIndex < 0) then
begin
cxGridViewDOCTOR.GroupIndex := cxGridView.GroupedColumnCount;
cxGridViewDOCTOR.Visible := False;
end
else
begin
cxGridViewDOCTOR.GroupIndex := -1;
cxGridViewDOCTOR.Visible := True;
end;
end;
procedure TfrViewPacientes.actDoctorUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Checked := not (cxGridViewDOCTOR.GroupIndex < 0);
end;
procedure TfrViewPacientes.actPabellonExecute(Sender: TObject);
begin
if (cxGridViewPABELLON.GroupIndex < 0) then
begin
cxGridViewPABELLON.GroupIndex := cxGridView.GroupedColumnCount;
cxGridViewPABELLON.Visible := False;
end
else
begin
cxGridViewPABELLON.GroupIndex := -1;
cxGridViewPABELLON.Visible := True;
end;
end;
procedure TfrViewPacientes.actPabellonUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Checked := not (cxGridViewPABELLON.GroupIndex < 0);
end;
procedure TfrViewPacientes.AnadirFiltroSituaciones;
var
FFiltro : TcxFilterCriteriaItemList;
@ -86,9 +137,10 @@ var
ASituacion: String;
begin
inherited;
if Assigned(ARecord) then
if Assigned(AItem) then
begin
IndiceCol := (Sender as TcxGridDBTableView).GetColumnByFieldName(fld_PacientesFECHA_BAJA).Index;
IndiceCol := cxGridViewFECHA_BAJA.Index;
ASituacion := VarToStr(ARecord.DisplayTexts[IndiceCol]);
if Length(ASituacion) = 0 then
AStyle.TextColor := cxStyleActivos.TextColor

View File

@ -40,7 +40,7 @@
<Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType/>
<BorlandProject>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters><Parameters Name="RunParams">/standalone</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">2</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.2.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">Etiquetas Server</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">Etiquetas Server</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.2.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">jueves, 29 de diciembre de 2011 17:12</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters><Parameters Name="RunParams">/standalone</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">3</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.3.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">Etiquetas Server</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">Etiquetas Server</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.3.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys><VersionInfoKeys Name="CompileDate">jueves, 15 de marzo de 2012 13:32</VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPSCoreD11.bpl">ExpressPrinting System by Developer Express Inc.</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">Etiquetas_Server.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
</ProjectExtensions>

View File

@ -1,7 +1,7 @@
MAINICON ICON "C:\Codigo farmacia\Resources\Iconos\Servidor.ico"
1 VERSIONINFO
FILEVERSION 1,0,2,0
PRODUCTVERSION 1,0,2,0
FILEVERSION 1,0,3,0
PRODUCTVERSION 1,0,3,0
FILEFLAGSMASK 0x3FL
FILEFLAGS 0x00L
FILEOS 0x40004L
@ -13,11 +13,11 @@ BEGIN
BLOCK "0C0A04E4"
BEGIN
VALUE "CompanyName", "Rodax Software\0"
VALUE "FileVersion", "1.0.2.0\0"
VALUE "FileVersion", "1.0.3.0\0"
VALUE "InternalName", "Etiquetas Server\0"
VALUE "ProductName", "Etiquetas Server\0"
VALUE "ProductVersion", "1.0.2.0\0"
VALUE "CompileDate", "lunes, 30 de enero de 2012 12:24\0"
VALUE "ProductVersion", "1.0.3.0\0"
VALUE "CompileDate", "jueves, 15 de marzo de 2012 16:37\0"
END
END
BLOCK "VarFileInfo"

Binary file not shown.