139 lines
4.4 KiB
ObjectPascal
139 lines
4.4 KiB
ObjectPascal
|
|
{
|
|||
|
|
===============================================================================
|
|||
|
|
Copyright (<EFBFBD>) 2006. Rodax Software.
|
|||
|
|
===============================================================================
|
|||
|
|
Los contenidos de este fichero son propiedad de Rodax Software titular del
|
|||
|
|
copyright. Este fichero s<EFBFBD>lo podr<EFBFBD> ser copiado, distribuido y utilizado,
|
|||
|
|
en su totalidad o en parte, con el permiso escrito de Rodax Software, o de
|
|||
|
|
acuerdo con los t<EFBFBD>rminos y condiciones establecidas en el acuerdo/contrato
|
|||
|
|
bajo el que se suministra.
|
|||
|
|
-----------------------------------------------------------------------------
|
|||
|
|
Web: www.rodax-software.com
|
|||
|
|
===============================================================================
|
|||
|
|
Fecha primera versi<EFBFBD>n: 22-05-2006
|
|||
|
|
Versi<EFBFBD>n actual: 1.0.0
|
|||
|
|
Fecha versi<EFBFBD>n actual: 22-05-2006
|
|||
|
|
===============================================================================
|
|||
|
|
Modificaciones:
|
|||
|
|
|
|||
|
|
Fecha Comentarios
|
|||
|
|
---------------------------------------------------------------------------
|
|||
|
|
===============================================================================
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
unit uViewContacto;
|
|||
|
|
|
|||
|
|
interface
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
Windows, Messages, SysUtils, Variants, uViewBase, StdCtrls, DB,
|
|||
|
|
uDADataTable, uViewInternet, uViewTelefonos, Mask, DBCtrls, ExtCtrls,
|
|||
|
|
Controls, Classes, Forms, uCustomView, uViewDireccion, uBizContacto,
|
|||
|
|
Grids, DBGrids, Menus, cxLookAndFeelPainters, TB2Item, TB2Dock,
|
|||
|
|
TB2Toolbar, TBX, cxButtons, ImgList, PngImageList, ComCtrls, ToolWin,
|
|||
|
|
dxLayoutControl, cxControls, uViewDatosGenerales, uViewCategoriasContacto,
|
|||
|
|
uViewContactosAsociados;
|
|||
|
|
|
|||
|
|
type
|
|||
|
|
IViewContacto = interface(IViewBase)
|
|||
|
|
['{5FCFD172-5F8A-4639-B479-1CF0061526B5}']
|
|||
|
|
function GetContacto: IBizContacto;
|
|||
|
|
procedure SetContacto(const Value: IBizContacto);
|
|||
|
|
property Contacto: IBizContacto read GetContacto write SetContacto;
|
|||
|
|
procedure Refrescar;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
TfrViewContacto = class(TfrViewBase, IViewContacto)
|
|||
|
|
DADataSource1: TDADataSource;
|
|||
|
|
dxLayoutControl1Group_Root: TdxLayoutGroup;
|
|||
|
|
dxLayoutControl1: TdxLayoutControl;
|
|||
|
|
dxLayoutControl1Item1: TdxLayoutItem;
|
|||
|
|
frViewDatosGenerales1: TfrViewDatosGenerales;
|
|||
|
|
frViewTelefonos1: TfrViewTelefonos;
|
|||
|
|
dxLayoutControl1Item2: TdxLayoutItem;
|
|||
|
|
dxLayoutControl1Item3: TdxLayoutItem;
|
|||
|
|
dxLayoutControl1Item4: TdxLayoutItem;
|
|||
|
|
frViewDireccion1: TfrViewDireccion;
|
|||
|
|
dxLayoutControl1Item5: TdxLayoutItem;
|
|||
|
|
frViewInternet1: TfrViewInternet;
|
|||
|
|
dxLayoutControl1Group1: TdxLayoutGroup;
|
|||
|
|
dxLayoutControl1Group2: TdxLayoutGroup;
|
|||
|
|
frViewCategoriasContacto1: TfrViewCategoriasContacto;
|
|||
|
|
dxLayoutControl1Item6: TdxLayoutItem;
|
|||
|
|
frViewContactosAsociados1: TfrViewContactosAsociados;
|
|||
|
|
private
|
|||
|
|
FContacto: IBizContacto;
|
|||
|
|
function GetContacto: IBizContacto;
|
|||
|
|
procedure SetContacto(const Value: IBizContacto);
|
|||
|
|
protected
|
|||
|
|
public
|
|||
|
|
property Contacto: IBizContacto read GetContacto write SetContacto;
|
|||
|
|
destructor Destroy; override;
|
|||
|
|
procedure Refrescar;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
implementation
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
Dialogs,
|
|||
|
|
uDataModuleContactos, uEditorCategorias;
|
|||
|
|
|
|||
|
|
{$R *.dfm}
|
|||
|
|
|
|||
|
|
{ TfrViewContactos }
|
|||
|
|
|
|||
|
|
{
|
|||
|
|
******************************* TfrViewContacto ********************************
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function TfrViewContacto.GetContacto: IBizContacto;
|
|||
|
|
begin
|
|||
|
|
Result := FContacto;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrViewContacto.SetContacto(const Value: IBizContacto);
|
|||
|
|
begin
|
|||
|
|
FContacto := Value;
|
|||
|
|
|
|||
|
|
if Assigned(FContacto) then
|
|||
|
|
begin
|
|||
|
|
DADataSource1.DataTable := FContacto.DataTable;
|
|||
|
|
frViewCategoriasContacto1.Contacto := FContacto;
|
|||
|
|
frViewContactosAsociados1.Contacto := FContacto;
|
|||
|
|
end
|
|||
|
|
else begin
|
|||
|
|
DADataSource1.DataTable := Nil;
|
|||
|
|
frViewCategoriasContacto1.Contacto := Nil;
|
|||
|
|
frViewContactosAsociados1.Contacto := Nil;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
frViewDatosGenerales1.DADataSource.DataTable := DADataSource1.DataTable;
|
|||
|
|
frViewDireccion1.DADataSource.DataTable := DADataSource1.DataTable;
|
|||
|
|
frViewTelefonos1.DADataSource.DataTable := DADataSource1.DataTable;
|
|||
|
|
frViewInternet1.DADataSource.DataTable := DADataSource1.DataTable;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
destructor TfrViewContacto.Destroy;
|
|||
|
|
begin
|
|||
|
|
if Assigned(FContacto) then
|
|||
|
|
begin
|
|||
|
|
FContacto := Nil;
|
|||
|
|
end;
|
|||
|
|
inherited;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrViewContacto.Refrescar;
|
|||
|
|
begin
|
|||
|
|
frViewCategoriasContacto1.RefrescarCategorias;
|
|||
|
|
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
initialization
|
|||
|
|
RegisterClass(TfrViewContacto);
|
|||
|
|
|
|||
|
|
finalization
|
|||
|
|
UnRegisterClass(TfrViewContacto);
|
|||
|
|
|
|||
|
|
end.
|
|||
|
|
|