git-svn-id: https://192.168.0.254/svn/Proyectos.EstudioCarnicero_ProGestion/trunk@4 1b8572a8-2d6b-b84e-8c90-20ed86fa4eca
139 lines
4.4 KiB
ObjectPascal
139 lines
4.4 KiB
ObjectPascal
{
|
|
===============================================================================
|
|
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 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.
|
|
|